Issue #2161: unify test input locations
This commit is contained in:
parent
d7cf4f652e
commit
284670d938
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package com.puppycrawl.tools.checkstyle.coding;
|
||||
package com.puppycrawl.tools.checkstyle.checks.coding;
|
||||
import java.util.Map;
|
||||
public class InputEqualsAvoidNull {
|
||||
|
||||
Loading…
Reference in New Issue