Exemplo n.º 1
0
        public void TestTakeNested()
        {
            IEnumerable <CustomerOrderDto> actual   = Partitioning.TakeNested();
            IEnumerable <CustomerOrderDto> expected =
                new CustomerOrderDto[]
            {
                new CustomerOrderDto()
                {
                    CustomerId = "LAZYK", OrderId = 10482
                },
                new CustomerOrderDto()
                {
                    CustomerId = "LAZYK", OrderId = 10545
                },
                new CustomerOrderDto()
                {
                    CustomerId = "TRAIH", OrderId = 10574
                }
            };

            CollectionAssert.AreEqual(actual.ToList(), expected.ToList(), "You failed!");
        }
Exemplo n.º 2
0
        public void TestSelectMany()
        {
            IEnumerable <CustomerOrderDto> actual   = Projection.SelectMany();
            IEnumerable <CustomerOrderDto> expected =
                new CustomerOrderDto[] {
                new CustomerOrderDto()
                {
                    CustomerId = "LAZYK", OrderId = 10482
                },
                new CustomerOrderDto()
                {
                    CustomerId = "LAZYK", OrderId = 10545
                },
                new CustomerOrderDto()
                {
                    CustomerId = "TRAIH", OrderId = 10574
                },
                new CustomerOrderDto()
                {
                    CustomerId = "TRAIH", OrderId = 10577
                },
                new CustomerOrderDto()
                {
                    CustomerId = "TRAIH", OrderId = 10822
                },
                new CustomerOrderDto()
                {
                    CustomerId = "WHITC", OrderId = 10469
                },
                new CustomerOrderDto()
                {
                    CustomerId = "WHITC", OrderId = 10483
                },
                new CustomerOrderDto()
                {
                    CustomerId = "WHITC", OrderId = 10504
                },
                new CustomerOrderDto()
                {
                    CustomerId = "WHITC", OrderId = 10596
                },
                new CustomerOrderDto()
                {
                    CustomerId = "WHITC", OrderId = 10693
                },
                new CustomerOrderDto()
                {
                    CustomerId = "WHITC", OrderId = 10696
                },
                new CustomerOrderDto()
                {
                    CustomerId = "WHITC", OrderId = 10723
                },
                new CustomerOrderDto()
                {
                    CustomerId = "WHITC", OrderId = 10740
                },
                new CustomerOrderDto()
                {
                    CustomerId = "WHITC", OrderId = 10861
                },
                new CustomerOrderDto()
                {
                    CustomerId = "WHITC", OrderId = 10904
                },
                new CustomerOrderDto()
                {
                    CustomerId = "WHITC", OrderId = 11032
                },
                new CustomerOrderDto()
                {
                    CustomerId = "WHITC", OrderId = 11066
                }
            };

            CollectionAssert.AreEqual(actual.ToList(), expected.ToList(), "You failed!");
        }
Exemplo n.º 3
0
        public void TestSkipNested()
        {
            IEnumerable <CustomerOrderDto> actual   = Partitioning.SkipNested();
            IEnumerable <CustomerOrderDto> expected =
                new CustomerOrderDto[]
            {
                new CustomerOrderDto()
                {
                    CustomerId = "TRAIH", OrderId = 10574
                },
                new CustomerOrderDto()
                {
                    CustomerId = "TRAIH", OrderId = 10577
                },
                new CustomerOrderDto()
                {
                    CustomerId = "TRAIH", OrderId = 10822
                },
                new CustomerOrderDto()
                {
                    CustomerId = "WHITC", OrderId = 10269
                },
                new CustomerOrderDto()
                {
                    CustomerId = "WHITC", OrderId = 10344
                },
                new CustomerOrderDto()
                {
                    CustomerId = "WHITC", OrderId = 10469
                },
                new CustomerOrderDto()
                {
                    CustomerId = "WHITC", OrderId = 10483
                },
                new CustomerOrderDto()
                {
                    CustomerId = "WHITC", OrderId = 10504
                },
                new CustomerOrderDto()
                {
                    CustomerId = "WHITC", OrderId = 10596
                },
                new CustomerOrderDto()
                {
                    CustomerId = "WHITC", OrderId = 10693
                },
                new CustomerOrderDto()
                {
                    CustomerId = "WHITC", OrderId = 10696
                },
                new CustomerOrderDto()
                {
                    CustomerId = "WHITC", OrderId = 10723
                },
                new CustomerOrderDto()
                {
                    CustomerId = "WHITC", OrderId = 10740
                },
                new CustomerOrderDto()
                {
                    CustomerId = "WHITC", OrderId = 10861
                },
                new CustomerOrderDto()
                {
                    CustomerId = "WHITC", OrderId = 10904
                },
                new CustomerOrderDto()
                {
                    CustomerId = "WHITC", OrderId = 11032
                },
                new CustomerOrderDto()
                {
                    CustomerId = "WHITC", OrderId = 11066
                }
            };

            CollectionAssert.AreEqual(actual.ToList(), expected.ToList(), "You failed!");
        }