我有一个单元测试类抛出这个奇怪的异常......我不知道这意味着什么......有人可以帮助我吗?
这是课程:
@TestFor(ApplicationController)
@TestMixin(MvcUnitTestCase)
class ApplicationControllerTests{
def init(){
super.init(ApplicationController)
}
void testCheckOk() {
def service = mockFor(ApplicationService)
def myModel = new MyModel();
service.demand.getModel {
return myModel
}
controller.service = service.createMock()
def model = controller.index()
assertEquals myModel, model.myModel
assertEquals HttpServletResponse.SC_OK, response.status
}
这是一个例外:
org.codehaus.groovy.runtime.metaclass.MethodSelectionException: Could not find which method <init>() to invoke from this list:
public grails.test.MvcUnitTestCase#<init>(java.lang.String)
public grails.test.MvcUnitTestCase#<init>(java.lang.Class)