src/GenFx.Components.Tests/ListEntityBaseTest.cs
/// <summary>
/// Tests that the <see cref="ListEntityBase.GetInitialLength"/> method works correctly.
/// </summary>
Tests that the  method works correctly.
Tests that the method works correctly .
[Fact]
        public void ListEntityBase_GetInitialLength_DifferentStartingLengths()
        {
            TestEntity entity = new TestEntity
            {
                MinimumStartingLength = 2,
                MaximumStartingLength = 5
            };
            FakeRandomUtil random = new FakeRandomUtil();
            RandomNumberService.Instance = random;
            random.RandomValue = 4;
            int result = entity.GetInitialLength();
            Assert.Equal(4, result);
            Assert.Equal(entity.MinimumStartingLength, random.MinValue);
            Assert.Equal(entity.MaximumStartingLength + 1, random.MaxValue);
        }
[ Fact ] public void ListEntityBase_GetInitialLength_DifferentStartingLengths ( ) { TestEntity entity = new TestEntity { MinimumStartingLength = 2 , MaximumStartingLength = 5 } ; FakeRandomUtil random = new FakeRandomUtil ( ) ; RandomNumberService . Instance = random ; random . RandomValue = 4 ; int result = entity . GetInitialLength ( ) ; Assert . Equal ( 4 , result ) ; Assert . Equal ( entity . MinimumStartingLength , random . MinValue ) ; Assert . Equal ( entity . MaximumStartingLength + 1 , random . MaxValue ) ; }
Tests that the  method works correctly.
Tests that the method works correctly .