Beispiel #1
0
 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));
         }
 }
Beispiel #2
0
 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));
 }
Beispiel #3
0
 public void ValidateHtml5AgainstW3C_DoesNotThrow(string file)
 {
     using (var conn = new AutoCheck.Core.Connectors.Html(GetSampleFile(file)))
         Assert.DoesNotThrow(() => conn.ValidateHtml5AgainstW3C());
 }
Beispiel #4
0
 public void ValidateHtml5AgainstW3C_Throws_DocumentInvalidException(string file)
 {
     using (var conn = new AutoCheck.Core.Connectors.Html(GetSampleFile(file)))
         Assert.Throws <DocumentInvalidException>(() => conn.ValidateHtml5AgainstW3C());
 }
Beispiel #5
0
 public void CheckTableConsistence_DoesNotThrow(string file, string xpath)
 {
     using (var conn = new AutoCheck.Core.Connectors.Html(GetSampleFile(file)))
         Assert.DoesNotThrow(() => conn.ValidateTable(xpath));
 }
Beispiel #6
0
 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));
 }
Beispiel #7
0
 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());
 }
Beispiel #8
0
 public int ContentLength_DoesNotThrow(string file, string xpath)
 {
     using (var conn = new AutoCheck.Core.Connectors.Html(GetSampleFile(file)))
         return(conn.ContentLength(xpath));
 }
Beispiel #9
0
 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));
 }