public void UniqueInOrder_CollectionContainsNull_RemovesNullFromReturnedValue() { var sequence = "AAAABBBCCDAABBB"; var expected = new[] { 'A', 'B', 'C', 'D', 'A', 'B' }; var actual = CollectionParser.UniqueInOrder(sequence.Cast <char>()).ToArray(); CollectionAssert.AreEqual(expected, actual); }
public void UniqueInOrder_EmptyCollection_ReturnsEmpty() { var actual = CollectionParser.UniqueInOrder(Enumerable.Empty <char>()); CollectionAssert.AreEqual(new char[0], actual.ToArray(), string.Join(',', actual)); }