use of io.gravitee.am.model.idp.ApplicationIdentityProvider in project gravitee-access-management by gravitee-io.
the class ApplicationRepositoryTest method testFindByIdentity.
@Test
public void testFindByIdentity() {
// create app
Application app = buildApplication();
Application appCreated = applicationRepository.create(app).blockingGet();
// fetch app
final String next = appCreated.getIdentityProviders().stream().map(ApplicationIdentityProvider::getIdentity).iterator().next();
TestSubscriber<Application> testSubscriber = applicationRepository.findByIdentityProvider(next).test();
testSubscriber.awaitTerminalEvent();
testSubscriber.assertComplete();
testSubscriber.assertNoErrors();
testSubscriber.assertValueCount(1);
testSubscriber.assertValue(s -> s.getId().equals(appCreated.getId()));
}
Aggregations