use of com.puppycrawl.tools.checkstyle.DefaultConfiguration in project checkstyle by checkstyle.
the class HideUtilityClassConstructorCheckTest method testEmptyAbstractClass.
@Test
public void testEmptyAbstractClass() throws Exception {
final DefaultConfiguration checkConfig = createCheckConfig(HideUtilityClassConstructorCheck.class);
final String[] expected = CommonUtils.EMPTY_STRING_ARRAY;
verify(checkConfig, getPath("InputHideUtilityClassConstructor3041574_1.java"), expected);
}
use of com.puppycrawl.tools.checkstyle.DefaultConfiguration in project checkstyle by checkstyle.
the class InnerTypeLastCheckTest method testMembersBeforeInner.
@Test
public void testMembersBeforeInner() throws Exception {
final DefaultConfiguration checkConfig = createCheckConfig(InnerTypeLastCheck.class);
final String[] expected = { "44:9: " + getCheckMessage(MSG_KEY), "65:9: " + getCheckMessage(MSG_KEY), "69:9: " + getCheckMessage(MSG_KEY), "78:5: " + getCheckMessage(MSG_KEY), "95:9: " + getCheckMessage(MSG_KEY) };
verify(checkConfig, getPath("InputInnerClass.java"), expected);
}
use of com.puppycrawl.tools.checkstyle.DefaultConfiguration in project checkstyle by checkstyle.
the class InterfaceIsTypeCheckTest method testDefault.
@Test
public void testDefault() throws Exception {
final DefaultConfiguration checkConfig = createCheckConfig(InterfaceIsTypeCheck.class);
final String[] expected = { "25: " + getCheckMessage(MSG_KEY) };
verify(checkConfig, getPath("InputInterfaceIsType.java"), expected);
}
use of com.puppycrawl.tools.checkstyle.DefaultConfiguration in project checkstyle by checkstyle.
the class InterfaceIsTypeCheckTest method testAllowMarker.
@Test
public void testAllowMarker() throws Exception {
final DefaultConfiguration checkConfig = createCheckConfig(InterfaceIsTypeCheck.class);
checkConfig.addAttribute("allowMarkerInterfaces", "false");
final String[] expected = { "20: " + getCheckMessage(MSG_KEY), "25: " + getCheckMessage(MSG_KEY) };
verify(checkConfig, getPath("InputInterfaceIsType.java"), expected);
}
use of com.puppycrawl.tools.checkstyle.DefaultConfiguration in project checkstyle by checkstyle.
the class MutableExceptionCheckTest method testFormat.
@Test
public void testFormat() throws Exception {
final DefaultConfiguration checkConfig = createCheckConfig(MutableExceptionCheck.class);
checkConfig.addAttribute("format", "^.*Failure$");
checkConfig.addAttribute("extendedClassNameFormat", "^.*ThreadDeath$");
final String[] expected = { "34:13: " + getCheckMessage(MSG_KEY, "errorCode") };
verify(checkConfig, getPath("InputMutableException.java"), expected);
}
Aggregations