ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Everitt, Andrew" <Andrew.Ever...@gbr.xerox.com>
Subject RE: Is anyone using ANT with jUnit tests written with jFunc
Date Mon, 16 Sep 2002 09:45:12 GMT
Stefan,

I gave it a try and it didn't work :-(. After a little investigation it
turns out that JFunc actually creates a TestletWrapper instance under the
hood. Unfortunately that class implements a method 'name' but not 'getName',
it doesn't make much sense to me but thats it. I modified the code in the
else block to look for both method signatures:
            try {
                Method getNameMethod;
                try {
                    getNameMethod = t.getClass().getMethod("getName", new
Class [0]);
                } catch (NoSuchMethodException e) {
                    getNameMethod = t.getClass().getMethod("name", new Class
[0]);
                }
                if (getNameMethod.getReturnType() == String.class) {
                    return (String) getNameMethod.invoke(t, new Object[0]);
                }
            } catch (Throwable e) {}

With this mod all seems to work fine. I'm sorry this isn't a diff, I can't
get to CVS from my office PC (firewalls etc) let me know if you need some
more info.

Cheers,
Andi

-----Original Message-----
From: Everitt, Andrew 
Sent: 16 September 2002 09:23
To: 'Ant Developers List'
Subject: RE: Is anyone using ANT with jUnit tests written with jFunc


Mornin' Stefan,

Thanks very much for looking at this so quickly. I've been on holiday over
the weekend otherwise I would have had a go at it - I had pretty much worked
out how to fix it but hadn't had a chance to try it. I'll pull out a nightly
build this am and give it a try.

Cheers,
Andi

-----Original Message-----
From: Stefan Bodewig [mailto:bodewig@apache.org]
Sent: 13 September 2002 11:07
To: ant-dev@jakarta.apache.org
Subject: Re: Is anyone using ANT with jUnit tests written with jFunc


On 13 Sep 2002, Stefan Bodewig <bodewig@apache.org> wrote:

> I've assigned it to myself and plan to fix it before 1.5.1 has been
> released.

OK, the fix is in CVS HEAD and will appear in the 1.5 branch shortly.
Could you give the next (i.e. 0914 or later) nightly build a try to
verify you get the correct name for your tests?

Stefan

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message