src/GenFx.Components.Tests/MeanFitnessTest.cs
/// <summary>
/// Tests that the <see cref="MeanFitness.GetResultValue"/> method works correctly.
/// </summary>
Tests that the  method works correctly.
Tests that the method works correctly .
[Fact]
        public void MeanFitness_GetResultValue_NoScaling()
        {
            MeanFitness metric = new MeanFitness();
            metric.Initialize(new MockGeneticAlgorithm());
            MockPopulation population = new MockPopulation();
            PrivateObject populationAccessor = new PrivateObject(population, new PrivateType(typeof(Population)));
            populationAccessor.SetField("rawMean", (double)12);
            object result = metric.GetResultValue(population);
            Assert.Equal((double)12, result);
        }
[ Fact ] public void MeanFitness_GetResultValue_NoScaling ( ) { MeanFitness metric = new MeanFitness ( ) ; metric . Initialize ( new MockGeneticAlgorithm ( ) ) ; MockPopulation population = new MockPopulation ( ) ; PrivateObject populationAccessor = new PrivateObject ( population , new PrivateType ( typeof ( Population ) ) ) ; populationAccessor . SetField ( " " , ( double ) 12 ) ; object result = metric . GetResultValue ( population ) ; Assert . Equal ( ( double ) 12 , result ) ; }
Tests that the  method works correctly.
Tests that the method works correctly .