public async Task <IEnumerable <Product> > ProductByCategory(int CatId) { //Do code here return(await _groceryServices.GetProductByCategory(CatId)); //throw new NotImplementedException(); }
public async Task <bool> Testfor_Validate_GetProductByCategory() { //Arrange bool res = false; //Act groceryservice.Setup(repo => repo.GetProductByCategory(_product.CatId)); var result = await _groceryS.GetProductByCategory(_product.CatId); if (result != null) { res = true; } //Asert //final result displaying in text file await File.AppendAllTextAsync("../../../../output_revised.txt", "Testfor_Validate_GetProductByCategory=" + res + "\n"); return(res); }
public async Task <IEnumerable <Product> > ProductByCategory(int CatId) { return(await _groceryServices.GetProductByCategory(CatId)); }