标签:power ons ring 应该 control mock moc span expect
错误原因:invoke方法的时候,应该是类的实例对象,而不是类本身
解决方法:把
PowerMockito.doReturn(index_expect).when(IndexController.class, "processPage", pageCode, request, response,
model); // Mock私有方法
改成:
PowerMockito.doReturn(index_expect).when(controller, "processPage", pageCode, request, response,
model); // Mock私有方法
object is not an instance of declaring class
标签:power ons ring 应该 control mock moc span expect
原文地址:http://www.cnblogs.com/nizuimeiabc1/p/6485213.html