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-");
}
use of org.testng.annotations.BeforeTest in project incubator-atlas by apache.
the class FieldMappingTest method beforeTest.
@BeforeTest
public void beforeTest() throws Exception {
TypeSystem typeSystem = TypeSystem.getInstance();
typeSystem.reset();
}
use of org.testng.annotations.BeforeTest in project incubator-atlas by apache.
the class NotificationHookConsumerKafkaTest method setup.
@BeforeTest
public void setup() throws AtlasException, InterruptedException, AtlasBaseException {
MockitoAnnotations.initMocks(this);
AtlasType mockType = mock(AtlasType.class);
when(typeRegistry.getType(anyString())).thenReturn(mockType);
AtlasEntity.AtlasEntitiesWithExtInfo mockEntity = mock(AtlasEntity.AtlasEntitiesWithExtInfo.class);
when(instanceConverter.toAtlasEntities(anyList())).thenReturn(mockEntity);
kafkaNotification = startKafkaServer();
}
use of org.testng.annotations.BeforeTest in project jetcd by coreos.
the class MaintenanceUnitTest method setUp.
@BeforeTest
public void setUp() throws AuthFailedException, ConnectException, IOException {
String uniqueServerName = "fake server for " + getClass();
fakeServer = InProcessServerBuilder.forName(uniqueServerName).fallbackHandlerRegistry(serviceRegistry).directExecutor().build().start();
maintenanceCli = new MaintenanceImpl(InProcessChannelBuilder.forName(uniqueServerName).directExecutor().build(), Optional.empty());
MaintenanceImplBase base = this.defaultBase(responseObserverRef);
serviceRegistry.addService(base);
}
use of org.testng.annotations.BeforeTest in project jetcd by coreos.
the class KVTest method setUp.
@BeforeTest
public void setUp() throws Exception {
test = new Assertion();
Client client = ClientBuilder.newBuilder().endpoints("http://localhost:2379").build();
kvClient = client.getKVClient();
}
Aggregations