Injeção de dependencias Test Case
27/09/2013 10:26
java.lang.NullPointerException: Cannot invoke method paginate() on null object
at rlsistema.ContaCorrenteController$_closure4.doCall(ContaCorrenteController.groovy:81)
at rlsistema.ContaCorrenteControllerTests.testList(ContaCorrenteControllerTests.groovy:40)
def list = {
queryService.paginate(params)
...
}
@Test void testService(){
defineBeans { queryService(QueryService) }
assert controller.queryService != null
}
Para se registrar, clique aqui.