public void Distinct() { var numbers = new[] { 1, 2, 3, 3 }; Assert.That(MyEnumerable.Distinct(numbers), Is.EquivalentTo(new[] { 1, 2, 3 })); }
public void ThrowsWhenSourceIsNull() { IEnumerable <Int32> numbers = null; Assert.Throws <ArgumentNullException>(() => MyEnumerable.Distinct(numbers)); }
public void DistinctWhenEmpty() { var numbers = new List <Int32>(); Assert.That(MyEnumerable.Distinct(numbers), Is.Empty); }