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