use of com.cloudant.client.api.model.Response in project java-cloudant by cloudant.
the class DocumentsCRUDTest method findJsonObject.
@Test
public void findJsonObject() {
Response response = db.save(new Foo());
JsonObject jsonObject = db.find(JsonObject.class, response.getId());
assertNotNull(jsonObject);
}
use of com.cloudant.client.api.model.Response in project java-cloudant by cloudant.
the class DocumentsCRUDTest method findByIdContainSlash.
@Test
public void findByIdContainSlash() {
Response response = db.save(new Foo(generateUUID() + "/" + generateUUID()));
Foo foo = db.find(Foo.class, response.getId());
assertNotNull(foo);
Foo foo2 = db.find(Foo.class, response.getId(), response.getRev());
assertNotNull(foo2);
}
use of com.cloudant.client.api.model.Response in project java-cloudant by cloudant.
the class DocumentsCRUDTest method deleteObject.
// Delete
@Test
public void deleteObject() {
Response response = db.save(new Foo());
Foo foo = db.find(Foo.class, response.getId());
db.remove(foo);
}
use of com.cloudant.client.api.model.Response in project java-cloudant by cloudant.
the class DocumentsCRUDTest method update.
// Update
@Test
public void update() {
Response response = db.save(new Foo());
Foo foo = db.find(Foo.class, response.getId());
db.update(foo);
}
use of com.cloudant.client.api.model.Response in project java-cloudant by cloudant.
the class DocumentsCRUDTest method contains.
@Test
public void contains() {
Response response = db.save(new Foo());
boolean found = db.contains(response.getId());
assertTrue(found);
found = db.contains(generateUUID());
assertFalse(found);
}
Aggregations