public EntityCategory Get(int id) { var result = _categoryService.GetCategory(id); if (result == null) { throw new HttpResponseException(Request.CreateResponse(HttpStatusCode.NotFound)); } return(result); }
public void GetCategory() { mock.Setup(x => x.Categories); ServiceCategory service = new ServiceCategory(mock.Object); CategoryDTO res = service.GetCategory(null); }