public void Setup() { //#region Mock Repository //Mock<IProductsRepository> mockRepo = new Mock<IProductsRepository>(); //mockRepo.Setup(x => x.GetAll()).Returns(new List<Product> { new Product { Id = 1, Name = "Gomato Goup", Category = "Goop", Price = 1 } }); //repo = mockRepo.Object; //#endregion repo = new ProductsRepository(); controller = new ProductsController(repo); }
public void Setup() { repo = new ProductsRepository(); controller = new ProductsController(repo); }