public IActionResult GetCategoryList() { //Do code here return(Ok(_groceryServices.CategoryList())); //throw new NotImplementedException(); }
public IActionResult GetCategoryList() { if (!ModelState.IsValid) { return(BadRequest()); } var getcategory = _groceryServices.CategoryList(); if (getcategory == null) { return(NotFound()); } return(CreatedAtAction("AllProduct", getcategory)); }
public async Task <bool> Testfor_Validate_GetCategorylist() { //Arrange bool res = false; //Act groceryservice.Setup(repo => repo.CategoryList()); var result = _groceryS.CategoryList(); if (result != null) { res = true; } //Asert //final result displaying in text file await File.AppendAllTextAsync("../../../../output_revised.txt", "Testfor_Validate_GetCategorylist=" + res + "\n"); return(res); }