Package de.odysseus.calyxo.base.test

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


    junit.textui.TestRunner.run(ControlConfigParserTest.class);
  }

  public void test1() throws Exception {
    URL url = getClass().getResource("test1.xml");
    TestModuleContext context = new TestModuleContext("test");
    ControlConfigParser parser = new ControlConfigParser(context);
    ControlConfig root = parser.parse(new URL[]{url});
    assertNotNull(root);
  }
View Full Code Here


    request = new TestRequest();
    // configure module support
    ServletContext context = request.getSession().getServletContext();
    TestModuleGroup group = TestModuleGroup.getInstance(context);
    // configure test modules
    module1 = new TestModuleContext("module1", context);
    module2 = new TestModuleContext("module2", context);
    group.add(module1);
    group.add(module2);
    // say, we're in module1
    group.setTestModuleContext(request, module1);
  }
View Full Code Here

   * @see TestCase#setUp()
   */
  protected void setUp() throws Exception {
    super.setUp();

    ModuleContext context = new TestModuleContext("test");
    I18nSupport support = new TestI18nSupport();
    context.setAttribute(I18nSupport.I18N_SUPPORT_KEY, support);
    parser = new FormsRootConfigParser(context);
  }
View Full Code Here

    assertEquals("barfoo", map.get("foobar"));
    assertTrue("missing date property", map.get("date") instanceof Date);
  }
 
  public void testBaseMap() throws ConfigException {
    TestModuleContext context = new TestModuleContext("test");
    BaseRootConfigParser parser = new BaseRootConfigParser(context);
    URL url = getClass().getResource("calyxo-base-config-map.xml");
    parser.parse(new URL[]{url});
    checkMap(context, (HashMap)context.getAttribute("map"));
  }
View Full Code Here

    parser.parse(new URL[]{url});
    checkMap(context, (HashMap)context.getAttribute("map"));
  }

  public void testFooMap() throws ConfigException {
    TestModuleContext context = new TestModuleContext("test");
    FooRootConfigParser parser = new FooRootConfigParser(context);
    parser.parse("calyxo-foo-config-map.xml");
    checkMap(context, (HashMap)context.getAttribute("map"));
  }
View Full Code Here

    parser.parse("calyxo-foo-config-map.xml");
    checkMap(context, (HashMap)context.getAttribute("map"));
  }

  public void testFooMapImport() throws ConfigException {
    TestModuleContext context = new TestModuleContext("test");
    FooRootConfigParser parser = new FooRootConfigParser(context);
    parser.parse("calyxo-foo-config-map-import.xml");
    checkMap(context, (HashMap)context.getAttribute("map"));
  }
View Full Code Here

    parser.parse("calyxo-foo-config-map-import.xml");
    checkMap(context, (HashMap)context.getAttribute("map"));
  }

  public void testBaseList() throws ConfigException {
    TestModuleContext context = new TestModuleContext("test");
    BaseRootConfigParser parser = new BaseRootConfigParser(context);
    URL url = getClass().getResource("calyxo-base-config-list.xml");
    parser.parse(new URL[]{url});
    List list = (List)context.getAttribute("list");
    assertTrue(list.size() == 2);
    assertEquals("foo", list.get(0));
    assertEquals("foobar", list.get(1));
  }
View Full Code Here

    assertEquals("foo", list.get(0));
    assertEquals("foobar", list.get(1));
  }

  public void testBaseFormat() throws ConfigException {
    TestModuleContext context = new TestModuleContext("test");
    BaseRootConfigParser parser = new BaseRootConfigParser(context);
    URL url = getClass().getResource("calyxo-base-config-format.xml");
    parser.parse(new URL[]{url});
    assertEquals("123,46", context.getAttribute("result"));
  }
View Full Code Here

  protected void setUp() throws ServletException {
    pageContext = new TestPageContext();
    HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
    // configure test module
    module = new TestModuleContext("test", pageContext.getServletContext());
    // configure module container
    ServletContext context = request.getSession().getServletContext();
    TestModuleGroup group = TestModuleGroup.getInstance(context);
    group.add(module);
    // install i18n support
View Full Code Here

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

  public void setUp() throws ConfigException {
    TestModuleContext module = new TestModuleContext("test");
    PanelsService service = new PanelsService();
    service.init(module, PACKAGE_PATH + "/" + "PanelsContextTest.xml");
    PanelsSupport support = PanelsSupport.getInstance(module);
    context = new PanelsContext(support, new Locale("", ""));
  }
View Full Code Here

TOP

Related Classes of de.odysseus.calyxo.base.test.TestModuleContext

Copyright © 2018 www.massapicom. 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.