@Test public void testDelete() throws TechnicalException { Domain domain = new Domain(); domain.setName("testName"); Domain domainCreated = domainRepository.create(domain).blockingGet(); TestObserver<Domain> testObserver = domainRepository.findById(domainCreated.getId()).test(); testObserver.awaitTerminalEvent(); testObserver.assertComplete(); testObserver.assertNoErrors(); testObserver.assertValue(d -> d.getName().equals(domain.getName())); TestObserver testObserver1 = domainRepository.delete(domainCreated.getId()).test(); testObserver1.awaitTerminalEvent(); domainRepository.findById(domainCreated.getId()).test().assertEmpty(); }
@Override public Completable delete(String id) { return Completable.fromPublisher(domainsCollection.deleteOne(eq(FIELD_ID, id))); }
MongoDomainRepository extends AbstractManagementMongoRepository implements DomainRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(domainsCollection.deleteOne(eq(FIELD_ID, id))); } }
MongoDomainRepository extends AbstractManagementMongoRepository implements DomainRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(domainsCollection.deleteOne(eq(FIELD_ID, id))); }  }
MongoDomainRepository extends AbstractManagementMongoRepository implements DomainRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(domainsCollection.deleteOne(eq(FIELD_ID, id))); }  @PostConstruct void init(); @Override Single<Set<Domain>> findAll(); @Override Maybe<Domain> findById(String id); @Override Single<Set<Domain>> findByIdIn(Collection<String> ids); @Override Flowable<Domain> findAllByEnvironment(String environmentId); @Override Maybe<Domain> findMaster(); @Override Single<Domain> create(Domain item); @Override Single<Domain> update(Domain item); @Override Completable delete(String id); }
MongoDomainRepository extends AbstractManagementMongoRepository implements DomainRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(domainsCollection.deleteOne(eq(FIELD_ID, id))); }  @PostConstruct void init(); @Override Single<Set<Domain>> findAll(); @Override Maybe<Domain> findById(String id); @Override Single<Set<Domain>> findByIdIn(Collection<String> ids); @Override Flowable<Domain> findAllByEnvironment(String environmentId); @Override Maybe<Domain> findMaster(); @Override Single<Domain> create(Domain item); @Override Single<Domain> update(Domain item); @Override Completable delete(String id);  }