src/GenFx.Wpf.Tests/ExecutionPanelViewModelTest.cs
/// <summary>
/// Tests that the <see cref="ExecutionPanelViewModel.CanStartExecution"/> method works correctly.
/// </summary>
Tests that the  method works correctly.
Tests that the method works correctly .
[Fact]
        public void ExecutionPanelViewModel_CanStartExecution()
        {
            ExecutionContext context = new ExecutionContext(Mock.Of<GeneticAlgorithm>());
            using (ExecutionPanelViewModel viewModel = new ExecutionPanelViewModel(context))
            {
                foreach (ExecutionState enumVal in Enum.GetValues(typeof(ExecutionState)))
                {
                    context.ExecutionState = enumVal;
                    switch (enumVal)
                    {
                        case ExecutionState.Idle:
                        case ExecutionState.Paused:
                            Assert.True(viewModel.CanStartExecution());
                            break;
                        default:
                            Assert.False(viewModel.CanStartExecution());
                            break;
                    }
                }
            }
        }
[ Fact ] public void ExecutionPanelViewModel_CanStartExecution ( ) { ExecutionContext context = new ExecutionContext ( Mock . Of < GeneticAlgorithm > ( ) ) ; using ( ExecutionPanelViewModel viewModel = new ExecutionPanelViewModel ( context ) ) { foreach ( ExecutionState enumVal in Enum . GetValues ( typeof ( ExecutionState ) ) ) { context . ExecutionState = enumVal ; switch ( enumVal ) { case ExecutionState . Idle : case ExecutionState . Paused : Assert . True ( viewModel . CanStartExecution ( ) ) ; break ; default : Assert . False ( viewModel . CanStartExecution ( ) ) ; break ; } } } }
Tests that the  method works correctly.
Tests that the method works correctly .