Hi, I'm trying to write a simple integration test, but having some trouble with Domain Objects. I've read on unit testing but can't figure it out.
This is my simple test:
User user = User.get(1)
controller.params.userid = "1"
controller.session.user = user
controller.save();
The error message is:
groovy.lang.MissingMethodException: No signature of method: static com.baufest.insside.user.User.get() is applicable for argument types: (java.lang.Integer) values: 1
My guess is that I should mock the user
object, but don't know how.
Help please !
Thanks in advance.