Dev2.Core.Tests.DeployViewModelTest.DeployViewModelTest_DeployCommand_HttpsServer_DialogIsNotShown_DeployContinues C# (CSharp) Method

DeployViewModelTest_DeployCommand_HttpsServer_DialogIsNotShown_DeployContinues() private method

        public void DeployViewModelTest_DeployCommand_HttpsServer_DialogIsNotShown_DeployContinues()
        {
            DeployViewModel deployViewModel;
            var popupController = new Mock<IPopupController>();
            popupController.Setup(controller => controller.Show(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<MessageBoxButton>(), It.IsAny<MessageBoxImage>(), It.IsAny<string>())).Returns(MessageBoxResult.No);
            CustomContainer.Register(popupController.Object);
            var deployStatsCalculator = SetupDeployViewModel(out deployViewModel);
            var mockConnectionAsHttps = new Mock<IEnvironmentConnection>();
            mockConnectionAsHttps.Setup(connection => connection.WebServerUri).Returns(new Uri("https://127.0.0.56"));
            var mockHttpsEnvironment = new Mock<IEnvironmentModel>();
            mockHttpsEnvironment.Setup(model => model.Connection).Returns(mockConnectionAsHttps.Object);
            deployViewModel.SelectedDestinationServer = mockHttpsEnvironment.Object;

            deployViewModel.ShowDialog = o =>
            {
                var viewModel = (DeployDialogViewModel)o;
                viewModel.DialogResult = ViewModelDialogResults.Okay;
            };
            deployViewModel.HasNoResourcesToDeploy = (o, i) => false;

            SetupResources(deployStatsCalculator, true);
            deployViewModel.DeployCommand.Execute(null);

            Assert.IsTrue(deployViewModel.DeploySuccessfull);
            popupController.Verify(controller => controller.Show(It.IsAny<string>(), "Unsecure Destination Server", It.IsAny<MessageBoxButton>(), It.IsAny<MessageBoxImage>(), It.IsAny<string>()), Times.Never());
        }
DeployViewModelTest