mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
anonymous tests
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
class Anonymous {
|
||||
int num1;
|
||||
int num2;
|
||||
Object o = new Object(){
|
||||
int num = 1;
|
||||
};
|
||||
|
||||
Anonymous() {}
|
||||
void foo() {}
|
||||
}
|
||||
+6
-4
@@ -24,8 +24,10 @@ public class JavaFileStructureSelectionTest extends JavaFileStructureTestCase {
|
||||
return "selection";
|
||||
}
|
||||
|
||||
public void testField() throws Exception {checkTree();}
|
||||
public void testMethod() throws Exception {checkTree();}
|
||||
public void testConstructor() throws Exception {checkTree();}
|
||||
public void testInsideClass() throws Exception {checkTree();}
|
||||
public void testField() throws Exception {checkTree();}
|
||||
public void testMethod() throws Exception {checkTree();}
|
||||
public void testConstructor() throws Exception {checkTree();}
|
||||
public void testInsideClass() throws Exception {checkTree();}
|
||||
public void testAnonymous() throws Exception {checkTree();}
|
||||
public void testAnonymousInAnonymous() throws Exception {checkTree();}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,9 @@ public abstract class JavaFileStructureTestCase extends FileStructureTestBase {
|
||||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
myShowAnonymousByDefault = PropertiesComponent.getInstance().getBoolean(getAnonymousPropertyName(), false);
|
||||
if (getTestName(false).contains("Anonymous")) {
|
||||
setShowAnonymous(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -40,6 +43,11 @@ public abstract class JavaFileStructureTestCase extends FileStructureTestBase {
|
||||
return "java";
|
||||
}
|
||||
|
||||
public void setShowAnonymous(boolean show) throws Exception {
|
||||
myPopup.setTreeActionState(JavaAnonymousClassesNodeProvider.class, show);
|
||||
update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tearDown() throws Exception {
|
||||
PropertiesComponent.getInstance().setValue(getAnonymousPropertyName(), Boolean.toString(myShowAnonymousByDefault));
|
||||
|
||||
Reference in New Issue
Block a user