src/GenFx.Tests/GeneticAlgorithmTest.cs
/// <summary>
/// Tests that the ApplyMutation method works correctly.
/// </summary>
Tests that the ApplyMutation method works correctly.
Tests that the ApplyMutation method works correctly .
[Fact]
        public void GeneticAlgorithm_ApplyMutation()
        {
            TestGeneticAlgorithm algorithm = new TestGeneticAlgorithm
            {
                PopulationSeed = new MockPopulation(),
                SelectionOperator = new MockSelectionOperator(),
                FitnessEvaluator = new MockFitnessEvaluator(),
                GeneticEntitySeed = new MockEntity()
            };
            TestApplyMutation(algorithm, 0);
            algorithm.MutationOperator = new MockMutationOperator
            {
                MutationRate = .01
            };
            TestApplyMutation(algorithm, 3);
        }
[ Fact ] public void GeneticAlgorithm_ApplyMutation ( ) { TestGeneticAlgorithm algorithm = new TestGeneticAlgorithm { PopulationSeed = new MockPopulation ( ) , SelectionOperator = new MockSelectionOperator ( ) , FitnessEvaluator = new MockFitnessEvaluator ( ) , GeneticEntitySeed = new MockEntity ( ) } ; TestApplyMutation ( algorithm , 0 ) ; algorithm . MutationOperator = new MockMutationOperator { MutationRate = .01 } ; TestApplyMutation ( algorithm , 3 ) ; }
Tests that the ApplyMutation method works correctly.
Tests that the ApplyMutation method works correctly .