}
}
public void testAuthenticate() throws RepositoryException {
assertTrue(authentManager.authenticate(
new SimpleAuthenticationIdentity(DmInitialize.DM_LOGIN_OK1,
DmInitialize.DM_PWD_OK1)).isValid());
assertFalse(authentManager.authenticate(
new SimpleAuthenticationIdentity(DmInitialize.DM_LOGIN_OK2,
DmInitialize.DM_PWD_KO)).isValid());
assertTrue(authentManager.authenticate(
new SimpleAuthenticationIdentity(DmInitialize.DM_LOGIN_OK2,
DmInitialize.DM_PWD_OK2)).isValid());
assertFalse(authentManager.authenticate(
new SimpleAuthenticationIdentity(DmInitialize.DM_LOGIN_OK2,
DmInitialize.DM_PWD_KO)).isValid());
assertFalse(authentManager.authenticate(
new SimpleAuthenticationIdentity(DmInitialize.DM_LOGIN_KO,
DmInitialize.DM_PWD_KO)).isValid());
assertFalse(authentManager.authenticate(
new SimpleAuthenticationIdentity(null, DmInitialize.DM_PWD_OK1))
.isValid());
assertFalse(authentManager.authenticate(
new SimpleAuthenticationIdentity(null, null)).isValid());
assertTrue(authentManager.authenticate(
new SimpleAuthenticationIdentity(DmInitialize.DM_LOGIN_OK3,
DmInitialize.DM_PWD_OK3)).isValid());
assertTrue(authentManager.authenticate(
new SimpleAuthenticationIdentity(DmInitialize.DM_LOGIN_OK1,
DmInitialize.DM_PWD_OK1)).isValid());
assertTrue(authentManager.authenticate(
new SimpleAuthenticationIdentity(DmInitialize.DM_LOGIN_OK5,
DmInitialize.DM_PWD_OK5)).isValid());
assertFalse(authentManager.authenticate(
new SimpleAuthenticationIdentity(DmInitialize.DM_LOGIN_OK2_DOMAIN,
DmInitialize.DM_PWD_KO)).isValid());
assertTrue(authentManager.authenticate(
new SimpleAuthenticationIdentity(DmInitialize.DM_LOGIN_OK2_DNS_DOMAIN,
DmInitialize.DM_PWD_OK2_DNS_DOMAIN)).isValid());
}