use of com.puppycrawl.tools.checkstyle.DefaultConfiguration in project checkstyle by checkstyle.
the class HideUtilityClassConstructorCheckTest method testProtectedCtor.
@Test
public void testProtectedCtor() throws Exception {
final DefaultConfiguration checkConfig = createCheckConfig(HideUtilityClassConstructorCheck.class);
final String[] expected = CommonUtils.EMPTY_STRING_ARRAY;
verify(checkConfig, getPath("InputHideUtilityClassConstructor.java"), expected);
}
use of com.puppycrawl.tools.checkstyle.DefaultConfiguration in project checkstyle by checkstyle.
the class OneTopLevelClassCheckTest method testFileWithThreeTopLevelEnum.
@Test
public void testFileWithThreeTopLevelEnum() throws Exception {
final DefaultConfiguration checkConfig = createCheckConfig(OneTopLevelClassCheck.class);
final String[] expected = { "3: " + getCheckMessage(MSG_KEY, "InputOneTopLevelEnum2inner1"), "11: " + getCheckMessage(MSG_KEY, "InputOneTopLevelEnum2inner2") };
verify(checkConfig, getPath("InputOneTopLevelEnum2.java"), expected);
}
use of com.puppycrawl.tools.checkstyle.DefaultConfiguration in project checkstyle by checkstyle.
the class OneTopLevelClassCheckTest method testFileWithFewTopLevelClasses.
@Test
public void testFileWithFewTopLevelClasses() throws Exception {
final DefaultConfiguration checkConfig = createCheckConfig(OneTopLevelClassCheck.class);
final String[] expected = { "25: " + getCheckMessage(MSG_KEY, "NoSuperClone"), "29: " + getCheckMessage(MSG_KEY, "InnerClone"), "33: " + getCheckMessage(MSG_KEY, "CloneWithTypeArguments"), "37: " + getCheckMessage(MSG_KEY, "CloneWithTypeArgumentsAndNoSuper"), "41: " + getCheckMessage(MSG_KEY, "MyClassWithGenericSuperMethod"), "45: " + getCheckMessage(MSG_KEY, "AnotherClass"), "48: " + getCheckMessage(MSG_KEY, "NativeTest") };
verify(checkConfig, getPath("InputClone.java"), expected);
}
use of com.puppycrawl.tools.checkstyle.DefaultConfiguration in project checkstyle by checkstyle.
the class OneTopLevelClassCheckTest method testFileWithSecondEnumTopLevelClass.
@Test
public void testFileWithSecondEnumTopLevelClass() throws Exception {
final DefaultConfiguration checkConfig = createCheckConfig(OneTopLevelClassCheck.class);
final String[] expected = { "10: " + getCheckMessage(MSG_KEY, "InputDeclarationOrderEnum") };
verify(checkConfig, getPath("InputDeclarationOrder.java"), expected);
}
use of com.puppycrawl.tools.checkstyle.DefaultConfiguration in project checkstyle by checkstyle.
the class OneTopLevelClassCheckTest method testFileWithOneTopLevelEnum.
@Test
public void testFileWithOneTopLevelEnum() throws Exception {
final DefaultConfiguration checkConfig = createCheckConfig(OneTopLevelClassCheck.class);
final String[] expected = CommonUtils.EMPTY_STRING_ARRAY;
verify(checkConfig, getPath("InputOneTopLevelEnum.java"), expected);
}
Aggregations