Search in sources :

Example 1 with ServletRunner

use of com.meterware.servletunit.ServletRunner in project camel by apache.

the class ServletCamelRouterTestSupport method setUp.

@Before
public void setUp() throws Exception {
    InputStream is = this.getClass().getResourceAsStream(getConfiguration());
    assertNotNull("The configuration input stream should not be null", is);
    sr = new ServletRunner(is, CONTEXT);
    HttpUnitOptions.setExceptionsThrownOnErrorStatus(true);
    if (startCamelContext) {
        super.setUp();
    }
}
Also used : InputStream(java.io.InputStream) ServletRunner(com.meterware.servletunit.ServletRunner) Before(org.junit.Before)

Example 2 with ServletRunner

use of com.meterware.servletunit.ServletRunner in project camel by apache.

the class ServletCamelTestSupport method setUp.

@Before
public void setUp() throws Exception {
    InputStream is = this.getClass().getResourceAsStream(getConfiguration());
    assertNotNull("The configuration input stream should not be null", is);
    sr = new ServletRunner(is, CONTEXT);
    HttpUnitOptions.setExceptionsThrownOnErrorStatus(true);
}
Also used : InputStream(java.io.InputStream) ServletRunner(com.meterware.servletunit.ServletRunner) Before(org.junit.Before)

Example 3 with ServletRunner

use of com.meterware.servletunit.ServletRunner in project AJSC by att.

the class ServletCamelRouterTestSupport method setUp.

@Before
public void setUp() throws Exception {
    InputStream is = this.getClass().getResourceAsStream(getConfiguration());
    assertNotNull("The configuration input stream should not be null", is);
    sr = new ServletRunner(is, CONTEXT);
    HttpUnitOptions.setExceptionsThrownOnErrorStatus(true);
    if (startCamelContext) {
        super.setUp();
    }
}
Also used : InputStream(java.io.InputStream) ServletRunner(com.meterware.servletunit.ServletRunner) Before(org.junit.Before)

Example 4 with ServletRunner

use of com.meterware.servletunit.ServletRunner in project v7files by thiloplanz.

the class BucketsServletTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    sr = new ServletRunner();
    sr.registerServlet("myServlet/*", TestBucketsServlet.class.getName());
}
Also used : ServletRunner(com.meterware.servletunit.ServletRunner)

Example 5 with ServletRunner

use of com.meterware.servletunit.ServletRunner in project v7files by thiloplanz.

the class MiltonServletTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    Properties props = UnitTestSupport.getDefaultProperties();
    props.put("auth.provider", "demo");
    props.put("acl.provider", "global");
    props.put("acl.read", "admins");
    props.put("acl.write", "admins");
    UnitTestSupport.initConfiguration(props);
    sr = new ServletRunner();
    Hashtable<String, String> initParams = new Hashtable<String, String>();
    initParams.put("webdav.endpoint", "webdav");
    initParams.put("resource.factory.factory.class", ResourceFactoryFactory.class.getName());
    sr.registerServlet("myServlet/*", MiltonServlet.class.getName(), initParams);
}
Also used : Hashtable(java.util.Hashtable) ServletRunner(com.meterware.servletunit.ServletRunner) Properties(java.util.Properties)

Aggregations

ServletRunner (com.meterware.servletunit.ServletRunner)9 Before (org.junit.Before)5 InputStream (java.io.InputStream)4 LocalDatastoreServiceTestConfig (com.google.appengine.tools.development.testing.LocalDatastoreServiceTestConfig)1 LocalLogServiceTestConfig (com.google.appengine.tools.development.testing.LocalLogServiceTestConfig)1 LocalMailServiceTestConfig (com.google.appengine.tools.development.testing.LocalMailServiceTestConfig)1 LocalModulesServiceTestConfig (com.google.appengine.tools.development.testing.LocalModulesServiceTestConfig)1 LocalSearchServiceTestConfig (com.google.appengine.tools.development.testing.LocalSearchServiceTestConfig)1 LocalServiceTestHelper (com.google.appengine.tools.development.testing.LocalServiceTestHelper)1 LocalTaskQueueTestConfig (com.google.appengine.tools.development.testing.LocalTaskQueueTestConfig)1 LocalUserServiceTestConfig (com.google.appengine.tools.development.testing.LocalUserServiceTestConfig)1 HttpNotFoundException (com.meterware.httpunit.HttpNotFoundException)1 Hashtable (java.util.Hashtable)1 Properties (java.util.Properties)1 Test (org.junit.Test)1