public void PlaceView_ThrowsExceptionWithBadView()
        {
            var appWindow = new Window();
            var messageBus = Substitute.For<IMessageBus>();

            var view = new FrameworkElement();
            var viewResult = new ViewResult(view, ViewTargets.DefaultView);

            var viewPlacer = new ModalViewPlacer(appWindow, messageBus);

            viewPlacer.PlaceView(viewResult);
        }
        public void PlaceView()
        {
            var appWindow = new Window();
            var messageBus = Substitute.For<IMessageBus>();

            var viewModel = Substitute.For<IModalViewModel>();
            var view = new MockModalView();
            view.DataContext = viewModel;

            var viewResult = new ViewResult(view, ViewTargets.DefaultView);

            var viewPlacer = new ModalViewPlacer(appWindow, messageBus);

            viewPlacer.PlaceView(viewResult);

            Assert.IsTrue(view.ShowModalCalled);
            messageBus.Received().Publish<ModalViewClosedMessage>(Arg.Any<ModalViewClosedMessage>());
        }