use of org.sonar.plugins.html.visitor.HtmlSourceCode in project sonar-web by SonarSource.
the class ItemTagNotWithinContainerTagCheckTest method detected.
@Test
public void detected() throws Exception {
HtmlSourceCode sourceCode = TestHelper.scan(new File("src/test/resources/checks/ItemTagNotWithinContainerTagCheck.html"), new ItemTagNotWithinContainerTagCheck());
checkMessagesVerifier.verify(sourceCode.getIssues()).next().atLocation(1, 0, 1, 4).withMessage("Surround this <li> item tag by a <ul> or <ol> container one.").next().atLocation(4, 0, 4, 4).withMessage("Surround this <DT> item tag by a <dl> container one.").next().atLine(8).withMessage("Surround this <lI> item tag by a <ul> or <ol> container one.").next().atLine(18);
}
use of org.sonar.plugins.html.visitor.HtmlSourceCode in project sonar-web by SonarSource.
the class LayoutTableCheckTest method detected.
@Test
public void detected() throws Exception {
HtmlSourceCode sourceCode = TestHelper.scan(new File("src/test/resources/checks/LayoutTableCheck.html"), new LayoutTableCheck());
checkMessagesVerifier.verify(sourceCode.getIssues()).next().atLocation(19, 0, 19, 27).withMessage("Replace this layout table with a CSS layout.").next().atLine(25).next().atLine(31);
}
use of org.sonar.plugins.html.visitor.HtmlSourceCode in project sonar-web by SonarSource.
the class DoctypePresenceCheckTest method doctype_after_html.
@Test
public void doctype_after_html() throws Exception {
HtmlSourceCode sourceCode = TestHelper.scan(new File("src/test/resources/checks/DoctypePresenceCheck/DoctypeAfterHtml.html"), new DoctypePresenceCheck());
checkMessagesVerifier.verify(sourceCode.getIssues()).next().atLine(1);
}
use of org.sonar.plugins.html.visitor.HtmlSourceCode in project sonar-web by SonarSource.
the class DoctypePresenceCheckTest method no_doctype_before_foo.
@Test
public void no_doctype_before_foo() throws Exception {
HtmlSourceCode sourceCode = TestHelper.scan(new File("src/test/resources/checks/DoctypePresenceCheck/NoDoctypeBeforeFoo.html"), new DoctypePresenceCheck());
checkMessagesVerifier.verify(sourceCode.getIssues());
}
use of org.sonar.plugins.html.visitor.HtmlSourceCode in project sonar-web by SonarSource.
the class DoctypePresenceCheckTest method no_doctype_before_html.
@Test
public void no_doctype_before_html() throws Exception {
HtmlSourceCode sourceCode = TestHelper.scan(new File("src/test/resources/checks/DoctypePresenceCheck/NoDoctypeBeforeHtml.html"), new DoctypePresenceCheck());
checkMessagesVerifier.verify(sourceCode.getIssues()).next().atLocation(3, 0, 3, 6).withMessage("Insert a <!DOCTYPE> declaration to before this <hTmL> tag.");
}
Aggregations