@Test public void testDelete() { Organization organization = new Organization(); organization.setName("testName"); Organization organizationCreated = organizationRepository.create(organization).blockingGet(); assertNotNull(organizationRepository.findById(organizationCreated.getId()).blockingGet()); TestObserver<Void> obs = organizationRepository.delete(organizationCreated.getId()).test(); obs.awaitTerminalEvent(); obs.assertNoValues(); assertNull(organizationRepository.findById(organizationCreated.getId()).blockingGet()); }
@Override public Completable delete(String id) { return Completable.fromPublisher(collection.deleteOne(eq(FIELD_ID, id))); }
MongoOrganizationRepository extends AbstractManagementMongoRepository implements OrganizationRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(collection.deleteOne(eq(FIELD_ID, id))); } }
MongoOrganizationRepository extends AbstractManagementMongoRepository implements OrganizationRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(collection.deleteOne(eq(FIELD_ID, id))); }  }
MongoOrganizationRepository extends AbstractManagementMongoRepository implements OrganizationRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(collection.deleteOne(eq(FIELD_ID, id))); }  @PostConstruct void init(); @Override Maybe<Organization> findById(String id); @Override Single<Organization> create(Organization organization); @Override Single<Organization> update(Organization organization); @Override Completable delete(String id); @Override Single<Long> count(); }
MongoOrganizationRepository extends AbstractManagementMongoRepository implements OrganizationRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(collection.deleteOne(eq(FIELD_ID, id))); }  @PostConstruct void init(); @Override Maybe<Organization> findById(String id); @Override Single<Organization> create(Organization organization); @Override Single<Organization> update(Organization organization); @Override Completable delete(String id); @Override Single<Long> count(); static final String FIELD_ID; }