public bool PropertyApplied_DoesNotThrow(string htmlFile, string cssFile, string property, string value) { using (var html = new AutoCheck.Core.Connectors.Html(GetSampleFile("html", htmlFile))) using (var css = new AutoCheck.Core.Connectors.Css(GetSampleFile(cssFile))) { return(css.PropertyApplied(html.HtmlDoc, property, value)); } }
public int CountNodes_DoesNotThrow(string file, string xpath) { //Internally uses SelectNodes using (var conn = new AutoCheck.Core.Connectors.Html(GetSampleFile(file))) return(conn.CountNodes(xpath)); }
public void ValidateHtml5AgainstW3C_DoesNotThrow(string file) { using (var conn = new AutoCheck.Core.Connectors.Html(GetSampleFile(file))) Assert.DoesNotThrow(() => conn.ValidateHtml5AgainstW3C()); }
public void ValidateHtml5AgainstW3C_Throws_DocumentInvalidException(string file) { using (var conn = new AutoCheck.Core.Connectors.Html(GetSampleFile(file))) Assert.Throws <DocumentInvalidException>(() => conn.ValidateHtml5AgainstW3C()); }
public void CheckTableConsistence_DoesNotThrow(string file, string xpath) { using (var conn = new AutoCheck.Core.Connectors.Html(GetSampleFile(file))) Assert.DoesNotThrow(() => conn.ValidateTable(xpath)); }
public void CheckTableConsistence_Throws_TableInconsistencyException(string file, string xpath) { //TODO: check for rowspan consistency using (var conn = new AutoCheck.Core.Connectors.Html(GetSampleFile(file))) Assert.Throws <TableInconsistencyException>(() => conn.ValidateTable(xpath)); }
public int[] GetRelatedLabels_DoesNotThrow(string file, string xpath) { using (var conn = new AutoCheck.Core.Connectors.Html(GetSampleFile(file))) return(conn.GetRelatedLabels(xpath).Select(x => x.Value.Count()).ToArray()); }
public int ContentLength_DoesNotThrow(string file, string xpath) { using (var conn = new AutoCheck.Core.Connectors.Html(GetSampleFile(file))) return(conn.ContentLength(xpath)); }
public int[] CountSiblings_DoesNotThrow(string file, string xpath) { //Internally uses GroupSiblings using (var conn = new AutoCheck.Core.Connectors.Html(GetSampleFile(file))) return(conn.CountSiblings(xpath)); }