public async Task <List <SearchViewModel> > SearchByName(ByName byName) { var results = await _repository.SearchByName(1, byName.SearchValue); return(SearchViewModel.FromItemModels(results)); }
public void Should_MatchCount_WhenMapping_From_List(List <Item> searchResults) { var viewModels = SearchViewModel.FromItemModels(searchResults); searchResults.Count.ShouldBe(viewModels.Count); }