예제 #1
0
        public void GivenAnInputList_RemovingSelectedIndices_WillEndUpOnExpectedList(ArrangeableList <string> inputList, List <int> indicesToRemove, List <string> expectedList)
        {
            var removedIndices = inputList.RemoveAt(indicesToRemove);

            var movedAsExpected = !removedIndices
                                  .Select(x => expectedList[x] == inputList[x])
                                  .Any(x => x == false);

            Assert.IsTrue(movedAsExpected);
        }
예제 #2
0
        public void WhenAnItemIsRemovedTheListAppearsAsChanged()
        {
            var arrangeableList = new ArrangeableList <string>();

            arrangeableList.InitializeWith(new List <string> {
                "1", "2", "3"
            });

            arrangeableList.RemoveAt(1);
            Assert.IsTrue(arrangeableList.ListHasChanged);
        }