Ejemplo n.º 1
0
        public void SelectWhenNotEmpty()
        {
            var numbers = new[] { 1, 2, 3 };

            Assert.That(MyEnumerable.Select(numbers, n => n + 1), Is.EquivalentTo(new[] { 2, 3, 4 }));
        }
Ejemplo n.º 2
0
        public void ThrowsWhenSourceIsNull()
        {
            IEnumerable <Int32> numbers = null;

            Assert.Throws <ArgumentNullException>(() => MyEnumerable.Select(numbers, n => n + 1));
        }
Ejemplo n.º 3
0
        public void SelectWhenEmpty()
        {
            var numbers = new List <Int32>();

            Assert.That(MyEnumerable.Select(numbers, n => n), Is.Empty);
        }