public void ExponentialScalingStrategy_Scale()
        {
            GeneticAlgorithm algorithm = GetAlgorithm(2);

            ExponentialScalingStrategy target = (ExponentialScalingStrategy)algorithm.FitnessScalingStrategy;

            target.Initialize(algorithm);
            SimplePopulation population = new SimplePopulation();

            population.Initialize(algorithm);
            MockEntity entity1 = new MockEntity();

            entity1.Initialize(algorithm);
            PrivateObject entity1Accessor = new PrivateObject(entity1, new PrivateType(typeof(GeneticEntity)));

            entity1Accessor.SetField("rawFitnessValue", 5);
            MockEntity entity2 = new MockEntity();

            entity2.Initialize(algorithm);
            PrivateObject entity2Accessor = new PrivateObject(entity2, new PrivateType(typeof(GeneticEntity)));

            entity2Accessor.SetField("rawFitnessValue", 7);
            population.Entities.Add(entity1);
            population.Entities.Add(entity2);
            target.Scale(population);

            Assert.Equal((double)25, entity1.ScaledFitnessValue);
            Assert.Equal((double)49, entity2.ScaledFitnessValue);
        }
        public void ExponentialScalingStrategy_Ctor_NullAlgorithm()
        {
            ExponentialScalingStrategy strategy = new ExponentialScalingStrategy();

            Assert.Throws <ArgumentNullException>(() => strategy.Initialize(null));
        }