Files
openide/java/java-tests/testSrc/com/intellij/refactoring/MoveJavaFileTest.java
Tagir Valeev 00adcdf120 [model-branch] Remove ModelBranch tests
IDEA-309887 Drop ModelBranch-es from IntelliJ repo

GitOrigin-RevId: 362b2433ce92b95788d626c444b23e4efbf3e6c7
2023-07-04 08:28:43 +00:00

23 lines
831 B
Java

// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.refactoring;
import com.intellij.JavaTestUtil;
import org.junit.Assert;
public class MoveJavaFileTest extends MoveFileTestCase {
@Override
protected String getTestDataPath() {
return JavaTestUtil.getJavaTestDataPath() + "/refactoring/moveFile/";
}
public void testPackageInfo() { doTest("pack2", "pack1/package-info.java"); }
public void testConflict() {
try {
doTest("p2", "p1/B.java");
fail("Conflict not detected!");
}
catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
Assert.assertEquals("Package-local class <b><code>B</code></b> will no longer be accessible from field <b><code>A.b</code></b>", e.getMessage());
}
}
}