use of com.oracle.tck.lib.autd2.NonTestCase in project jtharness by openjdk.
the class InvalidTestCases method publicNonTestCaseMethod_message.
@Test
public void publicNonTestCaseMethod_message() {
try {
com.oracle.tck.lib.autd2.TestResult status = TU.runTestGroup(new BaseTestGroup() {
@TestCase
public void myTest01(int i) {
}
public void myTest0232426556() {
}
});
Assert.fail("IAE was not thrown");
} catch (IllegalArgumentException e) {
assertEquals("Please either add @TestCase or @NonTestCase annotation to method \"com.oracle.tck.lib.autd2.unittests.tgfported.general.InvalidTestCases$18.myTest0232426556\" or make it non-public. All public methods must have @TestCase annotation by default. As an exception a method which needs to be public but is not a testcase should be annotated with @NonTestCase annotation.", e.getMessage());
}
}
use of com.oracle.tck.lib.autd2.NonTestCase in project jtharness by openjdk.
the class InvalidTestCases method publicNonTestCaseMethod_message_bothAnnotations1_protected.
@Test
public void publicNonTestCaseMethod_message_bothAnnotations1_protected() {
try {
com.oracle.tck.lib.autd2.TestResult status = TU.runTestGroup(new BaseTestGroup() {
@TestCase
@NonTestCase
protected void myTest01(int i) {
}
});
Assert.fail("IAE was not thrown");
} catch (IllegalArgumentException e) {
assertEquals("Please remove one of @TestCase or @NonTestCase annotation from method \"com.oracle.tck.lib.autd2.unittests.tgfported.general.InvalidTestCases$21.myTest01\".", e.getMessage());
}
}
Aggregations