Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Another
- {
- protected String name="";
- public Another() {}
- public main(String[] args) {}
- public boolean getResult() {return true;}
- public String getName() {return name;}
- public void setName(String value) {name=value;}
- }
- evaluate(new File("autotest/sources/Another.groovy"))
- import support.tool.AutotestResult;
- public class Another2 extends obj.getClass
- {
- public Another2()
- {
- this.setName(this.name+"N");
- }
- public AutotestResult run()
- {
- return new AutotestResult(this.name+"123",this.getResult(),null,null)
- }
- }
- Another2 a = new Another2()
- a.run()
- String[] paths = {"autotest\cases\test.groovy"};
- GroovyScriptEngine gse = new GroovyScriptEngine(paths);
- Binding binding = new Binding();
- binding.setVariable("args",null);
- System.out.println(((AutotestResult)gse.run("test.groovy", binding)).toJSON());
- Exception in thread "main" org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
- file:/.../autotest/cases/test.groovy: 6: unable to resolve class Another
- @ line 6, column 1.
- public class Another2 extends Another
- ^
Add Comment
Please, Sign In to add comment