Search in sources :

Example 56 with BeforeTest

use of org.testng.annotations.BeforeTest in project orientdb by orientechnologies.

the class TestObjectWithDeletedLink method before.

@BeforeTest
public void before() {
    db = new OObjectDatabaseTx("memory:" + TestObjectWithDeletedLink.class.getName());
    db.create();
    db.getEntityManager().registerEntityClass(SimpleSelfRef.class);
}
Also used : OObjectDatabaseTx(com.orientechnologies.orient.object.db.OObjectDatabaseTx) BeforeTest(org.testng.annotations.BeforeTest)

Example 57 with BeforeTest

use of org.testng.annotations.BeforeTest in project OpenAM by OpenRock.

the class RestSTSInstanceStateProviderTest method setUpTest.

@BeforeTest
public void setUpTest() {
    final Injector injector = Guice.createInjector(new TestModule());
    provider = injector.getInstance(RestSTSInstanceStateProvider.class);
}
Also used : RestSTSInstanceStateProvider(org.forgerock.openam.sts.tokengeneration.state.RestSTSInstanceStateProvider) Injector(com.google.inject.Injector) BeforeTest(org.testng.annotations.BeforeTest)

Example 58 with BeforeTest

use of org.testng.annotations.BeforeTest in project OpenAM by OpenRock.

the class RestSTSInstanceStateServiceListenerTest method setUpTest.

@BeforeTest
public void setUpTest() {
    final Injector injector = Guice.createInjector(new TestModule());
    provider = injector.getInstance(RestSTSInstanceStateProvider.class);
    serviceListener = injector.getInstance(Key.get(ServiceListener.class, Names.named(TokenGenerationModule.REST_STS_INSTANCE_STATE_LISTENER)));
}
Also used : RestSTSInstanceStateProvider(org.forgerock.openam.sts.tokengeneration.state.RestSTSInstanceStateProvider) Injector(com.google.inject.Injector) BeforeTest(org.testng.annotations.BeforeTest)

Example 59 with BeforeTest

use of org.testng.annotations.BeforeTest in project OpenAM by OpenRock.

the class DefaultAttributeStatementsProviderTest method setup.

@BeforeTest
public void setup() throws TokenCreationException, SAML2Exception {
    attributeMap = new HashMap<>();
    attributeMap.put(ATTRIBUTE_NAME, "mail");
    mockAttributeMapper = mock(AttributeMapper.class);
    mockToken = mock(SSOToken.class);
    Attribute attribute = AssertionFactory.getInstance().createAttribute();
    attribute.setName(ATTRIBUTE_NAME);
    List<String> attributeValueList = new ArrayList<>();
    attributeValueList.add(ATTRIBUTE_VALUE);
    attribute.setAttributeValue(attributeValueList);
    attributeList = new ArrayList<>();
    attributeList.add(attribute);
    when(mockAttributeMapper.getAttributes(mockToken, attributeMap)).thenReturn(attributeList);
    saml2Config = createSAML2Config();
}
Also used : SSOToken(com.iplanet.sso.SSOToken) Attribute(com.sun.identity.saml2.assertion.Attribute) ArrayList(java.util.ArrayList) BeforeTest(org.testng.annotations.BeforeTest)

Example 60 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)

Aggregations

BeforeTest (org.testng.annotations.BeforeTest)80 HashMap (java.util.HashMap)8 CommandManager (com.sun.identity.cli.CommandManager)6 Path (java.nio.file.Path)6 File (java.io.File)5 Injector (com.google.inject.Injector)4 PinotHelixResourceManager (com.linkedin.pinot.controller.helix.core.PinotHelixResourceManager)4 Series (com.axibase.tsd.api.model.series.Series)3 AbstractTableConfig (com.linkedin.pinot.common.config.AbstractTableConfig)3 ArrayList (java.util.ArrayList)3 Parameters (org.testng.annotations.Parameters)3 SSOException (com.iplanet.sso.SSOException)2 Schema (com.linkedin.pinot.common.data.Schema)2 SegmentGeneratorConfig (com.linkedin.pinot.core.indexsegment.generator.SegmentGeneratorConfig)2 SegmentIndexCreationDriver (com.linkedin.pinot.core.segment.creator.SegmentIndexCreationDriver)2 SegmentIndexCreationDriverImpl (com.linkedin.pinot.core.segment.creator.impl.SegmentIndexCreationDriverImpl)2 ThirdEyeConfigProperties (com.linkedin.thirdeye.hadoop.config.ThirdEyeConfigProperties)2 ODatabaseDocumentTx (com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx)2 OrganizationConfigManager (com.sun.identity.sm.OrganizationConfigManager)2 SMSException (com.sun.identity.sm.SMSException)2