public void MultipleElementSequenceDoesNotIterate()
 {
     IEnumerableWithCount<int> source = new ThrowingEnumerable(2);
     Assert.Throws<InvalidOperationException>(() => source.SingleOrDefault());
 }
 public void EmptySequenceDoesNotIterate()
 {
     IEnumerableWithCount<int> source = new ThrowingEnumerable(0);
     Assert.AreEqual(0, source.SingleOrDefault());
 }