Tuesday, 27 August 2013

Verifying the calling of a non-static method of a static inner class of a static outer class

Verifying the calling of a non-static method of a static inner class of a
static outer class

How would I verify that a non-static method of a static inner class has
been called? This is what I have so far:
new Verifications() {
{
Deencapsulation.invoke(MyClass.class.getDeclaredClasses()[0],
"run" );
times = 4;
}
};
I'm getting this:
java.lang.IllegalArgumentException: Attempted to invoke non-static method
without an instance to invoke it on...

No comments:

Post a Comment