public void GivenAnInputList_MovingDownSelectedIndices_WillEndUpOnExpectedList(ArrangeableList <string> inputList, List <int> indicesToMove, List <string> expectedList) { var movedIndices = inputList.MoveItemsDownOnePosition(indicesToMove); var movedAsExpected = !movedIndices .Select(x => expectedList[x] == inputList[x]) .Any(x => x == false); Assert.IsTrue(movedAsExpected); }
public void WhenAnItemIsMovedDownTheListAppearsAsChanged() { var arrangeableList = new ArrangeableList <string>(); arrangeableList.InitializeWith(new List <string> { "1", "2", "3" }); arrangeableList.MoveItemsDownOnePosition(new List <int> { 1 }); Assert.IsTrue(arrangeableList.ListHasChanged); }