/**
* @throws ClassNotFoundException
* @throws SecurityException
* @tests java.lang.annotation.AnnotationTypeMismatchException#AnnotationTypeMismatchException(Method,
* String)
*/
@SuppressWarnings("nls")
public void test_constructorLjava_lang_reflect_MethodLjava_lang_String() throws SecurityException, ClassNotFoundException {
Method[] methods = Class.forName("java.lang.String").getMethods();
Method m = methods[0];
AnnotationTypeMismatchException e = new AnnotationTypeMismatchException(
m, "some type");
assertNotNull("can not instantiate AnnotationTypeMismatchException", e);
assertSame("wrong method name", m, e.element());
assertEquals("wrong found type", "some type", e.foundType());
}
AnnotationTypeMismatchExceptionTest.java 文件源码
java
阅读 30
收藏 0
点赞 0
评论 0
项目:cn1
作者:
评论列表
文章目录