public void testSkipsInformativeSections() {
    Example tables =
        parse(
            "[First table]\n"
                + "****\n"
                + "[Begin Info]\n"
                + "****\n"
                + "[Should be skipped]\n"
                + "****\n"
                + "[End Info]\n"
                + "****\n"
                + "[Next table]\n"
                + "****\n"
                + "[Begin Info]\n"
                + "****\n"
                + "[Should be skipped too]\n"
                + "****\n"
                + "[End Info]\n"
                + "****\n"
                + "[Begin Info]\n"
                + "****\n"
                + "[Should be skipped]\n"
                + "****\n"
                + "[End Info]\n"
                + "****\n"
                + "[Last table]");

    assertEquals("First table", tables.at(0, 0, 0).getContent());
    tables = filter.filter(tables.nextSibling());
    assertEquals("Next table", tables.at(0, 0, 0).getContent());
    tables = filter.filter(tables.nextSibling());
    tables = filter.filter(tables);
    assertEquals("Last table", tables.at(0, 0, 0).getContent());
  }
Esempio n. 2
0
 public List<Example> actionCells(Example row) {
   return ExampleUtil.asList(row.at(0, 1));
 }