src/GenFx.Wpf.Tests/ExecutionPanelTest.cs
/// <summary>
/// Tests that the <see cref="ExecutionPanel.StartExecutionCommand"/> works correctly.
/// </summary>
Tests that the  works correctly.
Tests that the works correctly .
[StaFact]
        public void ExecutionPanel_StartExecutionCommand_CanExecute_WithContext()
        {
            ExecutionPanel panel = new ExecutionPanel
            {
                ExecutionContext = new ExecutionContext(Mock.Of<GeneticAlgorithm>())
            };
            foreach (ExecutionState enumVal in Enum.GetValues(typeof(ExecutionState)))
            {
                panel.ExecutionContext.ExecutionState = enumVal;
                bool result = ExecutionPanel.StartExecutionCommand.CanExecute(null, panel);
                switch (enumVal)
                {
                    case ExecutionState.Idle:
                    case ExecutionState.Paused:
                        Assert.True(result);
                        break;
                    default:
                        Assert.False(result);
                        break;
                }
            }
        }
[ StaFact ] public void ExecutionPanel_StartExecutionCommand_CanExecute_WithContext ( ) { ExecutionPanel panel = new ExecutionPanel { ExecutionContext = new ExecutionContext ( Mock . Of < GeneticAlgorithm > ( ) ) } ; foreach ( ExecutionState enumVal in Enum . GetValues ( typeof ( ExecutionState ) ) ) { panel . ExecutionContext . ExecutionState = enumVal ; bool result = ExecutionPanel . StartExecutionCommand . CanExecute ( null , panel ) ; switch ( enumVal ) { case ExecutionState . Idle : case ExecutionState . Paused : Assert . True ( result ) ; break ; default : Assert . False ( result ) ; break ; } } }
Tests that the  works correctly.
Tests that the works correctly .