Search in sources :

Example 1 with CallbackStatement

use of com.eclipsesource.restfuse.internal.callback.CallbackStatement in project restfuse by eclipsesource.

the class HttpTestStatement_Test method setUp.

@BeforeClass
public static void setUp() throws Exception {
    server = new Server(10042);
    ServletContextHandler context = new ServletContextHandler(server, "/", ServletContextHandler.SESSIONS);
    CallbackStatement statement = mock(CallbackStatement.class);
    CallbackSerlvet servlet = new CallbackSerlvet(new DefaultCallbackResource(), statement);
    context.addServlet(new ServletHolder(servlet), "/");
    server.start();
    int timer = 0;
    while (!server.isRunning() && timer < TIMEOUT) {
        Thread.sleep(1000);
        timer++;
    }
}
Also used : Server(org.eclipse.jetty.server.Server) ServletHolder(org.eclipse.jetty.servlet.ServletHolder) CallbackStatement(com.eclipsesource.restfuse.internal.callback.CallbackStatement) DefaultCallbackResource(com.eclipsesource.restfuse.DefaultCallbackResource) ServletContextHandler(org.eclipse.jetty.servlet.ServletContextHandler) CallbackSerlvet(com.eclipsesource.restfuse.internal.callback.CallbackSerlvet) BeforeClass(org.junit.BeforeClass)

Example 2 with CallbackStatement

use of com.eclipsesource.restfuse.internal.callback.CallbackStatement in project restfuse by eclipsesource.

the class RequestConfiguration_Test method setUp.

@BeforeClass
public static void setUp() throws Exception {
    server = new Server(10043);
    ServletContextHandler context = new ServletContextHandler(server, "/", ServletContextHandler.SESSIONS);
    CallbackStatement statement = mock(CallbackStatement.class);
    CallbackSerlvet servlet = new CallbackSerlvet(resource, statement);
    context.addServlet(new ServletHolder(servlet), "/");
    server.start();
    int timer = 0;
    while (!server.isRunning() && timer < TIMEOUT) {
        Thread.sleep(1000);
        timer++;
    }
}
Also used : Server(org.eclipse.jetty.server.Server) ServletHolder(org.eclipse.jetty.servlet.ServletHolder) CallbackStatement(com.eclipsesource.restfuse.internal.callback.CallbackStatement) ServletContextHandler(org.eclipse.jetty.servlet.ServletContextHandler) CallbackSerlvet(com.eclipsesource.restfuse.internal.callback.CallbackSerlvet) BeforeClass(org.junit.BeforeClass)

Example 3 with CallbackStatement

use of com.eclipsesource.restfuse.internal.callback.CallbackStatement in project restfuse by eclipsesource.

the class RequestContextConfiguration_Test method setUp.

@BeforeClass
public static void setUp() throws Exception {
    server = new Server(10045);
    ServletContextHandler context = new ServletContextHandler(server, "/", ServletContextHandler.SESSIONS);
    CallbackStatement statement = mock(CallbackStatement.class);
    CallbackSerlvet servlet = new CallbackSerlvet(resource, statement);
    context.addServlet(new ServletHolder(servlet), "/");
    server.start();
    int timer = 0;
    while (!server.isRunning() && timer < TIMEOUT) {
        Thread.sleep(1000);
        timer++;
    }
}
Also used : Server(org.eclipse.jetty.server.Server) ServletHolder(org.eclipse.jetty.servlet.ServletHolder) CallbackStatement(com.eclipsesource.restfuse.internal.callback.CallbackStatement) ServletContextHandler(org.eclipse.jetty.servlet.ServletContextHandler) CallbackSerlvet(com.eclipsesource.restfuse.internal.callback.CallbackSerlvet) BeforeClass(org.junit.BeforeClass)

Example 4 with CallbackStatement

use of com.eclipsesource.restfuse.internal.callback.CallbackStatement in project restfuse by eclipsesource.

the class HttpTestStatementOrder_Test method setUp.

@BeforeClass
public static void setUp() throws Exception {
    server = new Server(10042);
    ServletContextHandler context = new ServletContextHandler(server, "/", ServletContextHandler.SESSIONS);
    CallbackStatement statement = mock(CallbackStatement.class);
    CallbackSerlvet servlet = new CallbackSerlvet(new DefaultCallbackResource(), statement);
    context.addServlet(new ServletHolder(servlet), "/");
    server.start();
    int timer = 0;
    while (!server.isRunning() && timer < TIMEOUT) {
        Thread.sleep(1000);
        timer++;
    }
}
Also used : Server(org.eclipse.jetty.server.Server) ServletHolder(org.eclipse.jetty.servlet.ServletHolder) CallbackStatement(com.eclipsesource.restfuse.internal.callback.CallbackStatement) DefaultCallbackResource(com.eclipsesource.restfuse.DefaultCallbackResource) ServletContextHandler(org.eclipse.jetty.servlet.ServletContextHandler) CallbackSerlvet(com.eclipsesource.restfuse.internal.callback.CallbackSerlvet) BeforeClass(org.junit.BeforeClass)

Example 5 with CallbackStatement

use of com.eclipsesource.restfuse.internal.callback.CallbackStatement in project restfuse by eclipsesource.

the class InternalRequest_Test method setUp.

@BeforeClass
public static void setUp() throws Exception {
    server = new Server(10042);
    ServletContextHandler context = new ServletContextHandler(server, "/", ServletContextHandler.SESSIONS);
    CallbackStatement statement = mock(CallbackStatement.class);
    CallbackSerlvet servlet = new CallbackSerlvet(new TestResource(), statement);
    context.addServlet(new ServletHolder(servlet), "/");
    server.start();
    int timer = 0;
    while (!server.isRunning() && timer < TIMEOUT) {
        Thread.sleep(1000);
        timer++;
    }
}
Also used : Server(org.eclipse.jetty.server.Server) ServletHolder(org.eclipse.jetty.servlet.ServletHolder) CallbackStatement(com.eclipsesource.restfuse.internal.callback.CallbackStatement) ServletContextHandler(org.eclipse.jetty.servlet.ServletContextHandler) CallbackSerlvet(com.eclipsesource.restfuse.internal.callback.CallbackSerlvet) BeforeClass(org.junit.BeforeClass)

Aggregations

CallbackStatement (com.eclipsesource.restfuse.internal.callback.CallbackStatement)7 CallbackSerlvet (com.eclipsesource.restfuse.internal.callback.CallbackSerlvet)6 Server (org.eclipse.jetty.server.Server)6 ServletContextHandler (org.eclipse.jetty.servlet.ServletContextHandler)6 ServletHolder (org.eclipse.jetty.servlet.ServletHolder)6 BeforeClass (org.junit.BeforeClass)6 DefaultCallbackResource (com.eclipsesource.restfuse.DefaultCallbackResource)2 PollStatement (com.eclipsesource.restfuse.internal.poll.PollStatement)1 Statement (org.junit.runners.model.Statement)1