@Test public void testDelete() throws TechnicalException { Certificate certificate = new Certificate(); certificate.setName("testName"); Certificate certificateCreated = certificateRepository.create(certificate).blockingGet(); TestObserver<Certificate> testObserver = certificateRepository.findById(certificateCreated.getId()).test(); testObserver.awaitTerminalEvent(); testObserver.assertComplete(); testObserver.assertNoErrors(); testObserver.assertValue(d -> d.getName().equals(certificateCreated.getName())); TestObserver testObserver1 = certificateRepository.delete(certificateCreated.getId()).test(); testObserver1.awaitTerminalEvent(); certificateRepository.findById(certificateCreated.getId()).test().assertEmpty(); }
@Override public Completable delete(String id) { return Completable.fromPublisher(certificatesCollection.deleteOne(eq(FIELD_ID, id))); }
MongoCertificateRepository extends AbstractManagementMongoRepository implements CertificateRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(certificatesCollection.deleteOne(eq(FIELD_ID, id))); } }
MongoCertificateRepository extends AbstractManagementMongoRepository implements CertificateRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(certificatesCollection.deleteOne(eq(FIELD_ID, id))); }  }
MongoCertificateRepository extends AbstractManagementMongoRepository implements CertificateRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(certificatesCollection.deleteOne(eq(FIELD_ID, id))); }  @PostConstruct void init(); @Override Single<Set<Certificate>> findByDomain(String domain); @Override Single<Set<Certificate>> findAll(); @Override Maybe<Certificate> findById(String certificateId); @Override Single<Certificate> create(Certificate item); @Override Single<Certificate> update(Certificate item); @Override Completable delete(String id); }
MongoCertificateRepository extends AbstractManagementMongoRepository implements CertificateRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(certificatesCollection.deleteOne(eq(FIELD_ID, id))); }  @PostConstruct void init(); @Override Single<Set<Certificate>> findByDomain(String domain); @Override Single<Set<Certificate>> findAll(); @Override Maybe<Certificate> findById(String certificateId); @Override Single<Certificate> create(Certificate item); @Override Single<Certificate> update(Certificate item); @Override Completable delete(String id);  }