Beispiel #1
0
        public static void Prepend1()
        {
            IEnumerable <int> source = new ThrowingEnumerable <int>();

            var q = Assert.DoesNotThrow(() => source.Prepend(1));

            // We bypass the first iteration (we just prepended 1 to the sequence,
            // iterating won't throw immediately).
            Assert.ThrowsAfter(q, 1);
        }