use of com.puppycrawl.tools.checkstyle.api.Configuration in project checkstyle by checkstyle.
the class NoFinalizerTest method noFinalizerBasicTest.
@Test
public void noFinalizerBasicTest() throws Exception {
final String msg = getCheckMessage(NoFinalizerCheck.class, "avoid.finalizer.method");
final String[] expected = { "5: " + msg };
final Configuration checkConfig = getCheckConfig("NoFinalizer");
final String filePath = getPath("InputNoFinalizer.java");
final Integer[] warnList = getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
use of com.puppycrawl.tools.checkstyle.api.Configuration in project checkstyle by checkstyle.
the class SingleLineJavadocTest method singleLineJavadocTest.
@Test
public void singleLineJavadocTest() throws Exception {
final String msg = getCheckMessage(SingleLineJavadocCheck.class, "singleline.javadoc");
final String[] expected = { "5: " + msg, "13: " + msg, "29: " + msg, "32: " + msg, "35: " + msg, "38: " + msg, "41: " + msg };
final Configuration checkConfig = getCheckConfig("SingleLineJavadoc");
final String filePath = getPath("InputSingleLineJavadocCheck.java");
final Integer[] warnList = getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
use of com.puppycrawl.tools.checkstyle.api.Configuration in project checkstyle by checkstyle.
the class JavadocParagraphTest method javadocParagraphCorrectTest.
@Test
public void javadocParagraphCorrectTest() throws Exception {
final String[] expected = CommonUtils.EMPTY_STRING_ARRAY;
final Configuration checkConfig = getCheckConfig("JavadocParagraph");
final String filePath = getPath("InputCorrectJavadocParagraphCheck.java");
final Integer[] warnList = getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
use of com.puppycrawl.tools.checkstyle.api.Configuration in project checkstyle by checkstyle.
the class NonEmptyAtclauseDescriptionTest method testDefaultConfiguration.
@Test
public void testDefaultConfiguration() throws Exception {
final String msg = getCheckMessage(NonEmptyAtclauseDescriptionCheck.class, "non.empty.atclause");
final String[] expected = { "34: " + msg, "35: " + msg, "36: " + msg, "37: " + msg, "38: " + msg, "39: " + msg, "48: " + msg, "49: " + msg, "50: " + msg, "51: " + msg, "52: " + msg };
final Configuration checkConfig = getCheckConfig("NonEmptyAtclauseDescription");
final String filePath = getPath("InputNonEmptyAtclauseDescriptionCheck.java");
final Integer[] warnList = getLineNumbersFromExpected(expected);
verify(checkConfig, filePath, expected, warnList);
}
use of com.puppycrawl.tools.checkstyle.api.Configuration in project checkstyle by checkstyle.
the class SummaryJavadocTest method testCorrect.
@Test
public void testCorrect() throws Exception {
final String[] expected = CommonUtils.EMPTY_STRING_ARRAY;
final Configuration checkConfig = getCheckConfig("SummaryJavadoc");
final String filePath = getPath("InputCorrectSummaryJavaDocCheck.java");
final Integer[] warnList = getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
Aggregations