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

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

template contains [list items as item]

Definition at line 69 of file VisualTemplateTest.java.

        File templateFile = getTestFile("visual-repeat-table-row-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");
        Map two = new HashMap();
        two.put("value", new Integer(2));
        two.put("description", "two");
        Map three = new HashMap();
        three.put("value", new Integer(3));
        three.put("description", "three");
        String actual = processTemplate(templateFile, model);
        String expected =
            "one\n" + "1\n"+
            "two\n" + "2\n"+
            "three\n" + "3\n"+
            "Total\n" + "6";
        assertEquals(expected, actual);

Generated by  Doxygen 1.6.0   Back to index