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>()); }
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" })); }
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" })); }
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"})); }
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"})); }
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>()); }