public ViewResult Index()
{
var catalogItems = _shopCatalogService.ListCatalogItems();
var viewModel = new ShopCatalogViewModel {CatalogItems = catalogItems};
return View(viewModel);
}
public void IndexShouldRetrivedListItemsFromService() { var service = new Mock<IShopCatalogService>(); var shopCatalogController = new ShopCatalogController(service.Object); shopCatalogController.Index(); service.Verify(x => x.ListCatalogItems()); }