use of com.puppycrawl.tools.checkstyle.DefaultConfiguration in project checkstyle by checkstyle.
the class MutableExceptionCheckTest method testClassExtendsGenericClass.
@Test
public void testClassExtendsGenericClass() throws Exception {
final DefaultConfiguration checkConfig = createCheckConfig(MutableExceptionCheck.class);
final String[] expected = CommonUtils.EMPTY_STRING_ARRAY;
verify(checkConfig, getPath("InputMutableExceptionClassExtendsGenericClass.java"), expected);
}
use of com.puppycrawl.tools.checkstyle.DefaultConfiguration in project checkstyle by checkstyle.
the class MutableExceptionCheckTest method testDefault.
@Test
public void testDefault() throws Exception {
final DefaultConfiguration checkConfig = createCheckConfig(MutableExceptionCheck.class);
final String[] expected = { "6:9: " + getCheckMessage(MSG_KEY, "errorCode"), "23:9: " + getCheckMessage(MSG_KEY, "errorCode"), "46:9: " + getCheckMessage(MSG_KEY, "errorCode") };
verify(checkConfig, getPath("InputMutableException.java"), expected);
}
use of com.puppycrawl.tools.checkstyle.DefaultConfiguration in project checkstyle by checkstyle.
the class ReturnCountCheckTest method testLambdasOnly.
@Test
public void testLambdasOnly() throws Exception {
final DefaultConfiguration checkConfig = createCheckConfig(ReturnCountCheck.class);
checkConfig.addAttribute("tokens", "LAMBDA");
final String[] expected = { "34:42: " + getCheckMessage(MSG_KEY, 3, 2) };
verify(checkConfig, getPath("InputReturnCountLambda.java"), expected);
}
use of com.puppycrawl.tools.checkstyle.DefaultConfiguration in project checkstyle by checkstyle.
the class SimplifyBooleanExpressionCheckTest method testIt.
@Test
public void testIt() throws Exception {
final DefaultConfiguration checkConfig = createCheckConfig(SimplifyBooleanExpressionCheck.class);
final String[] expected = { "20:18: " + getCheckMessage(MSG_KEY), "41:36: " + getCheckMessage(MSG_KEY), "42:36: " + getCheckMessage(MSG_KEY), "43:16: " + getCheckMessage(MSG_KEY), "43:32: " + getCheckMessage(MSG_KEY) };
verify(checkConfig, getPath("InputSimplifyBoolean.java"), expected);
}
use of com.puppycrawl.tools.checkstyle.DefaultConfiguration in project checkstyle by checkstyle.
the class UnnecessaryParenthesesCheckTest method test15Extensions.
@Test
public void test15Extensions() throws Exception {
final DefaultConfiguration checkConfig = createCheckConfig(UnnecessaryParenthesesCheck.class);
final String[] expected = CommonUtils.EMPTY_STRING_ARRAY;
verify(checkConfig, getPath("Input15Extensions.java"), expected);
}
Aggregations