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()
        {
            GeneticAlgorithm algorithm = CreateTestAlgorithm(true);
            ExecutionContext context = new ExecutionContext(algorithm)
            {
                ExecutionState = ExecutionState.Idle
            };
            using (ExecutionPanelViewModel viewModel = new ExecutionPanelViewModel(context))
            {
                Task task = Task.Run(async () => await viewModel.StepExecutionAsync());
                TestHelper.WaitForResult(ExecutionState.Paused, () => context.ExecutionState);
                Assert.True(task.IsCompleted);
            }
        }
[ Fact ] public void ExecutionPanelViewModel_StepExecutionAsync_FromIdle ( ) { GeneticAlgorithm algorithm = CreateTestAlgorithm ( true ) ; ExecutionContext context = new ExecutionContext ( algorithm ) { ExecutionState = ExecutionState . Idle } ; using ( ExecutionPanelViewModel viewModel = new ExecutionPanelViewModel ( context ) ) { Task task = Task . Run ( async ( ) => await viewModel . StepExecutionAsync ( ) ) ; TestHelper . WaitForResult ( ExecutionState . Paused , ( ) => context . ExecutionState ) ; Assert . True ( task . IsCompleted ) ; } }
Tests that the  method works correctly.
Tests that the method works correctly .