public void MockCanLoadVehiclesBySearchTermYear(string year, int expectedCount) { var repo = new VehicleRepositoryMock(); var vehiclesDetail = repo.GetBySearchTerm(year).ToList(); Assert.IsNotEmpty(vehiclesDetail); Assert.AreEqual(expectedCount, vehiclesDetail.Count()); }
public void MockCanLoadSingleVehicleBySearchTermMake(string make, int expectedId) { var repo = new VehicleRepositoryMock(); var vehiclesDetail = repo.GetBySearchTerm(make).ToList(); Assert.IsNotEmpty(vehiclesDetail); Assert.AreEqual(1, vehiclesDetail.Count()); Assert.AreEqual(expectedId, vehiclesDetail[0].VehicleId); }