use of groovy.lang.GroovyObject in project groovy by apache.
the class ConstructorTest method testConstructor.
public void testConstructor() throws Exception {
GroovyObject object = compile("src/test/groovy/NewExpressionTest.groovy");
object.invokeMethod("testNewInstance", null);
}
use of groovy.lang.GroovyObject in project groovy by apache.
the class MethodFailureTest method testMethodWhichCallsTheFailingMethodInsideAClosure.
public void testMethodWhichCallsTheFailingMethodInsideAClosure() {
MockGroovyObject object = new MockGroovyObject();
try {
object.invokeMethod("callClosure", new Closure(this) {
protected Object doCall(GroovyObject object) {
return object.invokeMethod("nonExistentMethod", "hello");
}
});
fail("Should have thrown an exception");
} catch (GroovyRuntimeException e) {
// expected
}
}
use of groovy.lang.GroovyObject in project groovy by apache.
the class RunBugsTest method testMarkupAndMethodBug.
public void testMarkupAndMethodBug() throws Exception {
GroovyObject object = compile("src/test/groovy/bugs/MarkupAndMethodBug.groovy");
object.invokeMethod("testBug", null);
}
use of groovy.lang.GroovyObject in project groovy by apache.
the class RunBugsTest method testPrimitiveTypeFieldTest.
public void testPrimitiveTypeFieldTest() throws Exception {
GroovyObject object = compile("src/test/groovy/PrimitiveTypeFieldTest.groovy");
object.invokeMethod("testPrimitiveField", null);
}
use of groovy.lang.GroovyObject in project groovy by apache.
the class RunBugsTest method testOverloadInvokeMethodBug.
public void testOverloadInvokeMethodBug() throws Exception {
GroovyObject object = compile("src/test/groovy/bugs/OverloadInvokeMethodBug.groovy");
object.invokeMethod("testBug", null);
}
Aggregations