public void right(ICellWrapper <Parse> expected, RestDataTypeAdapter typeAdapter) { string expectedContent = expected.body(); expected.body(Tools.HtmlTools.makeContentForRightCell(expectedContent, typeAdapter, this, minLenForToggle)); fixture.Right(expected.Wrapped); }
public void wrong(ICellWrapper <String> expected, RestDataTypeAdapter ta) { string expectedContent = expected.body(); expected.body(Tools.HtmlTools.makeContentForWrongCell(expectedContent, ta, this, minLenForToggle)); expected.body("fail:" + HtmlTools.wrapInDiv(expected.body())); }
public void wrong(ICellWrapper <Parse> expected, RestDataTypeAdapter typeAdapter) { string expectedContent = expected.body(); string body = Tools.HtmlTools.makeContentForWrongCell(expectedContent, typeAdapter, this, minLenForToggle); expected.body(body); fixture.Wrong(expected.Wrapped); }
public void exception(ICellWrapper <String> cell, Exception exception) { //String m = Tools.toHtml(cell.getWrapped() + "\n-----\n") + Tools.toCode(Tools.toHtml(out.toString())); string m = HtmlTools.toHtml(cell.Wrapped + "\n-----\n") + HtmlTools.toCode(HtmlTools.toHtml(exception.ToString())); cell.body("error:" + HtmlTools.wrapInDiv(m)); //cell.body("error:" + m); }
public void check(ICellWrapper <Parse> expected, RestDataTypeAdapter actual) { if (string.IsNullOrWhiteSpace(expected.body())) { if (actual.Actual == null) { return; } else { expected.body(gray(actual.Actual.ToString())); return; } } if (actual.Actual != null && actual.Equals(expected.body(), actual.Actual.ToString())) { right(expected, actual); } else { wrong(expected, actual); } }
public void asLink(ICellWrapper <Parse> cell, string resolvedUrl, string link, string text) { string actualText = text; string parsed = null; if (displayAbsoluteURLInFull) { parsed = HtmlTools.fromSimpleTag(resolvedUrl); if (parsed.Trim().StartsWith("http", StringComparison.Ordinal)) { actualText = parsed; } } cell.body(HtmlTools.toHtmlLink(link, actualText)); }
public void exception(ICellWrapper <String> cell, string exceptionMessage) { cell.body("error:" + HtmlTools.wrapInDiv(exceptionMessage)); }
public void right(ICellWrapper <String> expected, RestDataTypeAdapter typeAdapter) { expected.body("pass:" + HtmlTools.wrapInDiv(Tools.HtmlTools.makeContentForRightCell(expected.body(), typeAdapter, this, minLenForToggle))); }