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

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

template contains jooscript for changing tag attribute syntax: #location
attributeName=value

Definition at line 174 of file VisualTemplateTest.java.

                                                                                          {
        File templateFile = getTestFile("visual-table-span-row-template.odt");
        Map model = new HashMap();
        List items = new ArrayList();
        model.put("items", items);
        Map one = new HashMap();
        one.put("col1", "cell 1a");
        one.put("col2", "cell 1b");
        one.put("rowspan", Integer.valueOf(2));
        items.add(one);
        Map two = new HashMap();
        two.put("col1", "cell 2a");
        two.put("col2", "cell 2b");
        two.put("rowspan", Integer.valueOf(0));
        items.add(two);
        Map three = new HashMap();
        three.put("col1", "cell 3a");
        three.put("col2", "cell 3b");
        three.put("rowspan", Integer.valueOf(1));
        items.add(three);
        String actual = processTemplate(templateFile, model);
        String expected =
            "cell 1a\n"+
                  "cell 1b\n"+
                  "cell 2b\n"+
                  "cell 3a\n"+
                  "cell 3b";
        assertEquals(expected, actual);
    }

Generated by  Doxygen 1.6.0   Back to index