Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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()));
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
        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);
            }
        }
Exemplo n.º 6
0
        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));
        }
Exemplo n.º 7
0
 public void exception(ICellWrapper <String> cell, string exceptionMessage)
 {
     cell.body("error:" + HtmlTools.wrapInDiv(exceptionMessage));
 }
Exemplo n.º 8
0
 public void right(ICellWrapper <String> expected, RestDataTypeAdapter typeAdapter)
 {
     expected.body("pass:" + HtmlTools.wrapInDiv(Tools.HtmlTools.makeContentForRightCell(expected.body(), typeAdapter, this, minLenForToggle)));
 }