src/GenFx.Components.Tests/IntegerListEntityTest.cs
/// <summary>
/// Ensures that the <see cref="IntegerListEntity.RequiresUniqueElementValues"/> property produces
/// an entity that contains all unique element values when initialized.
/// </summary>
Ensures that the  property produces
an entity that contains all unique element values when initialized.
Ensures that the property produces an entity that contains all unique element values when initialized .
[Fact]
        public void IntegerListEntity_Initialize_UniqueValues()
        {
            IntegerListEntity entity = new IntegerListEntity
            {
                MinElementValue = 1,
                MaxElementValue = 10,
                MinimumStartingLength = 10,
                MaximumStartingLength = 10,
                RequiresUniqueElementValues = true
            };
            for (int i = 0; i < 10; i++)
            {
                entity.Initialize(new MockGeneticAlgorithm());
                Assert.Equal(10, entity.Distinct().Count());
            }
        }
[ Fact ] public void IntegerListEntity_Initialize_UniqueValues ( ) { IntegerListEntity entity = new IntegerListEntity { MinElementValue = 1 , MaxElementValue = 10 , MinimumStartingLength = 10 , MaximumStartingLength = 10 , RequiresUniqueElementValues = true } ; for ( int i = 0 ; i < 10 ; i ++ ) { entity . Initialize ( new MockGeneticAlgorithm ( ) ) ; Assert . Equal ( 10 , entity . Distinct ( ) . Count ( ) ) ; } }
Ensures that the  property produces
an entity that contains all unique element values when initialized.
Ensures that the property produces an entity that contains all unique element values when initialized .