Exemplo n.º 1
0
  @Test
  public void testAuthenticatorCustomCreation() throws Exception {
    testProperties.setProperty(ComponentFactory.AUTHENTICATOR, SimpleAuthenticator.class.getName());

    Authenticator authenticator = loader.getAuthenticator(new PromiscuousAuthenticator());
    assertNotNull(authenticator);
    assertEquals(SimpleAuthenticator.class, authenticator.getClass());
  }
Exemplo n.º 2
0
 @Test
 public void testAuthenticatorDefaultCreation() throws Exception {
   Authenticator authenticator = loader.getAuthenticator(new PromiscuousAuthenticator());
   assertNotNull(authenticator);
   assertEquals(PromiscuousAuthenticator.class, authenticator.getClass());
 }