public void Save_SavesToDatabase_BuyOfferList() { DateTime dt = new DateTime(2008, 3, 9, 16, 5, 7); Buy_Offer testBuy_Offer = new Buy_Offer(1, dt, 2, 3, "a", 4, 0); testBuy_Offer.Save(); List <Buy_Offer> result = Buy_Offer.GetAll(); List <Buy_Offer> testList = new List <Buy_Offer> { testBuy_Offer }; CollectionAssert.AreEqual(testList, result); }
public void Delete_DeleteRemovesBuy_Offer_Buy_OfferList() { DateTime dt = new DateTime(2008, 3, 9, 16, 5, 7); Buy_Offer testBuy_Offer = new Buy_Offer(1, dt, 2, 3, "a", 4, 0); testBuy_Offer.Save(); testBuy_Offer.Delete(); List <Buy_Offer> testList = new List <Buy_Offer> { }; List <Buy_Offer> result = Buy_Offer.GetAll(); CollectionAssert.AreEqual(testList, result); }
public void GetAll_DatabaseEmptyAtFirst_0() { int result = Buy_Offer.GetAll().Count; Assert.AreEqual(0, result); }