src/GenFx.Tests/GeneticAlgorithmTest.cs
/// <summary>
/// Tests that the ValidateRequiredComponents method works correctly.
/// </summary>
Tests that the ValidateRequiredComponents method works correctly.
Tests that the ValidateRequiredComponents method works correctly .
[Fact]
        public void GeneticAlgorithm_ValidateConfiguration_ValidMetricType()
        {
            MockGeneticAlgorithm algorithm = new MockGeneticAlgorithm
            {
                SelectionOperator = new MockSelectionOperator(),
                FitnessEvaluator = new MockFitnessEvaluator(),
                GeneticEntitySeed = new MockEntity(),
                PopulationSeed = new MetricDependentPopulation(),
            };
            algorithm.Metrics.Add(new MockMetric());
            algorithm.Metrics.Add(new MockMetric2());
            this.ValidateComponent(algorithm.PopulationSeed, algorithm, false);
        }
[ Fact ] public void GeneticAlgorithm_ValidateConfiguration_ValidMetricType ( ) { MockGeneticAlgorithm algorithm = new MockGeneticAlgorithm { SelectionOperator = new MockSelectionOperator ( ) , FitnessEvaluator = new MockFitnessEvaluator ( ) , GeneticEntitySeed = new MockEntity ( ) , PopulationSeed = new MetricDependentPopulation ( ) , } ; algorithm . Metrics . Add ( new MockMetric ( ) ) ; algorithm . Metrics . Add ( new MockMetric2 ( ) ) ; this . ValidateComponent ( algorithm . PopulationSeed , algorithm , false ) ; }
Tests that the ValidateRequiredComponents method works correctly.
Tests that the ValidateRequiredComponents method works correctly .