public HttpResponseMessage Delete(int id) { var successAPIResult = new SuccessAPIResult() { Usage = "HttpDelete:~/api/Customers/{id} or {args} can be on querystring, {args?} are optional" }; successAPIResult.Successful = CustomerBusinessLayer.DeleteCustomer(id); if (!successAPIResult.Successful) { return(Request.CreateResponse(HttpStatusCode.NotFound, successAPIResult)); } return(Request.CreateResponse(HttpStatusCode.OK, successAPIResult)); }
public void WillCallDBLayerOnceWhenDelete() { CustomerBusinessLayer.DeleteCustomer(1); mockDBLayer.Verify(m => m.DeleteEntityByQuery <Customer>(It.IsAny <Query>()), Times.Once); }