[extract duplicates] EA-370575 CR-17071: add test

GitOrigin-RevId: 6fe2dc6449642899b9ff8a058dec446b2b779ede
This commit is contained in:
Alexandr Suhinin
2021-11-15 10:33:23 +00:00
committed by intellij-monorepo-bot
parent e51e5a8919
commit 9c55edaef5
3 changed files with 23 additions and 0 deletions
@@ -0,0 +1,6 @@
class Test {
public void test() {
byte[] one = <selection>"one".getBytes()</selection>;
byte[] two = "two".getBytes();
}
}
@@ -0,0 +1,13 @@
import org.jetbrains.annotations.NotNull;
class Test {
public void test() {
byte[] one = getBytes("one");
byte[] two = getBytes("two");
}
@NotNull
private byte[] getBytes(String one) {
return one.getBytes();
}
}
@@ -194,6 +194,10 @@ class ExtractMethodAndDuplicatesInplaceTest: LightJavaCodeInsightTestCase() {
doTest()
}
fun testDuplicatedExpressionAndChangeSignature(){
doTest()
}
fun testRefactoringListener(){
templateTest {
configureByFile("$BASE_PATH/${getTestName(false)}.java")