mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Java: clean test up
GitOrigin-RevId: 50368e5c2856ba9f0b0935326f918bf00f885c42
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4ae1754159
commit
7d5cd09250
+23
-24
@@ -205,7 +205,7 @@ public class AddImportActionTest extends LightJavaCodeInsightFixtureTestCase {
|
||||
""");
|
||||
}
|
||||
|
||||
public void test_use_initializer() {
|
||||
public void testUseInitializer() {
|
||||
myFixture.addClass("package foo; public class Map {}");
|
||||
myFixture.configureByText("a.java", """
|
||||
import java.util.HashMap;
|
||||
@@ -664,7 +664,7 @@ public class AddImportActionTest extends LightJavaCodeInsightFixtureTestCase {
|
||||
.trim());
|
||||
}
|
||||
|
||||
public void test_import_class_in_class_reference_expression() {
|
||||
public void testImportClassInClassReferenceExpression() {
|
||||
myFixture.configureByText("a.java", """
|
||||
|
||||
class Test {
|
||||
@@ -685,7 +685,7 @@ public class AddImportActionTest extends LightJavaCodeInsightFixtureTestCase {
|
||||
""");
|
||||
}
|
||||
|
||||
public void test_import_class_in_qualifier_expression() {
|
||||
public void testImportClassInQualifierExpression() {
|
||||
myFixture.configureByText("a.java", """
|
||||
|
||||
class Test {
|
||||
@@ -706,7 +706,7 @@ public class AddImportActionTest extends LightJavaCodeInsightFixtureTestCase {
|
||||
""");
|
||||
}
|
||||
|
||||
public void test_don_t_import_class_in_method_call_argument() {
|
||||
public void testDoNotImportClassInMethodCallArgument() {
|
||||
myFixture.configureByText("a.java", """
|
||||
|
||||
class Test {
|
||||
@@ -718,7 +718,7 @@ public class AddImportActionTest extends LightJavaCodeInsightFixtureTestCase {
|
||||
assertTrue(myFixture.filterAvailableIntentions("Import class").isEmpty());
|
||||
}
|
||||
|
||||
public void test_don_t_import_class_if_qualified_name_is_not_valid() {
|
||||
public void testDoNotImportClassIfQualifiedNameIsNotValid() {
|
||||
myFixture.addClass("\npackage a..p;\npublic class MMM {}\n");
|
||||
myFixture.configureByText("a.java", """
|
||||
|
||||
@@ -740,7 +740,7 @@ public class AddImportActionTest extends LightJavaCodeInsightFixtureTestCase {
|
||||
""");
|
||||
}
|
||||
|
||||
public void test_don_t_import_class_in_assignment() {
|
||||
public void testDoNotImportClassInAssignment() {
|
||||
myFixture.configureByText("a.java", """
|
||||
|
||||
class Test {
|
||||
@@ -752,7 +752,7 @@ public class AddImportActionTest extends LightJavaCodeInsightFixtureTestCase {
|
||||
assertTrue(myFixture.filterAvailableIntentions("Import class").isEmpty());
|
||||
}
|
||||
|
||||
public void test_don_t_import_class_if_already_imported_but_not_accessible() {
|
||||
public void testDoNotImportClassIfAlreadyImportedButNotAccessible() {
|
||||
myFixture.addClass("\npackage foo;\nclass Foo {}\n");
|
||||
myFixture.configureByText("a.java", """
|
||||
|
||||
@@ -766,7 +766,7 @@ public class AddImportActionTest extends LightJavaCodeInsightFixtureTestCase {
|
||||
assertTrue(myFixture.filterAvailableIntentions("Import class").isEmpty());
|
||||
}
|
||||
|
||||
public void test_don_t_import_class_in_qualified_reference_at_reference_name() {
|
||||
public void testDoNotImportClassInQualifiedReferenceAtReferenceName() {
|
||||
myFixture.configureByText("a.java", """
|
||||
|
||||
class Test {
|
||||
@@ -778,7 +778,7 @@ public class AddImportActionTest extends LightJavaCodeInsightFixtureTestCase {
|
||||
assertTrue(myFixture.filterAvailableIntentions("Import class").isEmpty());
|
||||
}
|
||||
|
||||
public void test_don_t_import_class_in_qualified_reference_at_foreign_place() {
|
||||
public void testDoNotImportClassInQualifiedReferenceAtForeignPlace() {
|
||||
myFixture.configureByText("a.java",
|
||||
"""
|
||||
|
||||
@@ -793,7 +793,7 @@ public class AddImportActionTest extends LightJavaCodeInsightFixtureTestCase {
|
||||
assertTrue(myFixture.filterAvailableIntentions("Import class").isEmpty());
|
||||
}
|
||||
|
||||
public void test_allow_to_add_import_from_javadoc() {
|
||||
public void testAllowToAddImportFromJavadoc() {
|
||||
myFixture.configureByText("a.java", """
|
||||
|
||||
class Test {
|
||||
@@ -809,7 +809,7 @@ public class AddImportActionTest extends LightJavaCodeInsightFixtureTestCase {
|
||||
myFixture.checkResult("import java.util.Map;\n\nclass Test {\n\n /**\n * {@link Map}\n */\n void run() {\n }\n}\n");
|
||||
}
|
||||
|
||||
public void test_do_not_add_import_for_default_package() {
|
||||
public void testDoNotAddImportForDefaultPackage() {
|
||||
myFixture.configureByText("a.java", """
|
||||
|
||||
class Test {
|
||||
@@ -837,7 +837,7 @@ public class AddImportActionTest extends LightJavaCodeInsightFixtureTestCase {
|
||||
""");
|
||||
}
|
||||
|
||||
public void test_do_not_allow_to_add_import_in_package_info_file() {
|
||||
public void testDoNotAllowToAddImportInPackageInfoFile() {
|
||||
myFixture.configureByText("package-info.java", """
|
||||
|
||||
|
||||
@@ -849,7 +849,7 @@ public class AddImportActionTest extends LightJavaCodeInsightFixtureTestCase {
|
||||
assertTrue(myFixture.filterAvailableIntentions("Replace qualified name").isEmpty());
|
||||
}
|
||||
|
||||
public void test_do_not_allow_to_add_import_on_inaccessible_class() {
|
||||
public void testDoNotAllowToAddImportOnInaccessibleClass() {
|
||||
myFixture.addClass("package foo; class Foo {}");
|
||||
myFixture.configureByText("A.java", """
|
||||
|
||||
@@ -863,9 +863,8 @@ public class AddImportActionTest extends LightJavaCodeInsightFixtureTestCase {
|
||||
assertTrue(myFixture.filterAvailableIntentions("Replace qualified name").isEmpty());
|
||||
}
|
||||
|
||||
public void test_keep_methods_formatting_on_add_import() {
|
||||
CommonCodeStyleSettings settings =
|
||||
CodeStyle.getSettings(getProject()).getCommonSettings(JavaLanguage.INSTANCE);
|
||||
public void testKeepMethodsFormattingOnAddImport() {
|
||||
CommonCodeStyleSettings settings = CodeStyle.getSettings(getProject()).getCommonSettings(JavaLanguage.INSTANCE);
|
||||
boolean old = settings.ALIGN_GROUP_FIELD_DECLARATIONS;
|
||||
settings.ALIGN_GROUP_FIELD_DECLARATIONS = true;
|
||||
|
||||
@@ -934,7 +933,7 @@ public class AddImportActionTest extends LightJavaCodeInsightFixtureTestCase {
|
||||
NonBlockingReadActionImpl.waitForAsyncTaskCompletion();
|
||||
}
|
||||
|
||||
public void test_disprefer_deprecated_classes() {
|
||||
public void testDispreferDeprecatedClasses() {
|
||||
myFixture.addClass("package foo; public class Log {}");
|
||||
myFixture.addClass("package bar; @Deprecated public class Log {}");
|
||||
myFixture.configureByText("a.java", """
|
||||
@@ -952,7 +951,7 @@ public class AddImportActionTest extends LightJavaCodeInsightFixtureTestCase {
|
||||
""");
|
||||
}
|
||||
|
||||
public void test_prefer_from_imported_package() {
|
||||
public void testPreferFromImportedPackage() {
|
||||
myFixture.addClass("package foo; public class Log {}");
|
||||
myFixture.addClass("package foo; public class Imported {}");
|
||||
myFixture.addClass("package bar; public class Log {}");
|
||||
@@ -975,7 +974,7 @@ public class AddImportActionTest extends LightJavaCodeInsightFixtureTestCase {
|
||||
""");
|
||||
}
|
||||
|
||||
public void test_remember_chosen_variants() {
|
||||
public void testRememberChosenVariants() {
|
||||
((StatisticsManagerImpl)StatisticsManager.getInstance()).enableStatistics(myFixture.getTestRootDisposable());
|
||||
myFixture.addClass("package foo; public class Log {}");
|
||||
myFixture.addClass("package bar; public class Log {}");
|
||||
@@ -997,7 +996,7 @@ public class AddImportActionTest extends LightJavaCodeInsightFixtureTestCase {
|
||||
myFixture.checkResult(textAfter);
|
||||
}
|
||||
|
||||
public void test_incomplete_method_returning_its_type_parameter() {
|
||||
public void testIncompleteMethodReturningItsTypeParameter() {
|
||||
myFixture.addClass("package foo; public class Context {}");
|
||||
myFixture.configureByText("a.java", """
|
||||
|
||||
@@ -1008,7 +1007,7 @@ public class AddImportActionTest extends LightJavaCodeInsightFixtureTestCase {
|
||||
assertTrue(myFixture.filterAvailableIntentions("Import class").isEmpty());
|
||||
}
|
||||
|
||||
public void test_even_more_incomplete_method_returning_its_type_parameter() {
|
||||
public void testEvenMoreIncompleteMethodReturningItsTypeParameter() {
|
||||
myFixture.addClass("package foo; public class Context {}");
|
||||
myFixture.configureByText("a.java", """
|
||||
|
||||
@@ -1019,7 +1018,7 @@ public class AddImportActionTest extends LightJavaCodeInsightFixtureTestCase {
|
||||
assertTrue(myFixture.filterAvailableIntentions("Import class").isEmpty());
|
||||
}
|
||||
|
||||
public void test_inaccessible_class_from_the_project() {
|
||||
public void testInaccessibleClassFromTheProject() {
|
||||
myFixture.addClass("package foo; class Foo {}");
|
||||
myFixture.configureByText("a.java", """
|
||||
|
||||
@@ -1030,7 +1029,7 @@ public class AddImportActionTest extends LightJavaCodeInsightFixtureTestCase {
|
||||
assertFalse(myFixture.filterAvailableIntentions("Import class").isEmpty());
|
||||
}
|
||||
|
||||
public void test_prefer_top_level_List() {
|
||||
public void testPreferTopLevelList() {
|
||||
myFixture.addClass("package foo; public interface Restore { interface List {}}");
|
||||
|
||||
myFixture.configureByText("a.java", "class F implements Lis<caret>t {}");
|
||||
@@ -1041,7 +1040,7 @@ public class AddImportActionTest extends LightJavaCodeInsightFixtureTestCase {
|
||||
class F implements List {}""");
|
||||
}
|
||||
|
||||
public void test_type_use_annotation() {
|
||||
public void testTypeUseAnnotation() {
|
||||
myFixture.addClass("@java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_USE) @interface AssertTrue {}");
|
||||
myFixture.configureByText("test.java",
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user