error while using privilegeAccessor for accessing private method with junit
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Wednesday, April 19, 2006 07:08 AM


I had used the PrivilegeAccessor's invoke() from junit testcase inorder to accesss a private method named myMethod which is in class MyClass.


Object privilegeObject=PrivilegedAccessor.invokeMethod(myclass,"myMethod" ,args );


myclass is the instance of MyClass

args is an object array which takes the arguments for myMethod()



But junit is throwing
java.lang.NoSuchMethodException: Invalid method : myMethod

any clues??
thanks

About | Sitemap | Contact