Exemplo n.º 1
0
 @Test
 public void testMakeOneUserAuthenticator() throws Exception {
   Authenticator a = loader.makeAuthenticator("bob:uncle");
   assertTrue(a instanceof OneUserAuthenticator);
   OneUserAuthenticator oua = (OneUserAuthenticator) a;
   assertEquals("bob", oua.getUser());
   assertEquals("uncle", oua.getPassword());
 }
Exemplo n.º 2
0
 @Test
 public void testMakeMultiUserAuthenticator() throws Exception {
   final String passwordFilename = "testpasswd";
   File passwd = new File(passwordFilename);
   passwd.createNewFile();
   Authenticator a = loader.makeAuthenticator(passwordFilename);
   assertTrue(a instanceof MultiUserAuthenticator);
   passwd.delete();
 }
Exemplo n.º 3
0
 @Test
 public void testMakeNullAuthenticator() throws Exception {
   Authenticator a = loader.makeAuthenticator(null);
   assertTrue(a instanceof PromiscuousAuthenticator);
 }