Ejemplo n.º 1
0
 @Test
 public void testDelete() {
   when(httpClient.delete(anyString()))
       .thenReturn(HttpResponseStub.valueOf(200, "{\"ok\":true,\"rev\":\"123D123\"}"));
   dbCon.delete("some_id", "123D123");
   verify(httpClient).delete("/test_db/some_id?rev=123D123");
 }
Ejemplo n.º 2
0
 @Test
 public void testDeleteCouchDbDocument() {
   td.setId("some_id");
   td.setRevision("123D123");
   setupGetDocResponse();
   when(httpClient.delete(anyString()))
       .thenReturn(HttpResponseStub.valueOf(200, "{\"ok\":true,\"rev\":\"123D123\"}"));
   dbCon.delete(td);
   verify(httpClient).delete("/test_db/some_id?rev=123D123");
 }