예제 #1
0
        public void Take_AskingForMore_GetWhatIsThere()
        {
            var actual   = new RegularCollection().Take(10);
            var expected = new[] { 0, 1, 2, 3, 4 };

            CollectionAssert.AreEqual(expected, actual);
        }
예제 #2
0
        public void Select_NonemptyCollection_DoesTheConversion()
        {
            var actual   = new RegularCollection().Select <int, string>(x => x.ToString());
            var expected = new[] { "0", "1", "2", "3", "4" };

            CollectionAssert.AreEqual(expected, actual);
        }
예제 #3
0
        public void Take_AskingForLess_GetOnlyWhatWeAskFor()
        {
            var actual = new RegularCollection().Take(3);

            CollectionAssert.AreEqual(new[] { 0, 1, 2 }, actual);
        }