src/GenFx.Tests/EnvironmentFitnessEvaluatedEventArgsTest.cs
/// <summary>
/// Tests that an exception is thrown in an invalid generation index is passed.
/// </summary>
Tests that an exception is thrown in an invalid generation index is passed.
Tests that an exception is thrown in an invalid generation index is passed .
[Fact]
        public void EnvironmentFitnessEvaluatedEventArgs_InvalidGenerationIndex()
        {
            GeneticEnvironment environment = new GeneticEnvironment(new MockGeneticAlgorithm());
            int generationIndex = -1;
            Assert.Throws<ArgumentOutOfRangeException>(() => new EnvironmentFitnessEvaluatedEventArgs(
                environment, generationIndex));
        }
[ Fact ] public void EnvironmentFitnessEvaluatedEventArgs_InvalidGenerationIndex ( ) { GeneticEnvironment environment = new GeneticEnvironment ( new MockGeneticAlgorithm ( ) ) ; int generationIndex = - 1 ; Assert . Throws < ArgumentOutOfRangeException > ( ( ) => new EnvironmentFitnessEvaluatedEventArgs ( environment , generationIndex ) ) ; }
Tests that an exception is thrown in an invalid generation index is passed.
Tests that an exception is thrown in an invalid generation index is passed .