"Long String LongString Long String LongString Long String LongString Long String LongString Long String LongString Long String LongString" };
String[] newAuthorizedIDs = {
"new authorizedIDs",
"another authorizedIDs",
"some long string for authorized IDs some long string for authorized IDs some long string for authorized IDs" };
AuthorizeCallback auth;
for (int i = 0; i < authenticationIDs.length; i++) {
for (int j = 0; j < authorizedIDs.length; j++) {
auth = new AuthorizeCallback(authenticationIDs[i],
authorizedIDs[j]);
assertEquals(auth.getAuthenticationID(), authenticationIDs[i]);
assertEquals(auth.getAuthorizationID(), authorizedIDs[j]);
assertNull(auth.getAuthorizedID());
assertFalse(auth.isAuthorized());
auth.setAuthorized(true);
assertTrue(auth.isAuthorized());
assertEquals(auth.getAuthorizedID(), auth.getAuthorizationID());
auth.setAuthorized(false);
assertNull(auth.getAuthorizedID());
assertFalse(auth.isAuthorized());
for (int l = 0; l < newAuthorizedIDs.length; l++) {
auth.setAuthorizedID(newAuthorizedIDs[l]);
assertNull(auth.getAuthorizedID());
auth.setAuthorized(true);
assertFalse(auth.getAuthorizedID().equals(
auth.getAuthorizationID()));
assertEquals(auth.getAuthorizedID(), newAuthorizedIDs[l]);
auth.setAuthorizedID(newAuthorizedIDs[l] + " ZZZ");
assertFalse(auth.getAuthorizedID().equals(
auth.getAuthorizationID()));
assertFalse(auth.getAuthorizedID().equals(
newAuthorizedIDs[l]));
assertEquals(auth.getAuthorizedID(), newAuthorizedIDs[l]
+ " ZZZ");
auth.setAuthorized(false);
}
}
}
}