src/GenFx.Components.Tests/ListEntityBaseTest.cs
/// <summary>
/// Tests that the <see cref="IList.this"/> property works correctly.
/// </summary>
Tests that the  property works correctly.
Tests that the property works correctly .
[Fact]
        public void ListEntityBase_IList_Indexer()
        {
            TestEntity entity = new TestEntity();
            entity.InnerList.AddRange(Enumerable.Repeat<object>(null, 3));
            IList list = (IList)entity;
            list[0] = 1;
            Assert.Equal(new object[] { 1, null, null }, entity.InnerList);
            list[0] = 2;
            Assert.Equal(new object[] { 2, null, null }, entity.InnerList);
            list[1] = 2;
            Assert.Equal(new object[] { 2, 2, null }, entity.InnerList);
            list[2] = 3;
            Assert.Equal(new object[] { 2, 2, 3 }, entity.InnerList);
            Assert.Equal(2, list[0]);
            Assert.Equal(2, list[1]);
            Assert.Equal(3, list[2]);
        }
[ Fact ] public void ListEntityBase_IList_Indexer ( ) { TestEntity entity = new TestEntity ( ) ; entity . InnerList . AddRange ( Enumerable . Repeat < object > ( null , 3 ) ) ; IList list = ( IList ) entity ; list [ 0 ] = 1 ; Assert . Equal ( new object [ ] { 1 , null , null } , entity . InnerList ) ; list [ 0 ] = 2 ; Assert . Equal ( new object [ ] { 2 , null , null } , entity . InnerList ) ; list [ 1 ] = 2 ; Assert . Equal ( new object [ ] { 2 , 2 , null } , entity . InnerList ) ; list [ 2 ] = 3 ; Assert . Equal ( new object [ ] { 2 , 2 , 3 } , entity . InnerList ) ; Assert . Equal ( 2 , list [ 0 ] ) ; Assert . Equal ( 2 , list [ 1 ] ) ; Assert . Equal ( 3 , list [ 2 ] ) ; }
Tests that the  property works correctly.
Tests that the property works correctly .