예제 #1
0
        public void InnerKeySelectorNullNoComparer()
        {
            CustomerRec[] outer = new CustomerRec[]
            {
                new CustomerRec {
                    name = "Tim", custID = 1234
                },
                new CustomerRec {
                    name = "Bob", custID = 9865
                },
                new CustomerRec {
                    name = "Robert", custID = 9895
                }
            };
            AnagramRec[] inner = new AnagramRec[]
            {
                new AnagramRec {
                    name = "Robert", orderID = 93483, total = 19
                },
                new AnagramRec {
                    name = "miT", orderID = 93489, total = 45
                }
            };

            AssertExtensions.Throws <ArgumentNullException>("innerKeySelector", () => outer.AsNaturalQueryable().GroupJoin(inner.AsNaturalQueryable(), e => e.name, null, (cr, arIE) => new JoinRec {
                name = cr.name, orderID = arIE.Select(o => o.orderID).ToArray(), total = arIE.Select(o => o.total).ToArray()
            }));
        }
예제 #2
0
        public void ResultSelectorNullNoComparer()
        {
            CustomerRec[] outer = new CustomerRec[]
            {
                new CustomerRec {
                    name = "Tim", custID = 1234
                },
                new CustomerRec {
                    name = "Bob", custID = 9865
                },
                new CustomerRec {
                    name = "Robert", custID = 9895
                }
            };
            AnagramRec[] inner = new AnagramRec[]
            {
                new AnagramRec {
                    name = "Robert", orderID = 93483, total = 19
                },
                new AnagramRec {
                    name = "miT", orderID = 93489, total = 45
                }
            };

            AssertExtensions.Throws <ArgumentNullException>("resultSelector", () => outer.AsNaturalQueryable().GroupJoin(inner.AsNaturalQueryable(), e => e.name, e => e.name, (Expression <Func <CustomerRec, IEnumerable <AnagramRec>, JoinRec> >)null));
        }
예제 #3
0
        public void OuterNullNoComparer()
        {
            IQueryable <CustomerRec> outer = null;

            AnagramRec[] inner = new AnagramRec[]
            {
                new AnagramRec {
                    name = "Robert", orderID = 93483, total = 19
                },
                new AnagramRec {
                    name = "miT", orderID = 93489, total = 45
                }
            };

            AssertExtensions.Throws <ArgumentNullException>("outer", () => outer.GroupJoin(inner.AsNaturalQueryable(), e => e.name, e => e.name, (cr, arIE) => new JoinRec {
                name = cr.name, orderID = arIE.Select(o => o.orderID).ToArray(), total = arIE.Select(o => o.total).ToArray()
            }));
        }