Пример #1
0
        public void MoveRange_InvalidNewIndex_Throws()
        {
            var list = new BulkObservableList <string> {
                "a", "b", "c", "d", "e"
            };

            Assert.That(() => list.MoveRange(0, 2, 4), Throws.InstanceOf <ArgumentOutOfRangeException>());
        }
Пример #2
0
        public void MoveRange_OldIndexLessThanNewIndex_ItemsMoved()
        {
            var list = new BulkObservableList <string> {
                "a", "b", "c", "d", "e"
            };

            list.MoveRange(0, 2, 3);
            Assert.That(list, Is.EqualTo(new[] { "c", "d", "e", "a", "b" }));
        }
Пример #3
0
        public void MoveRange_OldIndexEqualToNewIndex_ItemsNotMoved()
        {
            var list = new BulkObservableList <string> {
                "a", "b", "c", "d", "e"
            };

            list.MoveRange(1, 2, 1);
            Assert.That(list, Is.EqualTo(new[] { "a", "b", "c", "d", "e" }));
        }
Пример #4
0
 public void MoveRange_OldIndexLessThanNewIndex_ItemsMoved()
 {
     var list = new BulkObservableList<string> {"a", "b", "c", "d", "e"};
     list.MoveRange(0, 2, 3);
     Assert.That(list, Is.EqualTo(new[] {"c", "d", "e", "a", "b"}));
 }
Пример #5
0
 public void MoveRange_OldIndexEqualToNewIndex_ItemsNotMoved()
 {
     var list = new BulkObservableList<string> {"a", "b", "c", "d", "e"};
     list.MoveRange(1, 2, 1);
     Assert.That(list, Is.EqualTo(new[] {"a", "b", "c", "d", "e"}));
 }
Пример #6
0
 public void MoveRange_InvalidOldIndex_Throws()
 {
     var list = new BulkObservableList<string> {"a", "b", "c", "d", "e"};
     Assert.That(() => list.MoveRange(5, 2, 1), Throws.InstanceOf<ArgumentOutOfRangeException>());
 }