Remove unnecessarily fully qualified names in test code. #1555
Fixes `UnnecessaryFullyQualifiedName` inspection violations in test code. Description: >Reports on fully qualified class names which can be shortened. The quick fix for this inspection will shorten the fully qualified names, adding import statements as necessary.
This commit is contained in:
parent
0b52fefcc8
commit
681e17be40
|
|
@ -22,8 +22,8 @@ public class CustomImportOrderTest extends BaseCheckTestSupport{
|
|||
String msgNongroup = "custom.import.order.nongroup.import";
|
||||
|
||||
/** Shortcuts to make code more compact */
|
||||
private static final String STD = com.puppycrawl.tools.checkstyle.checks.imports.CustomImportOrderCheck.STANDARD_JAVA_PACKAGE_RULE_GROUP;
|
||||
private static final String SPECIAL = com.puppycrawl.tools.checkstyle.checks.imports.CustomImportOrderCheck.SPECIAL_IMPORTS_RULE_GROUP;
|
||||
private static final String STD = CustomImportOrderCheck.STANDARD_JAVA_PACKAGE_RULE_GROUP;
|
||||
private static final String SPECIAL = CustomImportOrderCheck.SPECIAL_IMPORTS_RULE_GROUP;
|
||||
|
||||
@BeforeClass
|
||||
public static void setConfigurationBuilder() throws CheckstyleException, IOException {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public class EmptyLineSeparatorTest extends BaseCheckTestSupport{
|
|||
@Test
|
||||
public void emptyLineSeparatorTest() throws IOException, Exception {
|
||||
|
||||
java.lang.Class<EmptyLineSeparatorCheck> clazz = EmptyLineSeparatorCheck.class;
|
||||
Class<EmptyLineSeparatorCheck> clazz = EmptyLineSeparatorCheck.class;
|
||||
String messageKey = "empty.line.separator";
|
||||
|
||||
final String[] expected = {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public class EmptyLineSeparatorTest extends BaseCheckTestSupport{
|
|||
@Test
|
||||
public void emptyLineSeparatorTest() throws IOException, Exception {
|
||||
|
||||
java.lang.Class<EmptyLineSeparatorCheck> clazz = EmptyLineSeparatorCheck.class;
|
||||
Class<EmptyLineSeparatorCheck> clazz = EmptyLineSeparatorCheck.class;
|
||||
String messageKey = "empty.line.separator";
|
||||
|
||||
final String[] expected = {
|
||||
|
|
|
|||
|
|
@ -107,8 +107,8 @@ class InputEmptyLineSeparatorCheck //warn
|
|||
}
|
||||
}
|
||||
|
||||
class Class { //ok
|
||||
private Class() {} //ok
|
||||
class Clazz { //ok
|
||||
private Clazz() {} //ok
|
||||
}
|
||||
class Class2{ //warn
|
||||
public int compareTo(InputEmptyLineSeparatorCheck aObject) //ok
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
|
|||
|
||||
/**
|
||||
* The unit-test for the {@code NestedForDepthCheck}-checkstyle enhancement.
|
||||
* @see com.puppycrawl.tools.checkstyle.checks.coding.NestedForDepthCheck
|
||||
* @see NestedForDepthCheck
|
||||
*/
|
||||
public class NestedForDepthCheckTest extends BaseCheckTestSupport {
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -41,11 +41,11 @@ import com.puppycrawl.tools.checkstyle.api.TokenTypes;
|
|||
|
||||
public class CustomImportOrderCheckTest extends BaseCheckTestSupport {
|
||||
/** Shortcuts to make code more compact */
|
||||
private static final String STATIC = com.puppycrawl.tools.checkstyle.checks.imports.CustomImportOrderCheck.STATIC_RULE_GROUP;
|
||||
private static final String SAME = com.puppycrawl.tools.checkstyle.checks.imports.CustomImportOrderCheck.SAME_PACKAGE_RULE_GROUP;
|
||||
private static final String THIRD = com.puppycrawl.tools.checkstyle.checks.imports.CustomImportOrderCheck.THIRD_PARTY_PACKAGE_RULE_GROUP;
|
||||
private static final String STD = com.puppycrawl.tools.checkstyle.checks.imports.CustomImportOrderCheck.STANDARD_JAVA_PACKAGE_RULE_GROUP;
|
||||
private static final String SPECIAL = com.puppycrawl.tools.checkstyle.checks.imports.CustomImportOrderCheck.SPECIAL_IMPORTS_RULE_GROUP;
|
||||
private static final String STATIC = CustomImportOrderCheck.STATIC_RULE_GROUP;
|
||||
private static final String SAME = CustomImportOrderCheck.SAME_PACKAGE_RULE_GROUP;
|
||||
private static final String THIRD = CustomImportOrderCheck.THIRD_PARTY_PACKAGE_RULE_GROUP;
|
||||
private static final String STD = CustomImportOrderCheck.STANDARD_JAVA_PACKAGE_RULE_GROUP;
|
||||
private static final String SPECIAL = CustomImportOrderCheck.SPECIAL_IMPORTS_RULE_GROUP;
|
||||
|
||||
@Test
|
||||
public void testGetRequiredTokens() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue