public String ResultingHTML() { Parse table = new Parse(OriginalHTML); Parse row = table.at(0, Row - 1); Parse cell = row.at(0, Column - 1); if (OverwriteCellBody != null) cell.body = OverwriteCellBody; if (AddToCellBody != null) cell.addToBody(AddToCellBody); if (OverwriteCellTag != null) cell.tag = OverwriteCellTag; if (OverwriteEndCellTag != null) cell.end = OverwriteEndCellTag; if (AddToCellTag != null) cell.addToTag(stripDelimiters(AddToCellTag)); if (OverwriteRowTag != null) row.tag = OverwriteRowTag; if (OverwriteEndRowTag != null) row.end = OverwriteEndRowTag; if (AddToRowTag != null) row.addToTag(stripDelimiters(AddToRowTag)); if (OverwriteTableTag != null) table.tag = OverwriteTableTag; if (OverwriteEndTableTag != null) table.end = OverwriteEndTableTag; if (AddToTableTag != null) table.addToTag(stripDelimiters(AddToTableTag)); if (AddCellFollowing != null) addParse(cell, AddCellFollowing, new String[] {"td"}); if (RemoveFollowingCell != null) removeParse(cell); if (AddRowFollowing != null) addParse(row, AddRowFollowing, new String[] {"tr", "td"}); if (RemoveFollowingRow != null) removeParse(row); if (AddTableFollowing != null) addParse(table, AddTableFollowing, new String[] {"table", "tr", "td"}); return GenerateOutput(table); }
/* Added from FitNesse*/ protected Fixture getLinkedFixtureWithArgs(Parse tables) { Parse header = tables.at(0, 0, 0); Fixture fixture = loadFixture(header.text()); fixture.counts = counts; fixture.summary = summary; fixture.getArgsForTable(tables); return(fixture); }
public void testIndexing() { Parse p = new Parse("leader<table><tr><td>one</td><td>two</td><td>three</td></tr><tr><td>four</td></tr></table>trailer"); Assert.AreEqual("one", p.at(0,0,0).body); Assert.AreEqual("two", p.at(0,0,1).body); Assert.AreEqual("three", p.at(0,0,2).body); Assert.AreEqual("three", p.at(0,0,3).body); Assert.AreEqual("three", p.at(0,0,4).body); Assert.AreEqual("four", p.at(0,1,0).body); Assert.AreEqual("four", p.at(0,1,1).body); Assert.AreEqual("four", p.at(0,2,0).body); Assert.AreEqual(1, p.size()); Assert.AreEqual(2, p.parts.size()); Assert.AreEqual(3, p.parts.parts.size()); Assert.AreEqual("one", p.leaf().body); Assert.AreEqual("four", p.parts.last().leaf().body); }
public void testIndexing() { Parse p = new Parse("leader<table><tr><td>one</td><td>two</td><td>three</td></tr><tr><td>four</td></tr></table>trailer"); Assert.AreEqual("one", p.at(0, 0, 0).body); Assert.AreEqual("two", p.at(0, 0, 1).body); Assert.AreEqual("three", p.at(0, 0, 2).body); Assert.AreEqual("three", p.at(0, 0, 3).body); Assert.AreEqual("three", p.at(0, 0, 4).body); Assert.AreEqual("four", p.at(0, 1, 0).body); Assert.AreEqual("four", p.at(0, 1, 1).body); Assert.AreEqual("four", p.at(0, 2, 0).body); Assert.AreEqual(1, p.size()); Assert.AreEqual(2, p.parts.size()); Assert.AreEqual(3, p.parts.parts.size()); Assert.AreEqual("one", p.leaf().body); Assert.AreEqual("four", p.parts.last().leaf().body); }
public virtual Parse at(int i) { return(i == 0 || more == null ? this : more.at(i - 1)); }
public Parse FixtureName(Parse tables) { return(tables.at(0, 0, 0)); }
/* Added from FitNesse*/ protected Fixture getLinkedFixtureWithArgs(Parse tables) { Parse header = tables.at(0, 0, 0); Fixture fixture = loadFixture(header.text()); fixture.counts = counts; fixture.summary = summary; fixture.getArgsForTable(tables); return fixture; }
public Parse FixtureName(Parse tables) { return tables.at(0, 0, 0); }