src/GenFx.Wpf.Tests/ExecutionContextTest.cs
/// <summary>
/// Tests that the <see cref="ExecutionContext.ExecutionState"/> resets the <see cref="ExecutionContext.AlgorithmException"/> property
/// when set to idle.
/// </summary>
Tests that the  resets the  property
when set to idle.
Tests that the resets the property when set to idle .
[Fact]
        public void ExecutionContext_ExecutionState_ResetException()
        {
            GeneticAlgorithm algorithm = Mock.Of<GeneticAlgorithm>();
            ExecutionContext context = new ExecutionContext(algorithm);
            InvalidOperationException exception = new InvalidOperationException();
            context.AlgorithmException = exception;
            context.ExecutionState = ExecutionState.Running;
            Assert.Same(exception, context.AlgorithmException);
            context.ExecutionState = ExecutionState.Idle;
            Assert.Null(context.AlgorithmException);
        }
[ Fact ] public void ExecutionContext_ExecutionState_ResetException ( ) { GeneticAlgorithm algorithm = Mock . Of < GeneticAlgorithm > ( ) ; ExecutionContext context = new ExecutionContext ( algorithm ) ; InvalidOperationException exception = new InvalidOperationException ( ) ; context . AlgorithmException = exception ; context . ExecutionState = ExecutionState . Running ; Assert . Same ( exception , context . AlgorithmException ) ; context . ExecutionState = ExecutionState . Idle ; Assert . Null ( context . AlgorithmException ) ; }
Tests that the  resets the  property
when set to idle.
Tests that the resets the property when set to idle .