private string TestOutput() { if (Request.UrlReferrer == null) return "couldn't find referring page"; Parse tables = new Parse(ReadContents(Request.UrlReferrer)); new Fixture().doTables(tables); using (StringWriter writer = new StringWriter()) { tables.print(writer); return writer.ToString(); } }
public override void process() { try { string[] tags = {"wiki", "table", "tr", "td"}; tables = new Parse(input, tags); // look for wiki tag enclosing tables fixture.doTables(tables.parts); // only do tables within that tag } catch (Exception e) { exception(e); } tables.print(output); }
public override void process() { try { string[] tags = { "wiki", "table", "tr", "td" }; tables = new Parse(input, tags); // look for wiki tag enclosing tables fixture.doTables(tables.parts); // only do tables within that tag } catch (Exception e) { exception(e); } tables.print(output); }
public virtual void process() { try { tables = new Parse(input); fixture.doTables(tables); } catch (Exception e) { exception(e); } tables.print(output); }
public virtual void print(TextWriter output) { output.Write(leader); output.Write(tag); if (parts != null) { parts.print(output); } else { output.Write(body); } output.Write(end); if (more != null) { more.print(output); } else { output.Write(trailer); } }
// code smell note: copied from DocumentParseFixture private String GenerateOutput(Parse parse) { StringWriter result = new StringWriter(); parse.print(result); return result.ToString().Trim(); }