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:
Michal Kordas 2015-08-17 23:11:44 +02:00 committed by Roman Ivanov
parent 0b52fefcc8
commit 681e17be40
6 changed files with 12 additions and 12 deletions

View File

@ -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 {

View File

@ -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 = {

View File

@ -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 = {

View File

@ -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

View File

@ -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 {
/**

View File

@ -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() {