Пример #1
0
        public void TestReplaceItemExisting()
        {
            SvgList list2 = makeList();
            object  o1    = makeItem();
            object  o2    = makeItem();
            object  o3    = makeItem();
            object  o4    = makeItem();

            list.AppendItem(o1);
            list.AppendItem(o2);
            list.AppendItem(o3);

            list2.AppendItem(o4);
            list2.ReplaceItem(o2, 0);

            Assert.AreEqual(2, list.NumberOfItems);
            Assert.AreEqual(1, list2.NumberOfItems);
            Assert.AreSame(o1, list.GetItem(0));
            Assert.AreSame(o3, list.GetItem(1));
            Assert.AreSame(o2, list2.GetItem(0));
        }
Пример #2
0
        public void TestReplaceItemTooSmall()
        {
            object o1 = makeItem();

            list.ReplaceItem(o1, 0);
        }