src/GenFx.Components.Tests/BinaryStringEntityTest.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 BinaryStringEntity_Ctor()
        {
            int size = 3;
            GeneticAlgorithm algorithm = GetAlgorithm(size);
            TestBinaryStringEntity entity = new TestBinaryStringEntity { MinimumStartingLength = size, MaximumStartingLength = size };
            entity.Initialize(algorithm);
            PrivateObject accessor = new PrivateObject(entity, new PrivateType(typeof(BinaryStringEntity)));
            Assert.Equal(size, entity.Length);
            Assert.Equal(size, ((BitArray)accessor.GetField("genes")).Length);
        }
[ Fact ] public void BinaryStringEntity_Ctor ( ) { int size = 3 ; GeneticAlgorithm algorithm = GetAlgorithm ( size ) ; TestBinaryStringEntity entity = new TestBinaryStringEntity { MinimumStartingLength = size , MaximumStartingLength = size } ; entity . Initialize ( algorithm ) ; PrivateObject accessor = new PrivateObject ( entity , new PrivateType ( typeof ( BinaryStringEntity ) ) ) ; Assert . Equal ( size , entity . Length ) ; Assert . Equal ( size , ( ( BitArray ) accessor . GetField ( " " ) ) . Length ) ; }
Tests that the constructor initializes the state correctly.
Tests that the constructor initializes the state correctly .