/**
* Test for the constructor MBeanPermission(java.lang.String,
* java.lang.String, javax.management.ObjectName, java.lang.String)
*
* @throws NullPointerException
* @throws Exception
* @see javax.management.MBeanPermission#MBeanPermission(java.lang.String,
* java.lang.String, javax.management.ObjectName, java.lang.String)
*/
public final void testMBeanPermissionStringStringObjectNameString()
throws Exception {
String name = "org.apache.harmony.test.func.api.javax.management:type=Hello";
ObjectName oname = new ObjectName(name);
MBeanPermission p = new MBeanPermission(name, "Hello", oname,
"getAttribute");
assertEquals(name + "#Hello[" + oname.getCanonicalName() + "]", p
.getName());
new MBeanPermission("-", "-", oname, "getAttribute");
new MBeanPermission(null, null, null, "getAttribute");
try {
new MBeanPermission(null, null, null, "get Attribute");
new MBeanPermission(null, null, null, "");
new MBeanPermission(null, null, null, null);
fail("IllegalArgumentException not thrown!");
} catch (IllegalArgumentException ex) {
}
}
MBeanPermissionTest.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:freeVM
作者:
评论列表
文章目录