use of com.puppycrawl.tools.checkstyle.checks.coding.OverloadMethodsDeclarationOrderCheck in project checkstyle by checkstyle.
the class OverloadMethodsDeclarationOrderTest method overloadMethodsTest.
@Test
public void overloadMethodsTest() throws Exception {
final Class<OverloadMethodsDeclarationOrderCheck> clazz = OverloadMethodsDeclarationOrderCheck.class;
final String messageKey = "overload.methods.declaration";
final String[] expected = { "26: " + getCheckMessage(clazz, messageKey, 15), "54: " + getCheckMessage(clazz, messageKey, 43), "66: " + getCheckMessage(clazz, messageKey, 64), "109: " + getCheckMessage(clazz, messageKey, 98) };
final Configuration checkConfig = getCheckConfig("OverloadMethodsDeclarationOrder");
final String filePath = getPath("InputOverloadMethodsDeclarationOrder.java");
final Integer[] warnList = getLinesWithWarn(filePath);
verify(checkConfig, filePath, expected, warnList);
}
Aggregations