java.lang.IllegalArgumentException:
com.javaeenotes.YourClass is not an interface.
The solution is to use the ClassImposteriser when instantiating the Mockery class.
context = new Mockery() {
{
setImposteriser(ClassImposteriser.INSTANCE);
}
};
Now you can mock any class, just as interfaces. The complete instructions can be found on this web page.
No comments:
Post a Comment