Forum Discussion
ameehl
12 years agoNew Contributor
Martin,
Have you found a way to add parameters to the constructor?
So:
def constructor(someString, contextIn, testRunnerIn, logIn){
this.context = contextIn;
this.testRunner = testRunnerIn;
this.log = logIn;
log.info someString;
}
...
context.setProperty( "Template", new Template(someString, context, testRunner, log) ); ?
------------------
module.run("foo", testRunner, context); ?
def example = context.Template("foor"); ?
------------------
I've tried the shown method, and have had no success.
Thanks,
-Drew
Have you found a way to add parameters to the constructor?
So:
def constructor(someString, contextIn, testRunnerIn, logIn){
this.context = contextIn;
this.testRunner = testRunnerIn;
this.log = logIn;
log.info someString;
}
...
context.setProperty( "Template", new Template(someString, context, testRunner, log) ); ?
------------------
module.run("foo", testRunner, context); ?
def example = context.Template("foor"); ?
------------------
I've tried the shown method, and have had no success.
Thanks,
-Drew
Related Content
- 6 years ago
- 4 years ago
Recent Discussions
- 5 days ago
- 9 days ago