src/GenFx.Wpf.Tests/ExecutionPanelViewModelTest.cs
/// <summary>
/// Tests that the <see cref="ExecutionPanelViewModel.StepExecutionAsync"/> method works correctly.
/// </summary>
Tests that the  method works correctly.
Tests that the method works correctly .
[Fact]
        public void ExecutionPanelViewModel_StepExecutionAsync_FromIdle_ToCompletion()
        {
            GeneticAlgorithm algorithm = CreateTestAlgorithm(true);
            ExecutionContext context = new ExecutionContext(algorithm)
            {
                ExecutionState = ExecutionState.Idle
            };
            using ExecutionPanelViewModel viewModel = new ExecutionPanelViewModel(context);
            ((TestTerminator)algorithm.Terminator).IsCompleteValue = true;
            Task task = null;
            TestHelper.WaitForPropertyChanged(context,
                new[]
                {
                    new Tuple<string, object>(nameof(context.ExecutionState), ExecutionState.Running),
                    new Tuple<string, object>(nameof(context.ExecutionState), ExecutionState.Idle)
                },
                () => task = Task.Run(async () => await viewModel.StepExecutionAsync()));
            Assert.True(task.IsCompleted);
        }
[ Fact ] public void ExecutionPanelViewModel_StepExecutionAsync_FromIdle_ToCompletion ( ) { GeneticAlgorithm algorithm = CreateTestAlgorithm ( true ) ; ExecutionContext context = new ExecutionContext ( algorithm ) { ExecutionState = ExecutionState . Idle } ; using ExecutionPanelViewModel viewModel = new ExecutionPanelViewModel ( context ) ; ( ( TestTerminator ) algorithm . Terminator ) . IsCompleteValue = true ; Task task = null ; TestHelper . WaitForPropertyChanged ( context , new [ ] { new Tuple < string , object > ( nameof ( context . ExecutionState ) , ExecutionState . Running ) , new Tuple < string , object > ( nameof ( context . ExecutionState ) , ExecutionState . Idle ) } , ( ) => task = Task . Run ( async ( ) => await viewModel . StepExecutionAsync ( ) ) ) ; Assert . True ( task . IsCompleted ) ; }
Tests that the  method works correctly.
Tests that the method works correctly .