public void ThrowsWhenOverflowOccurs() { Assert.Throws <OverflowException>(() => MyEnumerable.Count(GetBigSequence())); }
public void CountWhenNotEmpty() { var numbers = new[] { 1, 2, 3, 4 }; Assert.That(MyEnumerable.Count(numbers), Is.EqualTo(4)); }
public void ThrowsWhenSourceIsNull() { IEnumerable <Int32> numbers = null; Assert.Throws <ArgumentNullException>(() => MyEnumerable.Count(numbers)); }
public void CountWhenEmpty() { var numbers = new List <Int32>(); Assert.That(MyEnumerable.Count(numbers), Is.EqualTo(0)); }