@Test public void testDelete() throws TechnicalException { Factor factor = new Factor(); factor.setName("testName"); Factor factorCreated = factorRepository.create(factor).blockingGet(); TestObserver<Factor> testObserver = factorRepository.findById(factorCreated.getId()).test(); testObserver.awaitTerminalEvent(); testObserver.assertComplete(); testObserver.assertNoErrors(); testObserver.assertValue(f -> f.getName().equals(factorCreated.getName())); TestObserver testObserver1 = factorRepository.delete(factorCreated.getId()).test(); testObserver1.awaitTerminalEvent(); factorRepository.findById(factorCreated.getId()).test().assertEmpty(); }
@Override public Completable delete(String id) { return Completable.fromPublisher(factorsCollection.deleteOne(eq(FIELD_ID, id))); }
MongoFactorRepository extends AbstractManagementMongoRepository implements FactorRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(factorsCollection.deleteOne(eq(FIELD_ID, id))); } }
MongoFactorRepository extends AbstractManagementMongoRepository implements FactorRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(factorsCollection.deleteOne(eq(FIELD_ID, id))); }  }
MongoFactorRepository extends AbstractManagementMongoRepository implements FactorRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(factorsCollection.deleteOne(eq(FIELD_ID, id))); }  @PostConstruct void init(); @Override Single<Set<Factor>> findAll(); @Override Single<Set<Factor>> findByDomain(String domain); @Override Maybe<Factor> findByDomainAndFactorType(String domain, String factorType); @Override Maybe<Factor> findById(String factorId); @Override Single<Factor> create(Factor item); @Override Single<Factor> update(Factor item); @Override Completable delete(String id); }
MongoFactorRepository extends AbstractManagementMongoRepository implements FactorRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(factorsCollection.deleteOne(eq(FIELD_ID, id))); }  @PostConstruct void init(); @Override Single<Set<Factor>> findAll(); @Override Single<Set<Factor>> findByDomain(String domain); @Override Maybe<Factor> findByDomainAndFactorType(String domain, String factorType); @Override Maybe<Factor> findById(String factorId); @Override Single<Factor> create(Factor item); @Override Single<Factor> update(Factor item); @Override Completable delete(String id);  }