kuc*_*ram 12 grails grails-2.0
我想问一下grails中测试文件的最佳位置(即data.xml).是测试/文件夹吗?
如何轻松地在Integration测试中加载测试文件?
谢谢,马特奥
小智 13
在测试/集成/资源中
然后,即如果你使用spock进行测试,你可以做类似的事情:
def mediaBundlerService = Mock(MediaBundlerService)
mediaBundlerService.getPath(_) >> [path: new File('test/integration/resources/test-bundle/').absolutePath + "/"]
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
3189 次 |
最近记录: |