use of org.sonar.plugins.web.visitor.WebSourceCode in project sonar-web by SonarSource.
the class NonConsecutiveHeadingCheckTest method only_h1_tags.
@Test
public void only_h1_tags() throws Exception {
WebSourceCode sourceCode = TestHelper.scan(new File("src/test/resources/checks/NonConsecutiveHeadingCheck/OnlyH1Tags.html"), new NonConsecutiveHeadingCheck());
checkMessagesVerifier.verify(sourceCode.getIssues());
}
use of org.sonar.plugins.web.visitor.WebSourceCode in project sonar-web by SonarSource.
the class PageWithoutTitleCheckTest method detected.
@Test
public void detected() throws Exception {
WebSourceCode sourceCode = TestHelper.scan(new File("src/test/resources/checks/PageWithoutTitleCheck.html"), new PageWithoutTitleCheck());
checkMessagesVerifier.verify(sourceCode.getIssues()).next().atLine(1).withMessage("Add a <title> tag to this page.").next().atLine(5).next().atLine(15).next().atLine(21).next().atLine(25).next().atLine(31).next().atLine(37);
}
use of org.sonar.plugins.web.visitor.WebSourceCode in project sonar-web by SonarSource.
the class ServerSideImageMapsCheckTest method detected.
@Test
public void detected() throws Exception {
WebSourceCode sourceCode = TestHelper.scan(new File("src/test/resources/checks/ServerSideImageMapsCheck.html"), new ServerSideImageMapsCheck());
checkMessagesVerifier.verify(sourceCode.getIssues()).next().atLine(1).withMessage("Use the \"map\" tag and \"area\" tags instead.");
}
use of org.sonar.plugins.web.visitor.WebSourceCode in project sonar-web by SonarSource.
the class TableHeaderHasIdOrScopeCheckTest method detected.
@Test
public void detected() throws Exception {
WebSourceCode sourceCode = TestHelper.scan(new File("src/test/resources/checks/TableHeaderHasIdOrScopeCheck.html"), new TableHeaderHasIdOrScopeCheck());
checkMessagesVerifier.verify(sourceCode.getIssues()).next().atLine(7).withMessage("Add either an 'id' or a 'scope' attribute to this <th> tag.").next().atLine(8).withMessage("Add either an 'id' or a 'scope' attribute to this <tH> tag.").next().atLine(34);
}
use of org.sonar.plugins.web.visitor.WebSourceCode in project sonar-web by SonarSource.
the class TableWithoutCaptionCheckTest method detected.
@Test
public void detected() throws Exception {
WebSourceCode sourceCode = TestHelper.scan(new File("src/test/resources/checks/TableWithoutCaptionCheck.html"), new TableWithoutCaptionCheck());
checkMessagesVerifier.verify(sourceCode.getIssues()).next().atLine(1).withMessage("Add a <caption> tag to this table.");
}
Aggregations