use of com.oracle.tck.lib.autd2.NonTestCase in project jtharness by openjdk.
the class InvalidTestCases method publicNonTestCaseMethod_message2.
@Test
public void publicNonTestCaseMethod_message2() {
try {
com.oracle.tck.lib.autd2.TestResult status = TU.runTestGroup(new BaseTestGroup() {
public void myTest4444444() {
}
});
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$23.myTest4444444\" 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_private.
@Test
public void publicNonTestCaseMethod_message_bothAnnotations1_private() {
try {
com.oracle.tck.lib.autd2.TestResult status = TU.runTestGroup(new BaseTestGroup() {
@TestCase
@NonTestCase
private 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$20.myTest01\".", e.getMessage());
}
}
use of com.oracle.tck.lib.autd2.NonTestCase in project jtharness by openjdk.
the class InvalidTestCases method publicNonTestCaseMethod_message_bothAnnotations.
@Test
public void publicNonTestCaseMethod_message_bothAnnotations() {
try {
com.oracle.tck.lib.autd2.TestResult status = TU.runTestGroup(new BaseTestGroup() {
@TestCase
@NonTestCase
public 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$19.myTest01\".", e.getMessage());
}
}
use of com.oracle.tck.lib.autd2.NonTestCase in project jtharness by openjdk.
the class InvalidTestCases method publicNonTestCaseMethod_notTestCase.
@Test
public void publicNonTestCaseMethod_notTestCase() {
com.oracle.tck.lib.autd2.TestResult status = TU.runTestGroup(new BaseTestGroup() {
@NonTestCase
public void myTest4444444() {
}
});
Assert.assertTrue(status.isOK());
}
use of com.oracle.tck.lib.autd2.NonTestCase in project jtharness by openjdk.
the class InvalidTestCases method publicNonTestCaseMethod_message_bothAnnotations1_packprivate.
@Test
public void publicNonTestCaseMethod_message_bothAnnotations1_packprivate() {
try {
com.oracle.tck.lib.autd2.TestResult status = TU.runTestGroup(new BaseTestGroup() {
@TestCase
@NonTestCase
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$22.myTest01\".", e.getMessage());
}
}
Aggregations