use of com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyLineSeparatorCheck in project checkstyle by checkstyle.
the class EmptyLineSeparatorTest method emptyLineSeparatorTest.
@Test
public void emptyLineSeparatorTest() throws Exception {
final Class<EmptyLineSeparatorCheck> clazz = EmptyLineSeparatorCheck.class;
final String messageKey = "empty.line.separator";
final String[] expected = { "19: " + getCheckMessage(clazz, messageKey, "package"), "20: " + getCheckMessage(clazz, messageKey, "import"), "33: " + getCheckMessage(clazz, messageKey, "CLASS_DEF"), "37: " + getCheckMessage(clazz, messageKey, "STATIC_INIT"), "66: " + getCheckMessage(clazz, messageKey, "METHOD_DEF"), "75: " + getCheckMessage(clazz, messageKey, "INTERFACE_DEF"), "82: " + getCheckMessage(clazz, messageKey, "INSTANCE_INIT"), "113: " + getCheckMessage(clazz, messageKey, "CLASS_DEF"), "119: " + getCheckMessage(clazz, messageKey, "VARIABLE_DEF") };
final Configuration checkConfig = getCheckConfig("EmptyLineSeparator");
final String filePath = getPath("InputEmptyLineSeparator.java");
final Integer[] warnList = getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
use of com.puppycrawl.tools.checkstyle.checks.whitespace.EmptyLineSeparatorCheck in project checkstyle by checkstyle.
the class EmptyLineSeparatorTest method emptyLineSeparatorTest.
@Test
public void emptyLineSeparatorTest() throws Exception {
final Class<EmptyLineSeparatorCheck> clazz = EmptyLineSeparatorCheck.class;
final String messageKey = "empty.line.separator";
final String[] expected = { "19: " + getCheckMessage(clazz, messageKey, "package"), "20: " + getCheckMessage(clazz, messageKey, "import"), "33: " + getCheckMessage(clazz, messageKey, "CLASS_DEF"), "37: " + getCheckMessage(clazz, messageKey, "STATIC_INIT"), "66: " + getCheckMessage(clazz, messageKey, "METHOD_DEF"), "75: " + getCheckMessage(clazz, messageKey, "INTERFACE_DEF"), "82: " + getCheckMessage(clazz, messageKey, "INSTANCE_INIT"), "113: " + getCheckMessage(clazz, messageKey, "CLASS_DEF"), "119: " + getCheckMessage(clazz, messageKey, "VARIABLE_DEF") };
final Configuration checkConfig = getCheckConfig("EmptyLineSeparator");
final String filePath = getPath("InputEmptyLineSeparator.java");
final Integer[] warnList = getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
Aggregations