Dev2.Core.Tests.Services.ServerServiceConfigurationTest.ServerServiceConfiguration_PromptUserToStartService_WhenServiceNotRunningAndCancelSelected_ExpectFalse C# (CSharp) Method

ServerServiceConfiguration_PromptUserToStartService_WhenServiceNotRunningAndCancelSelected_ExpectFalse() private method

        public void ServerServiceConfiguration_PromptUserToStartService_WhenServiceNotRunningAndCancelSelected_ExpectFalse()
        {
            //------------Setup for test--------------------------
            Mock<IPopupController> controller;
            var serverServiceConfiguration = CreateServerServiceConfiguration(false, MessageBoxResult.Cancel, out controller);

            //------------Execute Test---------------------------
            var result = serverServiceConfiguration.PromptUserToStartService();

            //------------Assert Results-------------------------
            Assert.IsFalse(result);
            controller.Verify(m => m.Show(It.IsAny<string>(), It.IsAny<string>(), It.IsAny<MessageBoxButton>(), It.IsAny<MessageBoxImage>(), It.IsAny<string>()), Times.Once());
        }
ServerServiceConfigurationTest