Beispiel #1
0
        public void Distinct()
        {
            var numbers = new[] { 1, 2, 3, 3 };

            Assert.That(MyEnumerable.Distinct(numbers), Is.EquivalentTo(new[] { 1, 2, 3 }));
        }
Beispiel #2
0
        public void ThrowsWhenSourceIsNull()
        {
            IEnumerable <Int32> numbers = null;

            Assert.Throws <ArgumentNullException>(() => MyEnumerable.Distinct(numbers));
        }
Beispiel #3
0
        public void DistinctWhenEmpty()
        {
            var numbers = new List <Int32>();

            Assert.That(MyEnumerable.Distinct(numbers), Is.Empty);
        }