use of org.eclipse.jetty.testing.ServletTester in project pentaho-kettle by pentaho.
the class CarteIT method before.
@Before
public void before() {
carte.setJobMap(new JobMap());
carte.setTransformationMap(new TransformationMap());
carte.setSocketRepository(new SocketRepository(new LogChannel("Carte")));
tester = new ServletTester();
tester.addServlet(GetRootServlet.class, "/*");
tester.addServlet(GetStatusServlet.class, GetStatusServlet.CONTEXT_PATH);
tester.addServlet(AddTransServlet.class, RegisterTransServlet.CONTEXT_PATH);
tester.addServlet(StartTransServlet.class, StartTransServlet.CONTEXT_PATH);
tester.addServlet(PauseTransServlet.class, PauseTransServlet.CONTEXT_PATH);
try {
tester.start();
System.out.println("Started");
} catch (Exception ex) {
ex.printStackTrace();
Assert.fail(ex.getMessage());
}
}
use of org.eclipse.jetty.testing.ServletTester in project pentaho-kettle by pentaho.
the class RestInputIT method setUp.
@BeforeClass
public static void setUp() throws Exception {
KettleEnvironment.init();
tester = new ServletTester();
tester.setContextPath("/context");
tester.setResourceBase(RestInputIT.class.getResource("/").getFile());
final ServletHolder servletHolder = tester.addServlet(ServletContainer.class, "/*");
servletHolder.setInitParameter("com.sun.jersey.config.property.classpath", "/");
servletHolder.setInitParameter("jersey.config.server.provider.classnames", SimpleRestService.class.getName());
tester.start();
}
Aggregations