Search in sources :

Example 11 with BeforeTest

use of org.testng.annotations.BeforeTest in project rest.li by linkedin.

the class TestRestLiMethodInvocation method setUp.

@BeforeTest
protected void setUp() {
    _scheduler = Executors.newSingleThreadScheduledExecutor();
    _engine = new EngineBuilder().setTaskExecutor(_scheduler).setTimerScheduler(_scheduler).build();
    _resourceFactory = new EasyMockResourceFactory();
    _errorResponseBuilder = new ErrorResponseBuilder();
    _methodAdapterRegistry = new MethodAdapterRegistry(_errorResponseBuilder);
    // Add filters to the invoker.
    _invoker = new RestLiMethodInvoker(_resourceFactory, _engine, _errorResponseBuilder);
}
Also used : RestLiMethodInvoker(com.linkedin.restli.internal.server.RestLiMethodInvoker) ErrorResponseBuilder(com.linkedin.restli.internal.server.response.ErrorResponseBuilder) EngineBuilder(com.linkedin.parseq.EngineBuilder) MethodAdapterRegistry(com.linkedin.restli.internal.server.methods.MethodAdapterRegistry) BeforeTest(org.testng.annotations.BeforeTest)

Example 12 with BeforeTest

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

the class JwtAttributeMapperTest method initialize.

@BeforeTest
public void initialize() {
    jwtMappings = new HashMap<String, Object>();
    jwtMappings.put(SUB, SUBJECT_VALUE);
    jwtMappings.put(ISS, ISSUER);
    jwtMappings.put(EMAIL, EMAIL_VALUE);
    attributeMappings = new HashMap<String, String>();
    attributeMappings.put(SUB, UID);
    attributeMappings.put(EMAIL, AM_EMAIL);
    claimsSet = new JwtClaimsSet(jwtMappings);
    defaultPrincipalMapper = new JwtAttributeMapper("uid", "prefix-");
}
Also used : JwtClaimsSet(org.forgerock.json.jose.jwt.JwtClaimsSet) BeforeTest(org.testng.annotations.BeforeTest)

Example 13 with BeforeTest

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

the class SAML2ProxyTest method theSetUp.

@BeforeTest
void theSetUp() {
    //you need this
    validCookies = new Cookie[1];
    validCookies[0] = new Cookie(AM_LOCATION_COOKIE, COOKIE_LOCATION);
}
Also used : Cookie(javax.servlet.http.Cookie) BeforeTest(org.testng.annotations.BeforeTest)

Example 14 with BeforeTest

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

the class ClientResourceTest method setUp.

@BeforeTest
public void setUp() throws SMSException {
    mockManager = mock(ClientResourceManager.class);
    ServiceSchemaManager mockSchemaManager = mock(ServiceSchemaManager.class);
    ServiceSchema mockSchema = mock(ServiceSchema.class);
    mockSubSchema = mock(ServiceSchema.class);
    Mockito.doReturn(mockSchema).when(mockSchemaManager).getOrganizationSchema();
    Mockito.doReturn(mockSubSchema).when(mockSchema).getSubSchema(anyString());
    resource = new ClientResource(mockManager, mock(CTSPersistentStore.class), mockSchemaManager, mock(OAuth2AuditLogger.class), mock(Debug.class));
}
Also used : ServiceSchema(com.sun.identity.sm.ServiceSchema) ServiceSchemaManager(com.sun.identity.sm.ServiceSchemaManager) BeforeTest(org.testng.annotations.BeforeTest)

Example 15 with BeforeTest

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

the class SoapSTSInstanceStateServiceListenerTest method setUpTest.

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

Aggregations

BeforeTest (org.testng.annotations.BeforeTest)63 HashMap (java.util.HashMap)8 CommandManager (com.sun.identity.cli.CommandManager)6 Injector (com.google.inject.Injector)4 PinotHelixResourceManager (com.linkedin.pinot.controller.helix.core.PinotHelixResourceManager)4 File (java.io.File)4 AbstractTableConfig (com.linkedin.pinot.common.config.AbstractTableConfig)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 MetricsRegistry (com.yammer.metrics.core.MetricsRegistry)2 URL (java.net.URL)2 ArrayList (java.util.ArrayList)2 ZkClient (org.I0Itec.zkclient.ZkClient)2