示例#1
0
 public void TestMethod1()
 {
     using (var model = new KreationModel())
     {
         Cart        cart  = model.Carts.FirstOrDefault(i => i.Id == 5);
         List <Sale> sales = cart.GetCartList();
     }
 }
示例#2
0
 public void GetCurrentHighestBidTest2()
 {
     using (var model = new KreationModel())
     {
         var auction5 = model.Auctions.FirstOrDefault(i => i.Id == 5); //get auction with Id == 5
         Assert.AreEqual(8, auction5.GetCurrentHighestBidId());        //
     }
 }
示例#3
0
 public void GetWinningBidTest2()
 {
     using (var model = new KreationModel())
     {
         var auction5 = model.Auctions.FirstOrDefault(i => i.Id == 5); //get auction with Id == 5
         auction5.GetWinningBid();
     }
 }
示例#4
0
 public void GetCurrentHighestBidTest1()
 {
     using (var model = new KreationModel())
     {
         var auction2 = model.Auctions.FirstOrDefault(i => i.Id == 2); //get auction with Id == 2
         Assert.AreEqual(10, auction2.GetCurrentHighestBidId());
     }
 }
示例#5
0
        public void TestMethod1()
        {
            using (var model = new KreationModel())
            {
                Seller      seller1 = model.Sellers.FirstOrDefault(i => i.Id == 1); //get Seller with Id == 1
                List <Sale> sales   = seller1.Sales.ToList();                       //get the list of total sales by the seller

                //should return sales list with Id 2, 3, 4
                Assert.AreEqual(2, sales[0].Id);
                Assert.AreEqual(3, sales[1].Id);
                Assert.AreEqual(4, sales[2].Id);
            }
        }