public void OpenWelcomePageWithReadMe()
        {
            // Arrange
            var itemOperations = new Mock<IItemOperations>();
            var solutionFolder = new Mock<ISolutionFolder>();
            var policy = new Mock<IDefaultDocumentPolicy>();
            const string rootFolder = @"Z:\some\path";
            solutionFolder.Setup(x => x.GetDirectoryName())
                          .Returns(rootFolder);
            policy.Setup(x => x.ContainsDefaultDocument(It.IsAny<string>()))
                  .Returns(true);
            var server = new Mock<IWebServer>();
            var impl = new WelcomePageImpl(solutionFolder.Object, policy.Object, itemOperations.Object, server.Object);

            // Act
            impl.OnAfterOpenSolution();
            impl.OnViewWelcomePage();

            // Assert
            // Server should be started.
            server.Verify(x => x.Start(It.IsAny<Uri>(), rootFolder), Times.AtLeastOnce());
            // Browser should be opened twice: once for solution, once for menu item.
            itemOperations.Verify(x => x.Navigate(It.IsAny<string>()), Times.Exactly(2));
        }
        public void OpenWelcomePageWithNoSolution()
        {
            // Arrange
            var itemOperations = new Mock<IItemOperations>();
            var solutionFolder = new Mock<ISolutionFolder>();
            var policy = new Mock<IDefaultDocumentPolicy>();
            const string rootFolder = @"Z:\some\path";
            solutionFolder.Setup(x => x.GetDirectoryName())
                          .Returns(rootFolder);
            policy.Setup(x => x.ContainsDefaultDocument(It.IsAny<string>()))
                  .Returns(true);
            var server = new Mock<IWebServer>();
            var impl = new WelcomePageImpl(solutionFolder.Object, policy.Object, itemOperations.Object, server.Object);

            // Act
            impl.OnViewWelcomePage();

            // Assert
            server.Verify(x => x.Start(It.IsAny<Uri>(), rootFolder), Times.AtMostOnce());
            itemOperations.Verify(x => x.Navigate(It.IsAny<string>()), Times.Never());
        }