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);
}
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);
}
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)));
}
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();
}
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);
}
Aggregations