Hi I'm trying to write groovy script to test written program.
I have to call this method:
public void gruss (Object newAge) {
super.grussInsert(newAge)
}
and print output to console, any advise how to do it, or where to start?
Hi I'm trying to write groovy script to test written program.
I have to call this method:
public void gruss (Object newAge) {
super.grussInsert(newAge)
}
and print output to console, any advise how to do it, or where to start?
Groovy can call any Java object, which the code above appears to be.
Assuming your method above lives on MyObject and is packaged in myjar.jar, Your groovy script could simply be:
def myobj = new MyObject()
myobj.gruss(15)
println myobj
And you just make sure you run groovy with the classpath set to include your jar:
groovy -classpath myjar.jar myscript.groovy