@Test public void testDelete() throws TechnicalException { Application app = new Application(); app.setName("testClientId"); Application appCreated = applicationRepository.create(app).blockingGet(); TestObserver<Application> testObserver = applicationRepository.findById(appCreated.getId()).test(); testObserver.awaitTerminalEvent(); testObserver.assertComplete(); testObserver.assertNoErrors(); testObserver.assertValue(a -> a.getName().equals(app.getName())); TestObserver testObserver1 = applicationRepository.delete(appCreated.getId()).test(); testObserver1.awaitTerminalEvent(); applicationRepository.findById(appCreated.getId()).test().assertEmpty(); }
@Override public Completable delete(String id) { return Completable.fromPublisher(applicationsCollection.deleteOne(eq(FIELD_ID, id))); }
MongoApplicationRepository extends AbstractManagementMongoRepository implements ApplicationRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(applicationsCollection.deleteOne(eq(FIELD_ID, id))); } }
MongoApplicationRepository extends AbstractManagementMongoRepository implements ApplicationRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(applicationsCollection.deleteOne(eq(FIELD_ID, id))); }  }
MongoApplicationRepository extends AbstractManagementMongoRepository implements ApplicationRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(applicationsCollection.deleteOne(eq(FIELD_ID, id))); }  @PostConstruct void init(); @Override Single<List<Application>> findAll(); @Override Single<Page<Application>> findAll(int page, int size); @Override Single<Page<Application>> findByDomain(String domain, int page, int size); @Override Single<Page<Application>> search(String domain, String query, int page, int size); @Override Single<Set<Application>> findByCertificate(String certificate); @Override Single<Set<Application>> findByIdentityProvider(String identityProvider); @Override Single<Set<Application>> findByFactor(String factor); @Override Maybe<Application> findById(String id); @Override Maybe<Application> findByDomainAndClientId(String domain, String clientId); @Override Single<Set<Application>> findByDomainAndExtensionGrant(String domain, String extensionGrant); @Override Single<Set<Application>> findByIdIn(List<String> ids); @Override Single<Application> create(Application item); @Override Single<Application> update(Application item); @Override Completable delete(String id); @Override Single<Long> count(); @Override Single<Long> countByDomain(String domain); }
MongoApplicationRepository extends AbstractManagementMongoRepository implements ApplicationRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(applicationsCollection.deleteOne(eq(FIELD_ID, id))); }  @PostConstruct void init(); @Override Single<List<Application>> findAll(); @Override Single<Page<Application>> findAll(int page, int size); @Override Single<Page<Application>> findByDomain(String domain, int page, int size); @Override Single<Page<Application>> search(String domain, String query, int page, int size); @Override Single<Set<Application>> findByCertificate(String certificate); @Override Single<Set<Application>> findByIdentityProvider(String identityProvider); @Override Single<Set<Application>> findByFactor(String factor); @Override Maybe<Application> findById(String id); @Override Maybe<Application> findByDomainAndClientId(String domain, String clientId); @Override Single<Set<Application>> findByDomainAndExtensionGrant(String domain, String extensionGrant); @Override Single<Set<Application>> findByIdIn(List<String> ids); @Override Single<Application> create(Application item); @Override Single<Application> update(Application item); @Override Completable delete(String id); @Override Single<Long> count(); @Override Single<Long> countByDomain(String domain);  }