src/GenFx.Tests/FitnessScalingStrategyTest.cs
/// <summary>
/// Tests that the Scale method works correctly.
/// </summary>
Tests that the Scale method works correctly.
Tests that the Scale method works correctly .
[Fact]
        public void FitnessScalingStrategy_Scale()
        {
            GeneticAlgorithm algorithm = GetAlgorithm();
            FakeFitnessScalingStrategy2 strategy = new FakeFitnessScalingStrategy2();
            strategy.Initialize(algorithm);
            MockPopulation population = new MockPopulation();
            population.Initialize(algorithm);
            MockEntity entity = new MockEntity();
            entity.Initialize(algorithm);
            population.Entities.Add(entity);
            strategy.Scale(population);
            Assert.True(strategy.OnScaleCalled, "ScaleCore was not called.");
        }
[ Fact ] public void FitnessScalingStrategy_Scale ( ) { GeneticAlgorithm algorithm = GetAlgorithm ( ) ; FakeFitnessScalingStrategy2 strategy = new FakeFitnessScalingStrategy2 ( ) ; strategy . Initialize ( algorithm ) ; MockPopulation population = new MockPopulation ( ) ; population . Initialize ( algorithm ) ; MockEntity entity = new MockEntity ( ) ; entity . Initialize ( algorithm ) ; population . Entities . Add ( entity ) ; strategy . Scale ( population ) ; Assert . True ( strategy . OnScaleCalled , " " ) ; }
Tests that the Scale method works correctly.
Tests that the Scale method works correctly .