src/GenFx.Components.Tests/ListEntityBase.OfT.Test.cs
/// <summary>
/// Tests that the <see cref="ListEntityBase{TItem}.SetValue"/> method works correctly.
/// </summary>
Tests that the  method works correctly.
Tests that the method works correctly .
[Fact]
        public void ListEntityBaseOfT_SetValue()
        {
            TestEntity<int> entity = new TestEntity<int>();
            entity.InnerList.AddRange(Enumerable.Range(3, 3).Cast<int>());
            entity.SetValue(2, 1);
            Assert.Equal(1, entity.InnerList[2]);
            Assert.Throws<ArgumentOutOfRangeException>(() => entity.SetValue(3, 1));
            Assert.Throws<ArgumentNullException>(() => entity.SetValue(0, null));
            Assert.Throws<ArgumentException>(() => entity.SetValue(0, "test"));
        }
[ Fact ] public void ListEntityBaseOfT_SetValue ( ) { TestEntity < int > entity = new TestEntity < int > ( ) ; entity . InnerList . AddRange ( Enumerable . Range ( 3 , 3 ) . Cast < int > ( ) ) ; entity . SetValue ( 2 , 1 ) ; Assert . Equal ( 1 , entity . InnerList [ 2 ] ) ; Assert . Throws < ArgumentOutOfRangeException > ( ( ) => entity . SetValue ( 3 , 1 ) ) ; Assert . Throws < ArgumentNullException > ( ( ) => entity . SetValue ( 0 , null ) ) ; Assert . Throws < ArgumentException > ( ( ) => entity . SetValue ( 0 , " " ) ) ; }
Tests that the  method works correctly.
Tests that the method works correctly .