コード例 #1
0
  public void testAuthenticatorCustomCreation() throws Exception {
    testProperties.setProperty(ComponentFactory.AUTHENTICATOR, SimpleAuthenticator.class.getName());

    Authenticator authenticator = factory.getAuthenticator(new PromiscuousAuthenticator());
    assertNotNull(authenticator);
    assertEquals(SimpleAuthenticator.class, authenticator.getClass());
  }
コード例 #2
0
 @Test
 public void testAuthenticatorDefaultCreation() throws Exception {
   Authenticator authenticator = loader.getAuthenticator(new PromiscuousAuthenticator());
   assertNotNull(authenticator);
   assertEquals(PromiscuousAuthenticator.class, authenticator.getClass());
 }