use of com.puppycrawl.tools.checkstyle.api.Configuration in project checkstyle by checkstyle.
the class RightCurlyTest method rightCurlyTestAlone.
@Test
public void rightCurlyTestAlone() throws Exception {
final String[] expected = { "20:17: " + getCheckMessage(RightCurlyCheck.class, MSG_KEY_LINE_SAME, "}", 17), "32:13: " + getCheckMessage(RightCurlyCheck.class, MSG_KEY_LINE_SAME, "}", 13), "79:27: " + getCheckMessage(RightCurlyCheck.class, MSG_KEY_LINE_BREAK_BEFORE, "}", 27) };
final Configuration checkConfig = getCheckConfig("RightCurly", "RightCurlySame");
final String filePath = getPath("InputRightCurlyOther.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 JavadocMethodTest method javadocMethodTest.
@Test
public void javadocMethodTest() throws Exception {
final String msg = getCheckMessage(JavadocMethodCheck.class, "javadoc.missing");
final String[] expected = { "57:5: " + msg };
final Configuration checkConfig = getCheckConfig("JavadocMethod");
final String filePath = getPath("InputJavadocMethodCheck.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 IndentationTest method correctTest.
@Test
public void correctTest() throws Exception {
final String[] expected = CommonUtils.EMPTY_STRING_ARRAY;
final Configuration checkConfig = getCheckConfig("Indentation");
final String filePath = getPath("InputIndentationCorrect.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 IndentationTest method correctClassTest.
@Test
public void correctClassTest() throws Exception {
final String[] expected = CommonUtils.EMPTY_STRING_ARRAY;
final Configuration checkConfig = getCheckConfig("Indentation");
final String filePath = getPath("InputIndentationCorrectClass.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 IndentationTest method correctForTest.
@Test
public void correctForTest() throws Exception {
final String[] expected = CommonUtils.EMPTY_STRING_ARRAY;
final Configuration checkConfig = getCheckConfig("Indentation");
final String filePath = getPath("InputIndentationCorrectForAndParameter.java");
final Integer[] warnList = getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
Aggregations