Search in sources :

Example 1 with TestIdentityProvider

use of org.apache.jackrabbit.oak.spi.security.authentication.external.TestIdentityProvider in project jackrabbit-oak by apache.

the class DelegateeTest method testSyncAllExternalUsersThrowingIDP.

@Test(expected = SyncRuntimeException.class)
public void testSyncAllExternalUsersThrowingIDP() {
    Delegatee dg = createDelegatee(new TestIdentityProvider("throwing") {

        @Nonnull
        @Override
        public Iterator<ExternalUser> listUsers() throws ExternalIdentityException {
            throw new ExternalIdentityException();
        }
    });
    dg.syncAllExternalUsers();
}
Also used : Nonnull(javax.annotation.Nonnull) TestIdentityProvider(org.apache.jackrabbit.oak.spi.security.authentication.external.TestIdentityProvider) Iterator(java.util.Iterator) ExternalIdentityException(org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityException) Test(org.junit.Test)

Example 2 with TestIdentityProvider

use of org.apache.jackrabbit.oak.spi.security.authentication.external.TestIdentityProvider in project jackrabbit-oak by apache.

the class AbstractJmxTest method before.

@Before
public void before() throws Exception {
    super.before();
    foreignIDP = new TestIdentityProvider("anotherIDP");
}
Also used : TestIdentityProvider(org.apache.jackrabbit.oak.spi.security.authentication.external.TestIdentityProvider) Before(org.junit.Before)

Aggregations

TestIdentityProvider (org.apache.jackrabbit.oak.spi.security.authentication.external.TestIdentityProvider)2 Iterator (java.util.Iterator)1 Nonnull (javax.annotation.Nonnull)1 ExternalIdentityException (org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityException)1 Before (org.junit.Before)1 Test (org.junit.Test)1