나는 내 Grails의 프로젝트에 대한 UrlMappingsTest을 만들려고 해요, 나는 다음과 같은 예외를 받고 있어요 :UrlMappingsTests - 테스트 유형 '통합'에서 클래스를로드 할 수 없습니까?
java.lang.RuntimeException: Could not load class in test type 'integration'
at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:391)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
at gant.Gant.withBuildListeners(Gant.groovy:427)
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
at gant.Gant.dispatch(Gant.groovy:415)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.executeTargets(Gant.groovy:590)
at gant.Gant.executeTargets(Gant.groovy:589)
내 클래스는 아주 간단합니다, 나는 예제를 따라하려고 노력했다. 무슨 일이야? 정적 라인
import grails.test.GrailsUrlMappingsTestCase
class UrlMappingTests extends GrailsUrlMappingsTestCase {
// static mappings = UrlMappings
void testForwardingUrls(){
assertForwardUrlMapping("/rest/users/stefan/files", controller: "file", action: "allFiles");
}
}
주석, 내가 얻을
[groovyc] You attempted to reference a variable in the binding or an instance variable from a static context.
[groovyc] You misspelled a classname or statically imported field. Please check the spelling.
[groovyc] You attempted to use a method 'UrlMappings' but left out brackets in a place not allowed by the grammar.
[groovyc] @ line 7, column 21.
[groovyc] static mappings = UrlMappings
[groovyc]
^
없이 실행할 때 클래스를 찾을 수 없습니다. 1.3.7을 사용하고 있습니다. –
흠. 1.3.6에서 제 테스트를하고 있습니다. 주석 처리했을 때 전체 스택 추적을 게시 할 수 있습니까? – Melv
새로운 프로젝트를 시작했는데 1.3.7에서 실패합니다. 나는 이것이 회귀의 용의자라고 생각한다. –