src/GenFx.Components.Tests/BinaryStringEntityTest.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 BinaryStringEntity_SetLengthToContract()
        {
            BinaryStringEntity entity = new BinaryStringEntity
            {
                MinimumStartingLength = 4,
                MaximumStartingLength = 4,
            };
            entity.Initialize(new MockGeneticAlgorithm());
            Assert.Equal(4, entity.Length);
            entity[0] = true;
            Assert.True(entity[0]);
            entity.Length = 1;
            Assert.Equal(1, entity.Length);
            Assert.True(entity[0]);
        }
[ Fact ] public void BinaryStringEntity_SetLengthToContract ( ) { BinaryStringEntity entity = new BinaryStringEntity { MinimumStartingLength = 4 , MaximumStartingLength = 4 , } ; entity . Initialize ( new MockGeneticAlgorithm ( ) ) ; Assert . Equal ( 4 , entity . Length ) ; entity [ 0 ] = true ; Assert . True ( entity [ 0 ] ) ; entity . Length = 1 ; Assert . Equal ( 1 , entity . Length ) ; Assert . True ( 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 .