mercredi 27 avril 2016

Grails Controller Unit Testing Failure

I am experiencing this trouble: I am testing a Controller in grails (with NetBeans 6.9 and Grails 2.4.3) and while executing one of it's methods ("index") and trying to check the response url, I get a NullPointer exception as there is a custom service inside my controller which inside injected. So I would like to know in which way I could manage that and have my service initialized correctly ?. enter image description here

enter image description here

The sad thing comes up when I call the index method and the variable "queryService" is null. How I should test this ?

Aucun commentaire:

Enregistrer un commentaire