Exemplo n.º 1
0
        public void Linq2UsingGroup_CustomersAndSuppliers_2CustomersHaveSuppliers()
        {
            var result = LinqTask.Linq2UsingGroup(DataSource.Customers, DataSource.Suppliers).ToList();

            Assert.That(() => result.Count, Is.EqualTo(DataSource.Customers.Count));
            foreach (var(customer, suppliers) in result)
            {
                foreach (var supplier in suppliers)
                {
                    StringAssert.AreEqualIgnoringCase(customer.City, supplier.City);
                    StringAssert.AreEqualIgnoringCase(customer.Country, supplier.Country);
                }
            }
        }
Exemplo n.º 2
0
 public void Linq2UsingGroup_NullCustomer_ThrowsArgumentNullException()
 {
     Assert.That(() => LinqTask.Linq2UsingGroup(null, null).ToList(), Throws.ArgumentNullException);
 }