mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
UiInterceptors: ability to intercept UI components in tests and emulate user action
Currently only popup chooser is supported A usage example added for AddExceptionToExistingCatchTest
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
// "Add exception to existing catch clause" "true"
|
||||
import java.io.IOException;
|
||||
|
||||
class A extends Exception {}
|
||||
class B extends A {}
|
||||
class C extends A {}
|
||||
|
||||
class Test {
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
throw new A();
|
||||
} catch (B e) {
|
||||
} catch (A e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// "Add exception to existing catch clause" "true"
|
||||
import java.io.IOException;
|
||||
|
||||
class X extends RuntimeException {}
|
||||
class Y extends RuntimeException {}
|
||||
|
||||
class Test {
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
try {
|
||||
throw new IOException();
|
||||
}
|
||||
catch (X | IOException x) {
|
||||
}
|
||||
}
|
||||
catch (Y y) {
|
||||
}
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// "Add exception to existing catch clause" "true"
|
||||
import java.io.IOException;
|
||||
|
||||
class X extends RuntimeException {}
|
||||
class Y extends RuntimeException {}
|
||||
|
||||
class Test {
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
try {
|
||||
throw new IOException();
|
||||
}
|
||||
catch (X x) {
|
||||
}
|
||||
}
|
||||
catch (Y | IOException y) {
|
||||
}
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// "Add exception to existing catch clause" "true"
|
||||
import java.io.IOException;
|
||||
|
||||
class A extends Exception {}
|
||||
class B extends A {}
|
||||
class C extends A {}
|
||||
|
||||
class Test {
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
throw new A<caret>();
|
||||
} catch (B e) {
|
||||
} catch (C e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// "Add exception to existing catch clause" "true"
|
||||
import java.io.IOException;
|
||||
|
||||
class X extends RuntimeException {}
|
||||
class Y extends RuntimeException {}
|
||||
|
||||
class Test {
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
try {
|
||||
throw new <caret>IOException();
|
||||
}
|
||||
catch (X x) {
|
||||
}
|
||||
}
|
||||
catch (Y y) {
|
||||
}
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
// "Add exception to existing catch clause" "true"
|
||||
import java.io.IOException;
|
||||
|
||||
class X extends RuntimeException {}
|
||||
class Y extends RuntimeException {}
|
||||
|
||||
class Test {
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
try {
|
||||
throw new <caret>IOException();
|
||||
}
|
||||
catch (X x) {
|
||||
}
|
||||
}
|
||||
catch (Y y) {
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user