Java Mailing List Archive

http://www.gg3721.com/

Home » user.groovy »

[groovy-user] even more groovyShell fun

Roger Studner

2010-03-19

Replies: Find Java Web Hosting

Author LoginPost Reply
so

def context = new Binding()
context.snippet = 'successCount'
context.dataMap = ['successCount':'0']
def output = new GroovyShell(context).evaluate('''
dataMap.snippet
''')

that returns null... *but*

dataMap[snippet] returns 0.

Interesting eh?

My hope is that dataMap will be a GPath result from httpbuilder.. so I can have dynamic code snippets frmo a DB or excel be used to run tests/code against results from a rest api call (which would normally be "dataMap" above)

Any thoughts?

Roger


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email


©2008 gg3721.com - Jax Systems, LLC, U.S.A.