Hi
I tried to do this in my module :
/* protected def methodMissing(String name, args) {
System.out.println("In the method missing with " + name);
if(DslTelluriumGroovyTestCase.metaClass.respondsTo(aost, name,
args)){
return aost.invokeMethod(name, args)
}
}*/
But this intercepts all methods like Div etc. My guess is that my
respondsTo metaClass is wrong . What should my respondsTo be set to
Regards
Hari
On Fri, Feb 20, 2009 at 8:32 PM, John <[email protected]> wrote:
>
> For example, look at the TelluriumDataDrivenTest class,
>
>
>
> //----------------------------------------------------------------------------------------------------------
> // Method delegation
>
>
> //----------------------------------------------------------------------------------------------------------
>
> //try to delegate missing methods to the DdDslContext, if still
> could not find,
> //throw a MissingMethodException
> protected def methodMissing(String name, args) {
> if(COMPARE_RESULT.equals(name)){
> //call recordResult(expected, actual)
> return this.invokeMethod(RECORD_RESULT, args)
> }
>
> if(dtddm.metaClass.respondsTo(dtddm, name, args)){
> return dtddm.invokeMethod(name, args)
> }
>
> throw new MissingMethodException(name,
> TelluriumDataDrivenTest.class, args)
> }
>
> If you still have problems, post your code here.
>
> Thanks,
>
> Jian
>
> On Feb 20, 7:12 am, Harihara Vinayakaram <[email protected]> wrote:
> > Hi
> > I am trying to implement a methodMissing method in my test case to
> handle
> > my tests. But when I implement this then I intercept methods like Div /
> > UrlLink etc , and things stop working
> >
> > I would like to see if there is any easier way to implement my own
> > methodMissing
> >
> > Thanks
> >
> > Regards
> > Hari
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"tellurium-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/tellurium-users?hl=en
-~----------~----~----~----~------~----~------~--~---