Search in sources :

Example 76 with BeforeClass

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");
}
Also used : IOException(java.io.IOException) ProgramFile(org.ballerinalang.util.codegen.ProgramFile) File(java.io.File) BeforeClass(org.testng.annotations.BeforeClass)

Example 77 with BeforeClass

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();
}
Also used : PanEventPage(uitests.Screens.PanEventPage) BeforeClass(org.testng.annotations.BeforeClass)

Example 78 with BeforeClass

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();
}
Also used : CloseableHttpResponse(org.apache.http.client.methods.CloseableHttpResponse) SynchronizedThread(oap.concurrent.SynchronizedThread) BeforeClass(org.testng.annotations.BeforeClass)

Example 79 with BeforeClass

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();
}
Also used : Server(oap.http.Server) SynchronizedThread(oap.concurrent.SynchronizedThread) PlainHttpListener(oap.http.PlainHttpListener) Kernel(oap.application.Kernel) BeforeClass(org.testng.annotations.BeforeClass)

Example 80 with BeforeClass

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();
}
Also used : lombok.val(lombok.val) SynchronizedThread(oap.concurrent.SynchronizedThread) PlainHttpListener(oap.http.PlainHttpListener) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

BeforeClass (org.testng.annotations.BeforeClass)1186 Series (com.axibase.tsd.api.model.series.Series)178 File (java.io.File)157 ArrayList (java.util.ArrayList)78 HashMap (java.util.HashMap)43 ClusterControllerManager (org.apache.helix.integration.manager.ClusterControllerManager)37 Injector (com.google.inject.Injector)36 Properties (java.util.Properties)35 Path (org.apache.hadoop.fs.Path)33 ClusterSetup (org.apache.helix.tools.ClusterSetup)33 Configuration (org.apache.hadoop.conf.Configuration)31 BigDecimal (java.math.BigDecimal)29 URL (java.net.URL)28 MockParticipantManager (org.apache.helix.integration.manager.MockParticipantManager)27 Date (java.util.Date)26 Server (org.eclipse.jetty.server.Server)25 ServerConnector (org.eclipse.jetty.server.ServerConnector)25 ODatabaseDocumentTx (com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx)23 IOException (java.io.IOException)23 Path (java.nio.file.Path)23