Issue #2161: unify test input locations

This commit is contained in:
rnveach 2015-10-10 23:41:34 -04:00 committed by Roman Ivanov
parent d7cf4f652e
commit 284670d938
2 changed files with 10 additions and 3 deletions

View File

@ -23,6 +23,7 @@ import static com.puppycrawl.tools.checkstyle.checks.coding.EqualsAvoidNullCheck
import static com.puppycrawl.tools.checkstyle.checks.coding.EqualsAvoidNullCheck.MSG_EQUALS_IGNORE_CASE_AVOID_NULL;
import java.io.File;
import java.io.IOException;
import org.junit.Assert;
import org.junit.Test;
@ -31,6 +32,12 @@ import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
public class EqualsAvoidNullCheckTest extends BaseCheckTestSupport {
@Override
protected String getPath(String filename) throws IOException {
return super.getPath("checks" + File.separator
+ "coding" + File.separator + filename);
}
@Test
public void testEqualsWithDefault() throws Exception {
final DefaultConfiguration checkConfig =
@ -89,7 +96,7 @@ public class EqualsAvoidNullCheckTest extends BaseCheckTestSupport {
"368:30: " + getCheckMessage(MSG_EQUALS_AVOID_NULL),
"394:35: " + getCheckMessage(MSG_EQUALS_AVOID_NULL),
};
verify(checkConfig, getPath("coding" + File.separator + "InputEqualsAvoidNull.java"), expected);
verify(checkConfig, getPath("InputEqualsAvoidNull.java"), expected);
}
@Test
@ -139,7 +146,7 @@ public class EqualsAvoidNullCheckTest extends BaseCheckTestSupport {
"368:30: " + getCheckMessage(MSG_EQUALS_AVOID_NULL),
"394:35: " + getCheckMessage(MSG_EQUALS_AVOID_NULL),
};
verify(checkConfig, getPath("coding" + File.separator + "InputEqualsAvoidNull.java"), expected);
verify(checkConfig, getPath("InputEqualsAvoidNull.java"), expected);
}
@Test

View File

@ -1,4 +1,4 @@
package com.puppycrawl.tools.checkstyle.coding;
package com.puppycrawl.tools.checkstyle.checks.coding;
import java.util.Map;
public class InputEqualsAvoidNull {