/**
* The test checks the method invoke() with null property name
*/
public void testInvokeWithNullPropertyName() throws Exception {
InvocationObject invocationObject = new InvocationObject();
EventHandler handler = new EventHandler(invocationObject,
"doSomething", null, null);
Object proxy = EventHandler.create(SampleListener.class,
invocationObject, "doSomething");
Method m = SampleListener.class.getMethod("fireSampleEvent",
new Class[] { SampleEvent.class });
handler.invoke(proxy, m, new Object[] { new SampleEvent("") });
assertEquals(invocationObject, handler.getTarget());
assertEquals("doSomething", getMethodName());
// Regression test for HARMONY-4033
m = FredListener.class.getMethod("fireFredEvent",
new Class[] { FredEvent.class });
proxy = EventHandler.create(FredListener.class, invocationObject,
"doSomething", null, "fireFredEvent");
m.invoke(proxy, new Object[] { null });
}
EventHandlerTest.java 文件源码
java
阅读 20
收藏 0
点赞 0
评论 0
项目:cn1
作者:
评论列表
文章目录