public GarageItem Find(string id) { if (string.IsNullOrWhiteSpace(id)) { throw new ArgumentNullException("id"); } return(_repository.Find(id)); }
public void TestIfFindByLicenseReturnsCorrectVeichle() { //Arrange foreach (var vehicle in list) { garageRepository.Add(vehicle); } string expectedLicense = "NOP456"; //Act Vehicle veichle = garageRepository.Find(expectedLicense); //Assert Assert.IsNotNull(veichle); Assert.AreEqual(expectedLicense, veichle.LicensePlate); }