Examples of TestServletConfig


Examples of de.odysseus.calyxo.base.test.TestServletConfig

  public PluginContextTest(String arg0) {
    super(arg0);
  }

  public void testDispatcher() throws ConfigException {
    ServletConfig config = new TestServletConfig("test");
    ControlModuleMapping mapping = new ControlModuleMapping("/test/*");
    ControlModuleContext module = new ControlModuleContext(config, mapping, null);
    PluginContext context = new PluginContext(module, DefaultAction.class, new DefaultDispatcher(module));
    DefaultDispatcher dispatcher = new DefaultDispatcher(context.getModuleContext());

View Full Code Here

Examples of de.odysseus.calyxo.base.test.TestServletConfig

    } catch (Exception e) {
    }
  }

  public void testFilterClass() throws ConfigException {
    ServletConfig config = new TestServletConfig("test");
    ControlModuleMapping mapping = new ControlModuleMapping("/test/*");
    ControlModuleContext module = new ControlModuleContext(config, mapping, null);
    PluginContext context = new PluginContext(module, DefaultAction.class, new DefaultDispatcher(module));

    assertNull(context.getFilterClass("foo"));
View Full Code Here

Examples of de.odysseus.calyxo.base.test.TestServletConfig

    HashMap params = new HashMap();
    params.put(
      "config",
      "/de/odysseus/calyxo/control/calyxo-control-config-empty.xml"
    );
    TestServletConfig config = new TestServletConfig("test", params);
    ControlModuleMapping mapping = new ControlModuleMapping("/test/*");

    ServletContext context = config.getServletContext();
    ControlModuleGroup group = ControlModuleGroup.getInstance(context);
    ControlModuleContext module = new ControlModuleContext(config, mapping, null);
    assertTrue(group.isEmpty());
    group.add(module);
    assertFalse(group.isEmpty());
View Full Code Here

Examples of de.odysseus.calyxo.base.test.TestServletConfig

  public ControlModuleContextTest(String arg0) {
    super(arg0);
  }

  public void testBasics() throws ConfigException {
    ServletConfig config = new TestServletConfig("test");
    ControlModuleMapping mapping = new ControlModuleMapping("/test/*");
    ControlModuleContext context = new ControlModuleContext(config, mapping, null);
   
    assertSame("test", context.getName());
    assertSame(config.getServletContext(), context.getServletContext());
    assertEquals("/test/action", context.getPath("/action"));
  }
View Full Code Here

Examples of de.odysseus.calyxo.base.test.TestServletConfig

    assertSame(config.getServletContext(), context.getServletContext());
    assertEquals("/test/action", context.getPath("/action"));
  }

  public void testModuleAttributes() throws ConfigException {
    ServletConfig config = new TestServletConfig("test");
    ControlModuleMapping mapping = new ControlModuleMapping("/test/*");
    ControlModuleContext context = new ControlModuleContext(config, mapping, null);

    assertNull(context.getAttribute("foo"));
    context.setAttribute("foo", "bar");
View Full Code Here

Examples of de.odysseus.calyxo.base.test.TestServletConfig

  }

  public void testInitParams() throws ConfigException {
    HashMap params = new HashMap();
    params.put("foo", "bar");
    TestServletConfig config = new TestServletConfig("test", params);
    ControlModuleMapping mapping = new ControlModuleMapping("/test/*");
    ControlModuleContext module = new ControlModuleContext(config, mapping, null);

    assertNull(module.getInitParameter("bar"));
    assertSame("bar", module.getInitParameter("foo"));
View Full Code Here

Examples of de.odysseus.calyxo.base.test.TestServletConfig

  public DefaultModuleTest(String arg0) {
    super(arg0);
  }

  private DefaultModule createModule(ServletContext context, String name, String pattern, Map params) throws ConfigException, ServletException {
    TestServletConfig config = new TestServletConfig(name, context, params);
    DefaultModule module = new DefaultModule();
    module.init(new ControlModuleContext(config, new ControlModuleMapping(pattern), null));
    return module;
  }
View Full Code Here

Examples of org.jbpm.designer.helper.TestServletConfig


        DictionaryServlet dictionaryServlet = new DictionaryServlet();
        dictionaryServlet.setProfile(profile);

        dictionaryServlet.init(new TestServletConfig(new TestServletContext(repository)));
        TestHttpServletResponse response = new  TestHttpServletResponse();
        dictionaryServlet.doPost(new TestHttpServletRequest(params), response);

        String responseText = new String(response.getContent());
        assertNotNull(responseText);
View Full Code Here

Examples of org.jbpm.designer.helper.TestServletConfig


        DictionaryServlet dictionaryServlet = new DictionaryServlet();
        dictionaryServlet.setProfile(profile);

        dictionaryServlet.init(new TestServletConfig(new TestServletContext(repository)));
        TestHttpServletResponse response = new  TestHttpServletResponse();
        dictionaryServlet.doPost(new TestHttpServletRequest(params), response);

        String dictionaryContent = new String(response.getContent());
        assertNotNull(dictionaryContent);
View Full Code Here

Examples of org.jbpm.designer.helper.TestServletConfig


        CustomEditorsServlet customEditorsServlet = new CustomEditorsServlet();
        customEditorsServlet.setProfile(profile);

        customEditorsServlet.init(new TestServletConfig(new TestServletContext(repository)));
        TestHttpServletResponse response = new  TestHttpServletResponse();
        customEditorsServlet.doPost(new TestHttpServletRequest(params), response);

        String responseText = new String(response.getContent());
        assertNotNull(responseText);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.