* An annotation should defer throwing TypeNotPresentException
* for a Class-valued member until the member accessed.
*/
@MissingClassValAntn
public void testAnnotation_ElementError() throws Throwable {
MissingClassValAntn antn = this.getClass().getMethod(
"testAnnotation_ElementError").getAnnotation(MissingClassValAntn.class);
try {
antn.clss();
fail("Misconfigured test: "
+ "notfound.MissingClass should not be in classpath");
} catch (TypeNotPresentException tnpe) {
assertTrue("reported type name: " + tnpe.typeName(),
tnpe.typeName().matches("notfound.MissingClass"));
}
try {
antn.clssArray();
fail("Misconfigured test: "
+ "notfound.MissingClass should not be in classpath");
} catch (TypeNotPresentException tnpe) {
assertTrue("reported type name: " + tnpe.typeName(),
tnpe.typeName().matches("notfound.MissingClass"));