public void should_Create_New() { var newCar = new TestCar("Velar"); _testCarRepository.Create(newCar); var car = _testCarRepository.Find(newCar.Id); Assert.NotNull(car); Console.WriteLine(car); }
public void should_Delete_Exisitng_By_Id() { var car = _cars.First(); _testCarRepository.Delete(car.Id); _testCarRepository = new TestCarRepository(_context); var deletedCar = _testCarRepository.Find(car.Id); Assert.IsNull(deletedCar); }
public void should_Update_Exisitng() { var car = _cars.First(); car.Name = "GLE Benz"; _testCarRepository.Update(car); _testCarRepository = new TestCarRepository(_context); var updatedCar = _testCarRepository.Find(car.Id); Assert.AreEqual("GLE Benz", updatedCar.Name); Console.WriteLine(updatedCar); }