本文整理汇总了Java中com.intellij.refactoring.BaseRefactoringProcessor.ConflictsInTestsException方法的典型用法代码示例。如果您正苦于以下问题:Java BaseRefactoringProcessor.ConflictsInTestsException方法的具体用法?Java BaseRefactoringProcessor.ConflictsInTestsException怎么用?Java BaseRefactoringProcessor.ConflictsInTestsException使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.refactoring.BaseRefactoringProcessor
的用法示例。
在下文中一共展示了BaseRefactoringProcessor.ConflictsInTestsException方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testIndirectGlobReferencesNotIncluded
import com.intellij.refactoring.BaseRefactoringProcessor; //导入方法依赖的package包/类
@Test
public void testIndirectGlobReferencesNotIncluded() {
PsiFile javaFile =
workspace.createPsiFile(
new WorkspacePath("com/google/Test.java"),
"package com.google;",
"public class Test {}");
PsiClass javaClass = PsiUtils.findFirstChildOfClassRecursive(javaFile, PsiClass.class);
createBuildFile(
new WorkspacePath("com/google/BUILD"),
"java_library(",
" name = 'lib'",
" srcs = glob(['*.java'])",
")");
try {
SafeDeleteHandler.invoke(getProject(), new PsiElement[] {javaClass}, true);
} catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
Assert.fail("Glob reference was incorrectly included");
}
}
示例2: doTestConflict
import com.intellij.refactoring.BaseRefactoringProcessor; //导入方法依赖的package包/类
private void doTestConflict() {
try {
doTest(null, null, null, new ParameterInfoImpl[] {new ParameterInfoImpl(-1, "b", PsiType.BOOLEAN)}, new ThrownExceptionInfo[0], false);
fail("Conflict expected");
}
catch (BaseRefactoringProcessor.ConflictsInTestsException ignored) { }
}
示例3: testVisibilityConflict
import com.intellij.refactoring.BaseRefactoringProcessor; //导入方法依赖的package包/类
public void testVisibilityConflict() throws Exception {
try {
doTest(0, PsiModifier.PRIVATE);
fail("Conflict was not detected");
}
catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
assertEquals("Method <b><code>Test.foo(Bar)</code></b> is private and will not be accessible from instance initializer of class class <b><code>Test</code></b>.", e.getMessage());
}
}
示例4: testMethodReference
import com.intellij.refactoring.BaseRefactoringProcessor; //导入方法依赖的package包/类
public void testMethodReference() throws Exception {
try {
doTest(true, 0);
fail("Conflict was not detected");
}
catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
assertEquals("Method reference would be broken after move", e.getMessage());
}
}
示例5: testRefOuterThis
import com.intellij.refactoring.BaseRefactoringProcessor; //导入方法依赖的package包/类
public void testRefOuterThis() throws Exception {
try {
doTest(false);
}
catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
assertEquals("Parameter initializer depends on this which is not available inside the method and cannot be inlined", e.getMessage());
}
}
示例6: testRefNewInner
import com.intellij.refactoring.BaseRefactoringProcessor; //导入方法依赖的package包/类
public void testRefNewInner() throws Exception {
try {
doTest(false);
}
catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
assertEquals("Parameter initializer depends on class <b><code>User.Local</code></b> which is not available inside method and cannot be inlined", e.getMessage());
}
}
示例7: testRefNewInnerFromMethod
import com.intellij.refactoring.BaseRefactoringProcessor; //导入方法依赖的package包/类
public void testRefNewInnerFromMethod() throws Exception {
try {
doTest(false);
}
catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
assertEquals("Parameter initializer depends on class <b><code>Local</code></b> which is not available inside method and cannot be inlined", e.getMessage());
}
}
示例8: testRefNewLocal
import com.intellij.refactoring.BaseRefactoringProcessor; //导入方法依赖的package包/类
public void testRefNewLocal() throws Exception {
try {
doTest(false);
}
catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
assertEquals("Parameter initializer depends on class <b><code>Local</code></b> which is not available inside method and cannot be inlined", e.getMessage());
}
}
示例9: testRefArrayAccess
import com.intellij.refactoring.BaseRefactoringProcessor; //导入方法依赖的package包/类
public void testRefArrayAccess() throws Exception {
try {
doTest(false);
}
catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
assertEquals("Parameter initializer depends on value which is not available inside method and cannot be inlined", e.getMessage());
}
}
示例10: testFunctionalExpressions
import com.intellij.refactoring.BaseRefactoringProcessor; //导入方法依赖的package包/类
public void testFunctionalExpressions() {
try {
doTest();
fail("Conflict not detected");
}
catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
assertEquals("Functional expression in Test will not compile after converting class <b><code>FunctionalExpressions</code></b> to a class", e.getMessage());
}
}
示例11: testRefNonStatic
import com.intellij.refactoring.BaseRefactoringProcessor; //导入方法依赖的package包/类
public void testRefNonStatic() throws Exception {
try {
doTest(false);
}
catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
assertEquals("Parameter initializer depends on method <b><code>provideObject()</code></b> which is not available inside the static method", e.getMessage());
}
}
示例12: testRefNonStaticClass
import com.intellij.refactoring.BaseRefactoringProcessor; //导入方法依赖的package包/类
public void testRefNonStaticClass() throws Exception {
try {
doTest(false);
}
catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
assertEquals("Parameter initializer depends on non static class which is not available inside static method", e.getMessage());
}
}
示例13: testRefThisFromStatic
import com.intellij.refactoring.BaseRefactoringProcessor; //导入方法依赖的package包/类
public void testRefThisFromStatic() throws Exception {
try {
doTest(false);
}
catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
assertEquals("Parameter initializer depends on this which is not available inside the static method", e.getMessage());
}
}
示例14: testVisibility
import com.intellij.refactoring.BaseRefactoringProcessor; //导入方法依赖的package包/类
public void testVisibility() throws Exception {
try {
doTest(false);
}
catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
assertEquals("Parameter initializer depends on value which is not available inside method", e.getMessage());
}
}
示例15: testWriteAccess
import com.intellij.refactoring.BaseRefactoringProcessor; //导入方法依赖的package包/类
public void testWriteAccess() throws Exception {
try {
doTest(false);
}
catch (BaseRefactoringProcessor.ConflictsInTestsException e) {
assertEquals("Parameter initializer depends on value which is not available inside method and cannot be inlined", e.getMessage());
}
}