This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Groovy and the fly likes Trouble mocking grailsApplication properties in integration test Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Languages » Groovy
Bookmark "Trouble mocking grailsApplication properties in integration test" Watch "Trouble mocking grailsApplication properties in integration test" New topic
Author

Trouble mocking grailsApplication properties in integration test

Dave Alvarado
Ranch Hand

Joined: Jul 02, 2008
Posts: 436
Hi,

I'm using Groovy 1.7.7 with Grails 1.2.1. I have this in my integration test ...



Although the second property, clearCacheMsg, evaluates properly to the string I set it to, the first property, "notAuthorizedMsg", evaluates to a ConfigObject, which is wreaking havoc with my tests. I figured this all out through my STS debugger -- http://screencast.com/t/8FVrYFMPt . Does anyone know what I'm doing wrong here? In other words, what is the correct way to mock these configuration properties? - Dave
sergio ramirez
Greenhorn

Joined: Aug 28, 2011
Posts: 4

Hello Dave,

hmmm, have you already tried something like this?




Regards,
Serch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Trouble mocking grailsApplication properties in integration test
 
Similar Threads
Not able to display starting jsp page index.jsp
Critique Please
Mocking grailsApplication in Integration testCases
LDAP with Grails
Groovy findAll for XML attribute values