use of org.sonar.plugins.html.visitor.HtmlSourceCode in project sonar-web by SonarSource.
the class ServerSideImageMapsCheckTest method detected.
@Test
public void detected() throws Exception {
HtmlSourceCode sourceCode = TestHelper.scan(new File("src/test/resources/checks/ServerSideImageMapsCheck.html"), new ServerSideImageMapsCheck());
checkMessagesVerifier.verify(sourceCode.getIssues()).next().atLocation(1, 0, 1, 31).withMessage("Use the \"map\" tag and \"area\" tags instead.");
}
use of org.sonar.plugins.html.visitor.HtmlSourceCode in project sonar-web by SonarSource.
the class LangAttributeCheckTest method detected.
@Test
public void detected() throws Exception {
HtmlSourceCode sourceCode = TestHelper.scan(new File("src/test/resources/checks/LangAttributeCheck.html"), new LangAttributeCheck());
checkMessagesVerifier.verify(sourceCode.getIssues()).next().atLocation(1, 0, 1, 6).withMessage("Add \"lang\" and/or \"xml:lang\" attributes to this \"<html>\" element");
}
use of org.sonar.plugins.html.visitor.HtmlSourceCode in project sonar-web by SonarSource.
the class LayoutTableWithSemanticMarkupCheckTest method detected.
@Test
public void detected() throws Exception {
HtmlSourceCode sourceCode = TestHelper.scan(new File("src/test/resources/checks/LayoutTableWithSemanticMarkupCheck.html"), new LayoutTableWithSemanticMarkupCheck());
checkMessagesVerifier.verify(sourceCode.getIssues()).next().atLine(17).withMessage("Remove this \"summary\" attribute").next().atLocation(18, 2, 18, 11).withMessage("Remove this \"caption\" element").next().atLine(20).withMessage("Remove this \"th\" element").next().atLine(34).withMessage("Remove this \"headers\" attribute").next().atLine(35).withMessage("Remove this \"scope\" attribute").next().atLine(39);
}
use of org.sonar.plugins.html.visitor.HtmlSourceCode in project sonar-web by SonarSource.
the class LinksIdenticalTextsDifferentTargetsCheckTest method detected.
@Test
public void detected() throws Exception {
HtmlSourceCode sourceCode = TestHelper.scan(new File("src/test/resources/checks/LinksIdenticalTextsDifferentTargetsCheck.html"), new LinksIdenticalTextsDifferentTargetsCheck());
checkMessagesVerifier.verify(sourceCode.getIssues()).next().atLine(5).next().atLine(8).next().atLine(11).next().atLine(15).next().atLine(23);
}
use of org.sonar.plugins.html.visitor.HtmlSourceCode in project sonar-web by SonarSource.
the class MouseEventWithoutKeyboardEquivalentCheckTest method detected.
@Test
public void detected() throws Exception {
HtmlSourceCode sourceCode = TestHelper.scan(new File("src/test/resources/checks/MouseEventWithoutKeyboardEquivalentCheck.html"), new MouseEventWithoutKeyboardEquivalentCheck());
checkMessagesVerifier.verify(sourceCode.getIssues()).next().atLocation(1, 0, 1, 32).withMessage("Add a 'onFocus' attribute to this <A> tag.").next().atLine(2).withMessage("Add a 'onBlur' attribute to this <a> tag.").next().atLine(14).withMessage("Add a 'onFocus' attribute to this <a> tag.").next().atLine(15).next().atLine(24).next().atLine(25).next().atLine(35).next().atLine(36).next().atLine(46).next().atLine(51).next().atLine(53).next().atLine(54).next().atLine(58).withMessage("Add a 'onKeyPress|onKeyDown|onKeyUp' attribute to this <div> tag.").next().atLine(59).next().atLine(65).next().atLine(68).next().atLine(70).next().atLine(71);
}
Aggregations