예제 #1
0
            public void List_Insert_WithNegativeIndex_IsRejected()
            {
                var source = new List <int> {
                    13
                };
                var list = new ReadWriteList <int>(source);

                list.Insert(-1, 17);
            }
예제 #2
0
            public void List_Insert_WithInvalidIndex_IsRejected()
            {
                var source = new List <int> {
                    13
                };
                var list = new ReadWriteList <int>(source);

                list.Insert(2, 17);
            }
예제 #3
0
            public void List_Insert_InsertsItem()
            {
                var source = new List <int> {
                    13
                };
                var list = new ReadWriteList <int>(source);

                list.Insert(0, 17);
                Assert.IsTrue(source.SequenceEqual(new[] { 17, 13 }), "Item should be inserted.");
            }