@Test public void testDelete() { Scope scope = new Scope(); scope.setName("testName"); Scope scopeCreated = scopeRepository.create(scope).blockingGet(); TestObserver<Scope> testObserver = scopeRepository.findById(scopeCreated.getId()).test(); testObserver.awaitTerminalEvent(); testObserver.assertComplete(); testObserver.assertNoErrors(); testObserver.assertValue(s -> s.getName().equals(scope.getName())); TestObserver testObserver1 = scopeRepository.delete(scopeCreated.getId()).test(); testObserver1.awaitTerminalEvent(); scopeRepository.findById(scopeCreated.getId()).test().assertEmpty(); }
@Override public Completable delete(String id) { return Completable.fromPublisher(scopesCollection.deleteOne(eq(FIELD_ID, id))); }
MongoScopeRepository extends AbstractManagementMongoRepository implements ScopeRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(scopesCollection.deleteOne(eq(FIELD_ID, id))); } }
MongoScopeRepository extends AbstractManagementMongoRepository implements ScopeRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(scopesCollection.deleteOne(eq(FIELD_ID, id))); }  }
MongoScopeRepository extends AbstractManagementMongoRepository implements ScopeRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(scopesCollection.deleteOne(eq(FIELD_ID, id))); }  @PostConstruct void init(); @Override Maybe<Scope> findById(String id); @Override Single<Scope> create(Scope item); @Override Single<Scope> update(Scope item); @Override Completable delete(String id); @Override Single<Set<Scope>> findByDomain(String domain); @Override Maybe<Scope> findByDomainAndKey(String domain, String key); @Override Single<List<Scope>> findByDomainAndKeys(String domain, List<String> keys); }
MongoScopeRepository extends AbstractManagementMongoRepository implements ScopeRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(scopesCollection.deleteOne(eq(FIELD_ID, id))); }  @PostConstruct void init(); @Override Maybe<Scope> findById(String id); @Override Single<Scope> create(Scope item); @Override Single<Scope> update(Scope item); @Override Completable delete(String id); @Override Single<Set<Scope>> findByDomain(String domain); @Override Maybe<Scope> findByDomainAndKey(String domain, String key); @Override Single<List<Scope>> findByDomainAndKeys(String domain, List<String> keys);  }