Beispiel #1
0
  void buildTableFooterRows(table table, ReportBuilderArgs args) {

    tfoot footer = new tfoot();
    footer.setPrettyPrint(true);
    table.addElement(footer);

    for (GridRow row : getFooterRows()) {
      row.build(footer, args);
    }
  }
Beispiel #2
0
  void buildTableHeaderRows(table table, ReportBuilderArgs args) {

    thead header = new thead();
    header.setPrettyPrint(true);
    table.addElement(header);

    for (GridRow row : getHeaderRows()) {
      row.build(header, args);
    }
  }
Beispiel #3
0
  void buildTableWithoutGroups(table table, ReportBuilderArgs args) {

    tbody tbody = new tbody();
    tbody.setPrettyPrint(true);
    table.addElement(tbody);

    for (Object[] dataRow : args.getCurrentDataSet().getRows()) {
      // build rows (<tr>)
      for (GridRow row : getRows()) {
        args.setCurrentDataRow(dataRow);
        row.build(tbody, args);
      }
    }
  }
Beispiel #4
0
  void buildTableWithGroups(table table, ReportBuilderArgs args) {

    // 1) Need to sort groups (desc?)
    // 2) Need to sort data based on groups?? do we?? i don't know!
    // 3) Render header rows
    // 4) Render body rows
    // 5) Render footer rows

    tbody tbody = new tbody();
    tbody.setPrettyPrint(true);
    table.addElement(tbody);

    for (Object[] dataRow : args.getCurrentDataSet().getRows()) {
      // build rows (<tr>)
      for (GridRow row : getRows()) {
        args.setCurrentDataRow(dataRow);
        row.build(tbody, args);
      }
    }
  }
Beispiel #5
0
 @Test(dataProvider = "testConstructorPathDataProvider1")
 public void getPathSelectorCorrectlyFromConstructors1(GridRow gridRow, String expectedXpath) {
   Assert.assertEquals(gridRow.getXPath(), expectedXpath);
 }