public DeleteShould() : base() { using (var repo = new SQLCarRepository(options)) { repo.CreateCar(carToDelete); } }
public void AddCarToTableReturn() { using (var Repo = new SQLCarRepository(options)) { var MadeCar = Repo.CreateCar(CarToCreate); MadeCar.Equals(ExpectedCar).ShouldBeTrue(); } }
public void GetCarByIdFromTable() { using (var Repo = new SQLCarRepository(options)) { Repo.CreateCar(CarToCreate); var GetCarById = Repo.GetCar(1); GetCarById.Equals(ExpectedCar).ShouldBeTrue(); } }
public void GetAllCarsFromTable() { using (var Repo = new SQLCarRepository(options)) { Repo.CreateCar(CarToCreate); var GetAllCars = Repo.GetAll(); GetAllCars.Contains(ExpectedCar).ShouldBeTrue(); } }
public void UpdateCarReturnsUpdatedCar() { using (var repo = new SQLCarRepository(options)) { repo.CreateCar(CarToCreate); } using (var Repo = new SQLCarRepository(options)) { var UpdatedCar = Repo.UpdateCar(CarToUpdate); UpdatedCar.Equals(ExpectedCar).ShouldBeTrue(); } }
public void AddCarToTable() { using (var Repo = new SQLCarRepository(options)) { Repo.Cars.Count().ShouldBe(0); Repo.CreateCar(CarToCreate); } using (var Repo = new SQLCarRepository(options)) { Repo.Cars.Count().ShouldBe(1); Repo.Cars.Single().Equals(ExpectedCar).ShouldBeTrue(); } }
public void UpdateCarInDB() { using (var repo = new SQLCarRepository(options)) { repo.CreateCar(CarToCreate); } using (var repo = new SQLCarRepository(options)) { repo.UpdateCar(CarToUpdate); } using (var repo = new SQLCarRepository(options)) { repo.Cars.Single().Equals(ExpectedCar).ShouldBeTrue(); } }