Search in sources :

Example 86 with BeforeTest

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);
}
Also used : CommandManager(com.sun.identity.cli.CommandManager) HashMap(java.util.HashMap) BeforeTest(org.testng.annotations.BeforeTest)

Example 87 with BeforeTest

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);
}
Also used : CommandManager(com.sun.identity.cli.CommandManager) HashMap(java.util.HashMap) BeforeTest(org.testng.annotations.BeforeTest)

Example 88 with BeforeTest

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);
}
Also used : Injector(com.google.inject.Injector) SoapSTSInstanceStateProvider(org.forgerock.openam.sts.tokengeneration.state.SoapSTSInstanceStateProvider) BeforeTest(org.testng.annotations.BeforeTest)

Example 89 with BeforeTest

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);
}
Also used : CommandManager(com.sun.identity.cli.CommandManager) HashMap(java.util.HashMap) BeforeTest(org.testng.annotations.BeforeTest)

Example 90 with BeforeTest

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");
}
Also used : Set(java.util.Set) OrganizationConfigManager(com.sun.identity.sm.OrganizationConfigManager) CLIRequest(com.sun.identity.cli.CLIRequest) Parameters(org.testng.annotations.Parameters) BeforeTest(org.testng.annotations.BeforeTest)

Aggregations

BeforeTest (org.testng.annotations.BeforeTest)142 Parameters (org.testng.annotations.Parameters)16 DatabaseConfiguration (com.google.refine.extension.database.DatabaseConfiguration)11 HashMap (java.util.HashMap)10 File (java.io.File)9 Series (com.axibase.tsd.api.model.series.Series)6 CommandManager (com.sun.identity.cli.CommandManager)6 Path (java.nio.file.Path)6 ArrayList (java.util.ArrayList)5 HashSet (java.util.HashSet)5 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)4 PinotHelixResourceManager (com.linkedin.pinot.controller.helix.core.PinotHelixResourceManager)4 Annotation (java.lang.annotation.Annotation)4 URL (java.net.URL)4 Injector (com.google.inject.Injector)3 AbstractTableConfig (com.linkedin.pinot.common.config.AbstractTableConfig)3 IntegrationTestContext (com.sequenceiq.it.IntegrationTestContext)3 Map (java.util.Map)3 WorkUnitState (org.apache.gobblin.configuration.WorkUnitState)3 SSOException (com.iplanet.sso.SSOException)2