@Test public void add_should_accept_doc_with_no_id_set() { TestDoc t = new TestDoc("f"); doNothing().when(db).create(t); repo.add(t); verify(db).create(eq(t)); }
public void add(T entity) { assertEntityNotNull(entity); Assert.isTrue(Documents.isNew(entity), "entity must be new"); db.create(entity); }
CouchDbRepositorySupport implements GenericRepository<T> { public void add(T entity) { assertEntityNotNull(entity); Assert.isTrue(Documents.isNew(entity), "entity must be new"); db.create(entity); } }
CouchDbRepositorySupport implements GenericRepository<T> { public void add(T entity) { assertEntityNotNull(entity); Assert.isTrue(Documents.isNew(entity), "entity must be new"); db.create(entity); } protected  CouchDbRepositorySupport(Class<T> type, CouchDbConnector db); protected  CouchDbRepositorySupport(Class<T> type, CouchDbConnector db, boolean createIfNotExists); protected  CouchDbRepositorySupport(Class<T> type, CouchDbConnector db, String designDocName); protected  CouchDbRepositorySupport(Class<T> type, CouchDbConnector db, String designDocName, boolean createIfNotExists); }
CouchDbRepositorySupport implements GenericRepository<T> { public void add(T entity) { assertEntityNotNull(entity); Assert.isTrue(Documents.isNew(entity), "entity must be new"); db.create(entity); } protected  CouchDbRepositorySupport(Class<T> type, CouchDbConnector db); protected  CouchDbRepositorySupport(Class<T> type, CouchDbConnector db, boolean createIfNotExists); protected  CouchDbRepositorySupport(Class<T> type, CouchDbConnector db, String designDocName); protected  CouchDbRepositorySupport(Class<T> type, CouchDbConnector db, String designDocName, boolean createIfNotExists); void add(T entity); List<T> getAll(); T get(String id); T get(String id, Options options); T get(String id, String rev); void remove(T entity); void update(T entity); void initStandardDesignDocument(); boolean contains(String docId); void setDesignDocumentFactory(
			DesignDocumentFactory df); }
CouchDbRepositorySupport implements GenericRepository<T> { public void add(T entity) { assertEntityNotNull(entity); Assert.isTrue(Documents.isNew(entity), "entity must be new"); db.create(entity); } protected  CouchDbRepositorySupport(Class<T> type, CouchDbConnector db); protected  CouchDbRepositorySupport(Class<T> type, CouchDbConnector db, boolean createIfNotExists); protected  CouchDbRepositorySupport(Class<T> type, CouchDbConnector db, String designDocName); protected  CouchDbRepositorySupport(Class<T> type, CouchDbConnector db, String designDocName, boolean createIfNotExists); void add(T entity); List<T> getAll(); T get(String id); T get(String id, Options options); T get(String id, String rev); void remove(T entity); void update(T entity); void initStandardDesignDocument(); boolean contains(String docId); void setDesignDocumentFactory(
			DesignDocumentFactory df); static final String AUTO_UPDATE_VIEW_ON_CHANGE; }