Search in sources :

Example 1 with BasicHandlerContext

use of co.cask.http.BasicHandlerContext in project cdap by caskdata.

the class ExplodeJarHttpHandlerTest method init.

@BeforeClass
public static void init() throws Exception {
    URL jarUrl = ExplodeJarHttpHandlerTest.class.getResource("/CountRandomWebapp-localhost.jar");
    Assert.assertNotNull(jarUrl);
    jarHttpHandler = new ExplodeJarHttpHandler(new LocalLocationFactory().create(jarUrl.toURI()));
    jarHttpHandler.init(new BasicHandlerContext(null));
}
Also used : BasicHandlerContext(co.cask.http.BasicHandlerContext) LocalLocationFactory(org.apache.twill.filesystem.LocalLocationFactory) URL(java.net.URL) BeforeClass(org.junit.BeforeClass)

Example 2 with BasicHandlerContext

use of co.cask.http.BasicHandlerContext in project cdap by caskdata.

the class IntactJarHttpHandlerTest method init.

@BeforeClass
public static void init() throws Exception {
    URL jarUrl = IntactJarHttpHandlerTest.class.getResource("/CountRandomWebapp-localhost.jar");
    Assert.assertNotNull(jarUrl);
    jarHttpHandler = new IntactJarHttpHandler(new LocalLocationFactory().create(jarUrl.toURI()));
    jarHttpHandler.init(new BasicHandlerContext(null));
}
Also used : BasicHandlerContext(co.cask.http.BasicHandlerContext) LocalLocationFactory(org.apache.twill.filesystem.LocalLocationFactory) URL(java.net.URL) BeforeClass(org.junit.BeforeClass)

Aggregations

BasicHandlerContext (co.cask.http.BasicHandlerContext)2 URL (java.net.URL)2 LocalLocationFactory (org.apache.twill.filesystem.LocalLocationFactory)2 BeforeClass (org.junit.BeforeClass)2