public void RemoveDup_ReturnsListWithDuplicatesRemoved() { Problem_01.RemoveDups(LIST_WITH_DUPLICATES); // Checking lists are equal. using (var e1 = LIST_WITH_DUPLICATES.GetEnumerator()) using (var e2 = LIST_WITHOUT_DUPLICATES.GetEnumerator()) { while (e1.MoveNext() && e2.MoveNext()) { if (!e1.Current.Equals(e2.Current)) { Assert.Fail(); } } } }
public void IsUnique_ReturnsFalseForNonUniqueCharsString() { var result = Problem_01.IsUnique(NON_UNIQUE_CHARS_STRING); Assert.IsFalse(result); }
public void IsUnique_ReturnsTrueForUniqueCharsString() { var result = Problem_01.IsUnique(UNIQUE_CHARS_STRING); Assert.IsTrue(result); }