src/GenFx.Components.Tests/SigmaScalingStrategyTest.cs
/// <summary>
/// Tests that an exception is thrown when an empty population is passed.
/// </summary>
Tests that an exception is thrown when an empty population is passed.
Tests that an exception is thrown when an empty population is passed .
[Fact]
        public void SigmaScalingStrategy_Scale_EmptyPopulation()
        {
            GeneticAlgorithm algorithm = GetAlgorithm(10);
            SigmaScalingStrategy op = new SigmaScalingStrategy();
            op.Initialize(algorithm);
            SimplePopulation population = new SimplePopulation();
            population.Initialize(algorithm);
            Assert.Throws<ArgumentException>(() => op.Scale(population));
        }
[ Fact ] public void SigmaScalingStrategy_Scale_EmptyPopulation ( ) { GeneticAlgorithm algorithm = GetAlgorithm ( 10 ) ; SigmaScalingStrategy op = new SigmaScalingStrategy ( ) ; op . Initialize ( algorithm ) ; SimplePopulation population = new SimplePopulation ( ) ; population . Initialize ( algorithm ) ; Assert . Throws < ArgumentException > ( ( ) => op . Scale ( population ) ) ; }
Tests that an exception is thrown when an empty population is passed.
Tests that an exception is thrown when an empty population is passed .