Esempio n. 1
0
 public void GetProductWithoutCategory_MethodSyntaxTest()
 {
     using (TablesDataContext dataContext = new TablesDataContext())
     {
         Table <Product> table    = dataContext.GetTable <Product>();
         List <Product>  products = table.ToList();
         products = products.GetProductsWithoutCategory_MethodSyntax();
         Assert.AreEqual(209, products.Count);
     }
 }
Esempio n. 2
0
 public void PaginateTest()
 {
     using (TablesDataContext dataContext = new TablesDataContext())
     {
         Table <Product> table     = dataContext.GetTable <Product>();
         List <Product>  products  = table.ToList();
         List <Product>  products2 = products.Paginate(10, 0);
         Assert.AreEqual(10, products2.Count);
         for (int i = 0; i < 10; i++)
         {
             Assert.AreEqual(products[i], products2[i]);
         }
     }
 }