public void TestOrderKept()
        {
            var voc  = new VirtualOrderContainer <Foo>("", new[] { _f2, _f1 });
            var voc2 = new VirtualOrderContainer <Foo>(voc.GetStoredOrder(), new[] { _f1, _f2 });

            CollectionAssert.AreEqual(voc.OrderedItems, voc2.OrderedItems);
        }
        public void TestMoveAfter2()
        {
            var voc = new VirtualOrderContainer <Foo>("", new[] { _f1, _f2, _f3 });

            voc.MoveAfter(_f1, _f2);
            CollectionAssert.AreEqual(new[] { _f2, _f1, _f3 }, voc.OrderedItems);
        }
Ejemplo n.º 3
0
        public void TestMoveDown()
        {
            var voc = new VirtualOrderContainer <Foo>("", new[] { f1, f2 });

            voc.MoveDown(f1);
            CollectionAssert.AreEqual(new[] { f2, f1 }, voc.OrderedItems);
        }