@Test public void testPutDesignDocument() throws Exception { deleteIfExists(getTestDB()); CouchDBConnection db = client.createDB(getTestDB()); try { db.putDesignDocument("not json"); fail("expected error"); } catch (CouchDBException ex) { assertTrue("expected reason", ex.getMessage().indexOf("invalid UTF-8 JSON") >= 0); } db.putDesignDocument(resolveFile("design-doc.json")); }
public void putDesignDocument(String content) throws IOException, CouchDBException { CouchDBResponse resp = client.put(uri(PATH_DESIGN_MAIN),content); resp.checkOK("Error putting design document"); }
CouchDBConnection extends CouchDBClient.Component { public void putDesignDocument(String content) throws IOException, CouchDBException { CouchDBResponse resp = client.put(uri(PATH_DESIGN_MAIN),content); resp.checkOK("Error putting design document"); } }
CouchDBConnection extends CouchDBClient.Component { public void putDesignDocument(String content) throws IOException, CouchDBException { CouchDBResponse resp = client.put(uri(PATH_DESIGN_MAIN),content); resp.checkOK("Error putting design document"); } CouchDBConnection(CouchDBResponse resp, CouchDBClient client); }
CouchDBConnection extends CouchDBClient.Component { public void putDesignDocument(String content) throws IOException, CouchDBException { CouchDBResponse resp = client.put(uri(PATH_DESIGN_MAIN),content); resp.checkOK("Error putting design document"); } CouchDBConnection(CouchDBResponse resp, CouchDBClient client); CouchDBSpatialView spatialView(String spatialViewName); CouchDBView view(String viewName); String getName(); void delete(); void postBulk(JSONArray docs); void postBulk(String content); void putDesignDocument(String content); void putDesignDocument(File content); JSONObject getDesignDocument(); void postBulk(RequestEntity entity); }
CouchDBConnection extends CouchDBClient.Component { public void putDesignDocument(String content) throws IOException, CouchDBException { CouchDBResponse resp = client.put(uri(PATH_DESIGN_MAIN),content); resp.checkOK("Error putting design document"); } CouchDBConnection(CouchDBResponse resp, CouchDBClient client); CouchDBSpatialView spatialView(String spatialViewName); CouchDBView view(String viewName); String getName(); void delete(); void postBulk(JSONArray docs); void postBulk(String content); void putDesignDocument(String content); void putDesignDocument(File content); JSONObject getDesignDocument(); void postBulk(RequestEntity entity);  }