public ActionResult EditProduct(int productId) { var productDataService = new ProductDataService(); var product = productDataService.GetProductById(productId); return(PartialView(new ProductViewModel(product))); }
public void GetProductById() { //Arrange var service = new ProductDataService(repository); //Act var product = service.GetProductById(1); //Assert Assert.IsNotNull(product); }