@Test public void testDelete() throws TechnicalException { Role role = new Role(); role.setName("testName"); Role roleCreated = roleRepository.create(role).blockingGet(); TestObserver<Role> testObserver = roleRepository.findById(roleCreated.getId()).test(); testObserver.awaitTerminalEvent(); testObserver.assertComplete(); testObserver.assertNoErrors(); testObserver.assertValue(r -> r.getName().equals(roleCreated.getName())); TestObserver testObserver1 = roleRepository.delete(roleCreated.getId()).test(); testObserver1.awaitTerminalEvent(); roleRepository.findById(roleCreated.getId()).test().assertEmpty(); }
@Override public Completable delete(String id) { return Completable.fromPublisher(rolesCollection.deleteOne(eq(FIELD_ID, id))); }
MongoRoleRepository extends AbstractManagementMongoRepository implements RoleRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(rolesCollection.deleteOne(eq(FIELD_ID, id))); } }
MongoRoleRepository extends AbstractManagementMongoRepository implements RoleRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(rolesCollection.deleteOne(eq(FIELD_ID, id))); }  }
MongoRoleRepository extends AbstractManagementMongoRepository implements RoleRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(rolesCollection.deleteOne(eq(FIELD_ID, id))); }  @PostConstruct void init(); @Override Flowable<Role> findAll(ReferenceType referenceType, String referenceId); @Override Single<Set<Role>> findByDomain(String domain); @Override Single<Set<Role>> findByIdIn(List<String> ids); @Override Maybe<Role> findById(ReferenceType referenceType, String referenceId, String role); @Override Maybe<Role> findById(String role); @Override Single<Role> create(Role item); @Override Single<Role> update(Role item); @Override Completable delete(String id); @Override Maybe<Role> findByNameAndAssignableType(ReferenceType referenceType, String referenceId, String name, ReferenceType assignableType); }
MongoRoleRepository extends AbstractManagementMongoRepository implements RoleRepository { @Override public Completable delete(String id) { return Completable.fromPublisher(rolesCollection.deleteOne(eq(FIELD_ID, id))); }  @PostConstruct void init(); @Override Flowable<Role> findAll(ReferenceType referenceType, String referenceId); @Override Single<Set<Role>> findByDomain(String domain); @Override Single<Set<Role>> findByIdIn(List<String> ids); @Override Maybe<Role> findById(ReferenceType referenceType, String referenceId, String role); @Override Maybe<Role> findById(String role); @Override Single<Role> create(Role item); @Override Single<Role> update(Role item); @Override Completable delete(String id); @Override Maybe<Role> findByNameAndAssignableType(ReferenceType referenceType, String referenceId, String name, ReferenceType assignableType); static final String FIELD_SYSTEM; }