src/GenFx.Components.Tests/ListEntityTests.cs
/// <summary>
/// Tests that the length can be contracted to decrease the number of items.
/// </summary>
Tests that the length can be contracted to decrease the number of items.
Tests that the length can be contracted to decrease the number of items .
[Fact]
        public void ListEntity_SetLengthToContract()
        {
            TestListEntity<int> entity = new TestListEntity<int>
            {
                MinimumStartingLength = 4,
                MaximumStartingLength = 4,
            };
            entity.Initialize(new MockGeneticAlgorithm());
            Assert.Equal(4, entity.Length);
            entity[0] = 999;
            Assert.Equal(999, entity[0]);
            entity.Length = 1;
            Assert.Equal(1, entity.Length);
            Assert.Equal(999, entity[0]);
        }
[ Fact ] public void ListEntity_SetLengthToContract ( ) { TestListEntity < int > entity = new TestListEntity < int > { MinimumStartingLength = 4 , MaximumStartingLength = 4 , } ; entity . Initialize ( new MockGeneticAlgorithm ( ) ) ; Assert . Equal ( 4 , entity . Length ) ; entity [ 0 ] = 999 ; Assert . Equal ( 999 , entity [ 0 ] ) ; entity . Length = 1 ; Assert . Equal ( 1 , entity . Length ) ; Assert . Equal ( 999 , entity [ 0 ] ) ; }
Tests that the length can be contracted to decrease the number of items.
Tests that the length can be contracted to decrease the number of items .