Exemplo n.º 1
0
        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");
        }
Exemplo n.º 2
0
 private void ReturnNotFoundForDelete()
 {
     client.DeleteAsync(Arg.Any <string>()).Returns(new HttpResponseMessage(HttpStatusCode.NotFound));
 }