public void CanDeleteSpecial() { Specials specialToAdd = new Specials(); var repo = new SpecialsRepositoryADO(); specialToAdd.SpecialTitle = "Test"; specialToAdd.SpecialDescription = "Test description"; repo.Insert(specialToAdd); var loaded = repo.GetByID(5); Assert.IsNotNull(loaded); repo.Delete(5); loaded = repo.GetByID(5); Assert.IsNull(loaded); }
public void CanGetSingleSpecial() { var repo = new SpecialsRepositoryADO(); var special = repo.GetByID(1); //(VehicleID, Year, Mileage, MSRP, UserID, SalesPrice, [Description], Picture, Featured, VIN, ModelID, ColorID, TypeID, TransmissionID, InteriorID) //(1, 2017, 0, 55450, '00000000-1111-1111-0000-000000000000', 52980, 'Great car, makes you feel alive!', null, 1, 'WBAVL1C50EVR93551', 1, 3, 1, 1, 2), --corvette Assert.AreEqual(1, special.SpecialID); Assert.AreEqual("Two for One Deal", special.SpecialTitle); Assert.AreEqual("Buy one, Get one doesnt just apply to the simple shopping. Come get one car and get a second for free!", special.SpecialDescription); }