public void Remove_ListDoesNotContainTheItem_ReturnsFalse() { // arrange CustomClassList <int> test = new CustomClassList <int>(); test.Add(0); test.Add(1); test.Add(2); bool expected = false; bool actual; // act actual = test.Remove(3); // assert Assert.AreEqual(expected, actual); }
public void Remove_RemoveItemFromTheList_ShiftsRemainderItemsAccordingly() { // arrange CustomClassList <int> test = new CustomClassList <int>(); test.Add(0); test.Add(1); test.Add(2); int expected = 1; int actual; // act test.Remove(0); actual = test[0]; // assert Assert.AreEqual(expected, actual); }
public void Remove_RemoveAnItemFromList_CountDecreasesByOne() { // arrange CustomClassList <int> test = new CustomClassList <int>(); test.Add(0); test.Add(1); test.Add(2); int expected = 2; int actual; // act test.Remove(2); actual = test.Count; // assert Assert.AreEqual(expected, actual); }