use of org.testng.annotations.BeforeTest in project OpenAM by OpenRock.
the class AuthConfigTest method suiteSetup.
/**
* Create the CLIManager.
*/
@BeforeTest(groups = { "cli-authconfig" })
public void suiteSetup() throws CLIException {
Map<String, Object> env = new HashMap<String, Object>();
env.put(CLIConstants.SYS_PROPERTY_COMMAND_NAME, "amadm");
env.put(CLIConstants.SYS_PROPERTY_DEFINITION_FILES, "com.sun.identity.cli.AccessManager");
env.put(CLIConstants.SYS_PROPERTY_OUTPUT_WRITER, outputWriter);
cmdManager = new CommandManager(env);
}
use of org.testng.annotations.BeforeTest in project OpenAM by OpenRock.
the class DataStoreTest method suiteSetup.
/**
* Create the CLIManager.
*/
@BeforeTest(groups = { "cli-datastore" })
public void suiteSetup() throws CLIException {
Map<String, Object> env = new HashMap<String, Object>();
env.put(CLIConstants.SYS_PROPERTY_COMMAND_NAME, "amadm");
env.put(CLIConstants.SYS_PROPERTY_DEFINITION_FILES, "com.sun.identity.cli.AccessManager");
env.put(CLIConstants.SYS_PROPERTY_OUTPUT_WRITER, outputWriter);
cmdManager = new CommandManager(env);
}
use of org.testng.annotations.BeforeTest in project OpenAM by OpenRock.
the class SoapSTSInstanceStateProviderTest method setUpTest.
@BeforeTest
public void setUpTest() {
final Injector injector = Guice.createInjector(new TestModule());
provider = injector.getInstance(SoapSTSInstanceStateProvider.class);
}
use of org.testng.annotations.BeforeTest in project OpenAM by OpenRock.
the class SchemaTest method suiteSetup.
/**
* Create the CLIManager.
*
*/
@BeforeTest(groups = { "cli" })
public void suiteSetup() throws CLIException {
Map<String, Object> env = new HashMap<String, Object>();
env.put(CLIConstants.SYS_PROPERTY_COMMAND_NAME, "amadm");
env.put(CLIConstants.SYS_PROPERTY_DEFINITION_FILES, "com.sun.identity.cli.AccessManager");
env.put(CLIConstants.SYS_PROPERTY_OUTPUT_WRITER, outputWriter);
cmdManager = new CommandManager(env);
}
use of org.testng.annotations.BeforeTest in project OpenAM by OpenRock.
the class RealmTest method createRealm.
@Parameters({ "realm" })
@BeforeTest(groups = { "cli-realm", "create-realm" })
public void createRealm(String realm) throws CLIException, SMSException {
String[] param = { realm };
entering("createRealm", param);
String[] args = { "create-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 names = ocm.getSubOrganizationNames(realmName, true);
assert (names.size() == 1);
String name = (String) names.iterator().next();
assert name.equals(realmName);
exiting("createRealm");
}
Aggregations