@Test public void testDelete() throws TechnicalException { ExtensionGrant extensionGrant = new ExtensionGrant(); extensionGrant.setName("testName"); ExtensionGrant extensionGrantCreated = extensionGrantRepository.create(extensionGrant).blockingGet(); TestObserver<ExtensionGrant> testObserver = extensionGrantRepository.findById(extensionGrantCreated.getId()).test(); testObserver.awaitTerminalEvent(); testObserver.assertComplete(); testObserver.assertNoErrors(); testObserver.assertValue(e -> e.getName().equals(extensionGrantCreated.getName())); TestObserver testObserver1 = extensionGrantRepository.delete(extensionGrantCreated.getId()).test(); testObserver1.awaitTerminalEvent(); extensionGrantRepository.findById(extensionGrantCreated.getId()).test().assertEmpty(); }
@Override public Completable delete(String id) { return Completable.fromPublisher(extensionGrantsCollection.deleteOne(eq(FIELD_ID, id))); }
MongoExtensionGrantRepository extends AbstractManagementMongoRepository implements ExtensionGrantRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(extensionGrantsCollection.deleteOne(eq(FIELD_ID, id))); } }
MongoExtensionGrantRepository extends AbstractManagementMongoRepository implements ExtensionGrantRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(extensionGrantsCollection.deleteOne(eq(FIELD_ID, id))); }  }
MongoExtensionGrantRepository extends AbstractManagementMongoRepository implements ExtensionGrantRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(extensionGrantsCollection.deleteOne(eq(FIELD_ID, id))); }  @PostConstruct void init(); @Override Single<Set<ExtensionGrant>> findByDomain(String domain); @Override Maybe<ExtensionGrant> findByDomainAndName(String domain, String name); @Override Maybe<ExtensionGrant> findById(String tokenGranterId); @Override Single<ExtensionGrant> create(ExtensionGrant item); @Override Single<ExtensionGrant> update(ExtensionGrant item); @Override Completable delete(String id); }
MongoExtensionGrantRepository extends AbstractManagementMongoRepository implements ExtensionGrantRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(extensionGrantsCollection.deleteOne(eq(FIELD_ID, id))); }  @PostConstruct void init(); @Override Single<Set<ExtensionGrant>> findByDomain(String domain); @Override Maybe<ExtensionGrant> findByDomainAndName(String domain, String name); @Override Maybe<ExtensionGrant> findById(String tokenGranterId); @Override Single<ExtensionGrant> create(ExtensionGrant item); @Override Single<ExtensionGrant> update(ExtensionGrant item); @Override Completable delete(String id);  }