public virtual async Task <bool> DeleteCharge(string identifier) { string requestUri = string.Format("{0}/api/charges/addcharge/{1}", server, identifier); var result = await client.DeleteAsync(requestUri); if (result.StatusCode == HttpStatusCode.OK) { return(true); } if (result.StatusCode == HttpStatusCode.NotFound) { return(false); } throw new Exception("TODO"); }
private void ReturnNotFoundForDelete() { client.DeleteAsync(Arg.Any <string>()).Returns(new HttpResponseMessage(HttpStatusCode.NotFound)); }