From 781137ab585d82424c3c7361ca4db66be226e32c Mon Sep 17 00:00:00 2001 From: Dmitry Batkovich Date: Tue, 6 Jun 2017 14:10:53 +0300 Subject: [PATCH] move test for java 6 thread local to separated class --- .../ConvertToThreadLocalIntention6Test.java | 43 +++++++++++++++++++ .../refactoring/AllTypeMigrationTests.java | 2 + .../afterJava6.java | 0 .../beforeJava6.java | 0 4 files changed, 45 insertions(+) create mode 100644 java/typeMigration/test/com/intellij/codeInsight/ConvertToThreadLocalIntention6Test.java rename java/typeMigration/testData/intentions/{threadLocal => threadLocal6}/afterJava6.java (100%) rename java/typeMigration/testData/intentions/{threadLocal => threadLocal6}/beforeJava6.java (100%) diff --git a/java/typeMigration/test/com/intellij/codeInsight/ConvertToThreadLocalIntention6Test.java b/java/typeMigration/test/com/intellij/codeInsight/ConvertToThreadLocalIntention6Test.java new file mode 100644 index 000000000000..6b65b2c745dc --- /dev/null +++ b/java/typeMigration/test/com/intellij/codeInsight/ConvertToThreadLocalIntention6Test.java @@ -0,0 +1,43 @@ +/* + * Copyright 2000-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.intellij.codeInsight; + +import com.intellij.codeInsight.daemon.quickFix.LightQuickFixParameterizedTestCase; +import com.intellij.pom.java.LanguageLevel; +import com.intellij.testFramework.PlatformTestUtil; +import org.jetbrains.annotations.NotNull; + +public class ConvertToThreadLocalIntention6Test extends LightQuickFixParameterizedTestCase { + @Override + protected String getBasePath() { + return "/intentions/threadLocal6"; + } + + @NotNull + @Override + protected String getTestDataPath() { + return PlatformTestUtil.getCommunityPath() + "/java/typeMigration/testData"; + } + + public void test() throws Exception { + doAllTests(); + } + + @Override + protected LanguageLevel getLanguageLevel() { + return LanguageLevel.JDK_1_7; + } +} diff --git a/java/typeMigration/test/com/intellij/refactoring/AllTypeMigrationTests.java b/java/typeMigration/test/com/intellij/refactoring/AllTypeMigrationTests.java index 32640fc85dde..331e5e279a2a 100644 --- a/java/typeMigration/test/com/intellij/refactoring/AllTypeMigrationTests.java +++ b/java/typeMigration/test/com/intellij/refactoring/AllTypeMigrationTests.java @@ -1,6 +1,7 @@ package com.intellij.refactoring; import com.intellij.codeInsight.ConvertToAtomicIntentionTest; +import com.intellij.codeInsight.ConvertToThreadLocalIntention6Test; import com.intellij.codeInsight.ConvertToThreadLocalIntentionTest; import com.intellij.codeInsight.inspections.GuavaInspectionTest; import junit.framework.Test; @@ -19,6 +20,7 @@ public class AllTypeMigrationTests { suite.addTestSuite(WildcardTypeMigrationTest.class); suite.addTestSuite(ConvertToAtomicIntentionTest.class); suite.addTestSuite(ConvertToThreadLocalIntentionTest.class); + suite.addTestSuite(ConvertToThreadLocalIntention6Test.class); suite.addTestSuite(GuavaInspectionTest.class); return suite; } diff --git a/java/typeMigration/testData/intentions/threadLocal/afterJava6.java b/java/typeMigration/testData/intentions/threadLocal6/afterJava6.java similarity index 100% rename from java/typeMigration/testData/intentions/threadLocal/afterJava6.java rename to java/typeMigration/testData/intentions/threadLocal6/afterJava6.java diff --git a/java/typeMigration/testData/intentions/threadLocal/beforeJava6.java b/java/typeMigration/testData/intentions/threadLocal6/beforeJava6.java similarity index 100% rename from java/typeMigration/testData/intentions/threadLocal/beforeJava6.java rename to java/typeMigration/testData/intentions/threadLocal6/beforeJava6.java