public void Delete() { Uri requestUri = new Uri("http://example.com"); HttpMethod requestMethod = HttpMethod.DELETE; Expect.Call <IClientHttpRequest>(requestFactory.CreateRequest(requestUri, requestMethod)).Return(request); ExpectGetResponse(); Expect.Call <bool>(errorHandler.HasError(requestUri, requestMethod, response)).Return(false); mocks.ReplayAll(); template.Delete("http://example.com"); }
public void DeleteBookmark(int bookmarkId) { EnsureIsAuthorized(); _restTemplate.Delete("bookmarks/" + bookmarkId); }