@Test public void testDelete() throws TechnicalException { Tag tag = new Tag(); tag.setName("testName"); Tag tagCreated = tagRepository.create(tag).blockingGet(); TestObserver<Tag> testObserver = tagRepository.findById(tagCreated.getId()).test(); testObserver.awaitTerminalEvent(); testObserver.assertComplete(); testObserver.assertNoErrors(); testObserver.assertValue(t -> t.getName().equals(tag.getName())); TestObserver testObserver1 = tagRepository.delete(tagCreated.getId()).test(); testObserver1.awaitTerminalEvent(); tagRepository.findById(tagCreated.getId()).test().assertEmpty(); }
@Override public Completable delete(String id) { return Completable.fromPublisher(tagsCollection.deleteOne(eq(FIELD_ID, id))); }
MongoTagRepository extends AbstractManagementMongoRepository implements TagRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(tagsCollection.deleteOne(eq(FIELD_ID, id))); } }
MongoTagRepository extends AbstractManagementMongoRepository implements TagRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(tagsCollection.deleteOne(eq(FIELD_ID, id))); }  }
MongoTagRepository extends AbstractManagementMongoRepository implements TagRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(tagsCollection.deleteOne(eq(FIELD_ID, id))); }  @PostConstruct void init(); @Override Maybe<Tag> findById(String id, String organizationId); @Override Maybe<Tag> findById(String id); @Override Flowable<Tag> findAll(String organizationId); @Override Single<Tag> create(Tag item); @Override Single<Tag> update(Tag item); @Override Completable delete(String id); }
MongoTagRepository extends AbstractManagementMongoRepository implements TagRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(tagsCollection.deleteOne(eq(FIELD_ID, id))); }  @PostConstruct void init(); @Override Maybe<Tag> findById(String id, String organizationId); @Override Maybe<Tag> findById(String id); @Override Flowable<Tag> findAll(String organizationId); @Override Single<Tag> create(Tag item); @Override Single<Tag> update(Tag item); @Override Completable delete(String id);  }