public IActionResult Index() { var model = new SearchViewModel(); var gateway = new InMemorySearchGateway(); var cars = gateway.GetCars(); model.Cars = cars.Select(x => SearchCarViewModelMapper.Map(x)).ToList(); return(View()); }
public void ShouldREturnCars() { //Arrange //Act var results = _gateway.GetCars(); //Assert Assert.NotNull(results); Assert.Equal(2, results.Count()); }