Пример #1
0
        public void ExecutionContext_ExecutionState()
        {
            GeneticAlgorithm algorithm = Mock.Of <GeneticAlgorithm>();
            ExecutionContext context   = new ExecutionContext(algorithm);

            PropertyChangedHelper.VerifyPropertyChangedEvent(
                context, nameof(ExecutionContext.ExecutionState), ExecutionState.Running,
                v => context.ExecutionState = v, () => context.ExecutionState);
        }
Пример #2
0
        public void ExecutionContext_AlgorithmException()
        {
            GeneticAlgorithm algorithm = Mock.Of <GeneticAlgorithm>();
            ExecutionContext context   = new ExecutionContext(algorithm);

            PropertyChangedHelper.VerifyPropertyChangedEvent(
                context, nameof(ExecutionContext.AlgorithmException), new ArgumentException(),
                v => context.AlgorithmException = v, () => context.AlgorithmException);
        }