Search in sources :

Example 1 with TestServer

use of org.apache.nifi.processors.standard.TestServer in project nifi by apache.

the class PutSlackTest method init.

@Before
public void init() throws Exception {
    testRunner = TestRunners.newTestRunner(PutSlack.class);
    // set up web service
    ServletHandler handler = new ServletHandler();
    handler.addServletWithMapping(CaptureServlet.class, "/*");
    // create the service
    server = new TestServer();
    server.addHandler(handler);
    server.startServer();
    servlet = (CaptureServlet) handler.getServlets()[0].getServlet();
}
Also used : ServletHandler(org.eclipse.jetty.servlet.ServletHandler) TestServer(org.apache.nifi.processors.standard.TestServer) Before(org.junit.Before)

Aggregations

TestServer (org.apache.nifi.processors.standard.TestServer)1 ServletHandler (org.eclipse.jetty.servlet.ServletHandler)1 Before (org.junit.Before)1