use of org.testng.annotations.Parameters in project OpenAM by OpenRock.
the class AMIdentityTestBase method createIdentityWithLongName.
/**
* Creates <code>AMIdentity</code> twice with long name.
*
* @throws IdRepoException if <code>AMIdentity</code> object cannot be
* created.
* @throws SSOException if the super administrator Single Sign On is
* invalid.
*/
@Parameters({ "parent-realm", "entity-type", "entity-name", "entity-creation-attributes" })
@Test(groups = { "api" })
public void createIdentityWithLongName(String parentRealm, String idType, String entityName, String createAttributes) throws IdRepoException, SSOException {
Object[] params = { parentRealm, idType, entityName, createAttributes };
entering("createIdentityWithLongName", params);
try {
String name = entityName;
for (int i = 0; i < 100; i++) {
name += entityName;
}
IdType type = IdUtils.getType(idType);
Map values = CollectionUtils.parseStringToMap(createAttributes);
createIdentity(parentRealm, type, name, values);
deleteIdentity(parentRealm, type, name);
} catch (SSOException e) {
log(Level.SEVERE, "createIdentityWithLongName", e.getMessage(), params);
e.printStackTrace();
throw e;
}
exiting("createIdentityWithLongName");
}
use of org.testng.annotations.Parameters in project OpenAM by OpenRock.
the class RealmTest method getRealmAttributeValues.
@Parameters({ "realm" })
@Test(groups = { "cli-realm", "get-realm" })
public void getRealmAttributeValues(String realm) throws CLIException {
String[] param = { realm };
entering("getRealmAttributeValues", param);
String[] args = { "get-realm", CLIConstants.PREFIX_ARGUMENT_LONG + IArgument.REALM_NAME, "/", CLIConstants.PREFIX_ARGUMENT_LONG + IArgument.SERVICE_NAME, "sunIdentityRepositoryService" };
CLIRequest req = new CLIRequest(null, args, getAdminSSOToken());
cmdManager.addToRequestQueue(req);
cmdManager.serviceRequestQueue();
exiting("getRealmAttributeValues");
}
use of org.testng.annotations.Parameters in project OpenAM by OpenRock.
the class RealmTest method listRealms.
@Parameters({ "parent-realm" })
@Test(groups = { "cli-realm", "list-realms" })
public void listRealms(String parentRealm) throws CLIException, SMSException {
String[] param = { parentRealm };
entering("listRealms", param);
String[] args = { "list-realms", CLIConstants.PREFIX_ARGUMENT_LONG + IArgument.FILTER, "*", CLIConstants.PREFIX_ARGUMENT_LONG + IArgument.REALM_NAME, parentRealm };
CLIRequest req = new CLIRequest(null, args, getAdminSSOToken());
cmdManager.addToRequestQueue(req);
cmdManager.serviceRequestQueue();
exiting("listRealms");
}
use of org.testng.annotations.Parameters in project OpenAM by OpenRock.
the class RealmTest method getAssignableServicesInRealm.
@Parameters({ "realm" })
@Test(groups = { "cli-realm", "list-realm-assignable-svcs" })
public void getAssignableServicesInRealm(String realm) throws CLIException, SMSException {
String[] param = { realm };
entering("getAssignableServicesInRealm", param);
String[] args = { "list-realm-assignable-svcs", CLIConstants.PREFIX_ARGUMENT_LONG + IArgument.REALM_NAME, realm };
CLIRequest req = new CLIRequest(null, args, getAdminSSOToken());
cmdManager.addToRequestQueue(req);
cmdManager.serviceRequestQueue();
exiting("getAssignableServicesInRealm");
}
use of org.testng.annotations.Parameters in project OpenAM by OpenRock.
the class RealmTest method deleteRealm.
@Parameters({ "realm" })
@AfterTest(groups = { "cli-realm", "delete-realm" })
public void deleteRealm(String realm) throws CLIException, SMSException {
String[] param = { realm };
entering("deleteRealm", param);
String[] args = { "delete-realm", CLIConstants.PREFIX_ARGUMENT_LONG + IArgument.REALM_NAME, realm };
CLIRequest req = new CLIRequest(null, args, getAdminSSOToken());
cmdManager.addToRequestQueue(req);
cmdManager.serviceRequestQueue();
String parentRealm = RealmUtils.getParentRealm(realm);
String realmName = RealmUtils.getChildRealm(realm);
OrganizationConfigManager ocm = new OrganizationConfigManager(getAdminSSOToken(), parentRealm);
Set results = ocm.getSubOrganizationNames(realmName, false);
assert (results.isEmpty());
exiting("deleteRealm");
}
Aggregations