Logo Search packages:      
Sourcecode: jodreports version File versions  Download package

void net::sf::jooreports::templates::VisualTemplateTest::testScriptWithSpecialCharsInDirective (  ) throws IOException, DocumentTemplateException [inline]

template contains [if (item.cond1=='yes' && item.cond2=='--')] in JooScript for directive condition

Definition at line 127 of file VisualTemplateTest.java.

        File templateFile = getTestFile("visual-script-special-chars-template.odt");
        Map model = new HashMap();
        List items = new ArrayList();
        model.put("items", items);
        Map one = new HashMap();
        one.put("value", new Integer(1));
        one.put("description", "one");
        one.put("cond1", "yes");
        one.put("cond2", "no");
        Map two = new HashMap();
        two.put("value", new Integer(2));
        two.put("description", "two");
        two.put("cond1", "yes");
        two.put("cond2", "--");
        Map three = new HashMap();
        three.put("value", new Integer(3));
        three.put("description", "three");
        three.put("cond1", "yes");
        three.put("cond2", "no");
        String actual = processTemplate(templateFile, model);
        String expected =
            "one\n" + "1\n"+
            "two\n" + "2\n"+
            "three\n" + "3\n"+
            "Total\n" + "2";
        assertEquals(expected, actual);

Generated by  Doxygen 1.6.0   Back to index