src/GenFx.Components.Tests/ListEntityBase.OfT.Test.cs
/// <summary>
/// Tests that the <see cref="ListEntityBase{TItem}.Insert"/> method works correctly.
/// </summary>
Tests that the  method works correctly.
Tests that the method works correctly .
[Fact]
        public void ListEntityBaseOfT_Insert()
        {
            TestEntity<int> entity = new TestEntity<int>();
            entity.Insert(0, 10);
            entity.Insert(1, 20);
            entity.Insert(0, 5);
            Assert.Equal(5, entity.InnerList[0]);
            Assert.Equal(10, entity.InnerList[1]);
            Assert.Equal(20, entity.InnerList[2]);
            Assert.Throws<ArgumentOutOfRangeException>(() => entity.Insert(5, 1));
            Assert.Throws<ArgumentOutOfRangeException>(() => entity.Insert(-1, 1));
        }
[ Fact ] public void ListEntityBaseOfT_Insert ( ) { TestEntity < int > entity = new TestEntity < int > ( ) ; entity . Insert ( 0 , 10 ) ; entity . Insert ( 1 , 20 ) ; entity . Insert ( 0 , 5 ) ; Assert . Equal ( 5 , entity . InnerList [ 0 ] ) ; Assert . Equal ( 10 , entity . InnerList [ 1 ] ) ; Assert . Equal ( 20 , entity . InnerList [ 2 ] ) ; Assert . Throws < ArgumentOutOfRangeException > ( ( ) => entity . Insert ( 5 , 1 ) ) ; Assert . Throws < ArgumentOutOfRangeException > ( ( ) => entity . Insert ( - 1 , 1 ) ) ; }
Tests that the  method works correctly.
Tests that the method works correctly .