use of org.testng.annotations.BeforeClass in project carbon-apimgt by wso2.
the class ListFilesTestCase method setup.
@BeforeClass
public void setup() {
File notADir = new File("samples/util/notADir");
notADir.delete();
boolean dirCreated = (new File("samples/util/testDir")).mkdirs();
if (dirCreated) {
File a = new File("samples/util/testDir/a.json");
File b = new File("samples/util/testDir/b.txt");
try {
a.createNewFile();
b.createNewFile();
} catch (IOException ioe) {
}
}
bLangProgram = BTestUtils.parseBalFile("samples/util/listJsonFiles.bal");
}
use of org.testng.annotations.BeforeClass in project functional-tests by NativeScript.
the class PanEventTests method beforePanEventTestsClass.
@BeforeClass(alwaysRun = true)
public void beforePanEventTestsClass() {
this.panEventPage = new PanEventPage(this.homePageExtended);
this.panEventPage.loaded();
}
use of org.testng.annotations.BeforeClass in project oap by oaplatform.
the class SecureHttpListenerTest method setUp.
@BeforeClass
public void setUp() {
Env.resetPorts();
server.bind("test", GenericCorsPolicy.DEFAULT, (request, response) -> {
System.out.println("Base URL " + request.baseUrl);
System.out.println("Headers:");
System.out.println(request.headers);
response.respond(new HttpResponse(200));
}, Protocol.HTTPS);
SecureHttpListener http = new SecureHttpListener(server, pathOfTestResource(getClass(), "server_keystore.jks"), KEYSTORE_PASSWORD, Env.port());
listener = new SynchronizedThread(http);
listener.start();
}
use of org.testng.annotations.BeforeClass in project oap by oaplatform.
the class AbstractWebServicesTest method startServer.
@BeforeClass
public void startServer() {
Env.resetPorts();
kernel = new Kernel(Lists.empty());
server = new Server(100);
ws = new WebServices(server, new SessionManager(10, null, "/"), GenericCorsPolicy.DEFAULT, Lists.map(getConfig(), n -> WsConfig.CONFIGURATION.fromResource(getClass(), n)));
kernel.start();
registerServices(kernel);
ws.start();
listener = new SynchronizedThread(new PlainHttpListener(server, Env.port()));
listener.start();
}
use of org.testng.annotations.BeforeClass in project oap by oaplatform.
the class AbstractWsValidateTest method beforeClass.
@BeforeClass
public void beforeClass() {
Env.resetPorts();
Metrics.resetAll();
server.start();
for (val wsInstance : getWsInstances()) ws.bind("test", GenericCorsPolicy.DEFAULT, wsInstance, false, SESSION_MANAGER, Collections.emptyList(), Protocol.HTTP);
PlainHttpListener http = new PlainHttpListener(server, Env.port());
listener = new SynchronizedThread(http);
listener.start();
}
Aggregations