public void Remove_should_return_true_if_item_has_been_deleted() { //Arrange var list = new Structures.LinkedList <int>(); list.AddLast(1); //Act var result = list.Remove(1); //Assert Assert.True(result); }
public void Remove_should_return_false_if_item_does_not_exist() { //Arrange var list = new Structures.LinkedList <int>(); list.AddLast(1); //Act var result = list.Remove(2); //Assert Assert.False(result); }
public void Remove_should_decrease_count_if_success() { //Arrange var list = new Structures.LinkedList <int>(); list.AddLast(1); var expectedLength = list.Length - 1; //Act list.Remove(1); var length = list.Length; //Assert Assert.AreEqual(expectedLength, length); }
public void Remove_should_remove_first_occurence_of_item() { //Arrange var list = new Structures.LinkedList <int>(); list.AddLast(1); list.AddLast(2); list.AddLast(1); string expectedResult = "21"; //Act list.Remove(1); //Assert Assert.AreEqual(expectedResult, GetStringOfElements(list)); }