示例#1
0
        public void TestInsertItemBeforeTooSmall()
        {
            // make sure empty list's first item is item used in appendItem call
            object o1 = makeItem();

            list.InsertItemBefore(o1, 0);
        }
示例#2
0
        public void TestInsertItemExisting()
        {
            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.InsertItemBefore(o2, 0);

            Assert.AreEqual(2, list.NumberOfItems);
            Assert.AreEqual(2, list2.NumberOfItems);
            Assert.AreSame(o1, list.GetItem(0));
            Assert.AreSame(o3, list.GetItem(1));
            Assert.AreSame(o2, list2.GetItem(0));
            Assert.AreSame(o4, list2.GetItem(1));
        }