src/GenFx.Components.Tests/IntegerListEntityTest.cs
/// <summary>
/// Tests that the constructor initializes the state correctly.
/// </summary>
Tests that the constructor initializes the state correctly.
Tests that the constructor initializes the state correctly .
[Fact]
        public void IntegerListEntity_Ctor()
        {
            int size = 3;
            GeneticAlgorithm algorithm = GetAlgorithm(size);
            IntegerListEntity entity = new TestIntegerListEntity { MinimumStartingLength = size, MaximumStartingLength = size };
            entity.Initialize(algorithm);
            PrivateObject accessor = new PrivateObject(entity, new PrivateType(typeof(ListEntity<int>)));
            Assert.Equal(size, entity.Length);
            Assert.Equal(size, ((List<int>)accessor.GetField("genes")).Count);
        }
[ Fact ] public void IntegerListEntity_Ctor ( ) { int size = 3 ; GeneticAlgorithm algorithm = GetAlgorithm ( size ) ; IntegerListEntity entity = new TestIntegerListEntity { MinimumStartingLength = size , MaximumStartingLength = size } ; entity . Initialize ( algorithm ) ; PrivateObject accessor = new PrivateObject ( entity , new PrivateType ( typeof ( ListEntity < int > ) ) ) ; Assert . Equal ( size , entity . Length ) ; Assert . Equal ( size , ( ( List < int > ) accessor . GetField ( " " ) ) . Count ) ; }
Tests that the constructor initializes the state correctly.
Tests that the constructor initializes the state correctly .