Search in sources :

Example 81 with BeforeTest

use of org.testng.annotations.BeforeTest in project swagger-core by swagger-api.

the class InheritedBeanTest method setup.

@BeforeTest
public void setup() {
    modelResolver = new ModelResolver(new ObjectMapper());
    context = new ModelConverterContextImpl(modelResolver);
}
Also used : ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) ModelConverterContextImpl(io.swagger.converter.ModelConverterContextImpl) BeforeTest(org.testng.annotations.BeforeTest)

Example 82 with BeforeTest

use of org.testng.annotations.BeforeTest in project OpenRefine by OpenRefine.

the class RefineBrokerTests method test_init.

@BeforeTest
public void test_init() throws Exception {
    logger = LoggerFactory.getLogger(this.getClass());
    config = mock(ServletConfig.class);
    when(config.getInitParameter("refine.data")).thenReturn(data.getAbsolutePath());
    when(config.getInitParameter("refine.development")).thenReturn("true");
    broker = new RefineBrokerImpl();
    broker.init(config);
}
Also used : ServletConfig(javax.servlet.ServletConfig) RefineBrokerImpl(com.google.refine.broker.RefineBrokerImpl) BeforeTest(org.testng.annotations.BeforeTest)

Example 83 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 84 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 85 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)

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