public void RemoveDups_TwoEntries_OneRemoved() { var actual = CreateTwoEntries(); var expected = CreateTwoEntries(); LinkedListExtensions.DeleteDups(ref actual); Assert.AreEqual(expected.Value, actual.Value); Assert.AreEqual(null, actual.Next); }
public void RemoveDups_OneEntry_Same() { var actual = CreateOneEntry(); var expected = CreateOneEntry(); LinkedListExtensions.DeleteDups(ref actual); Assert.AreEqual(expected.Value, actual.Value); Assert.AreEqual(expected.Next, actual.Next); }
public void RemoveDups_SevenEntries_TwoRemoved() { var actual = CreateSevenEntries(); var expected = CreateSevenEntriesAnswer(); LinkedListExtensions.DeleteDups(ref actual); while (expected != null) { Assert.AreEqual(expected.Value, actual.Value); expected = expected.Next; actual = actual.Next; } Assert.AreEqual(expected, actual); }