DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11531>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11531 Use code below to get test name from any Test, not just TestCase [EMAIL PROTECTED] changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | ------- Additional Comments From [EMAIL PROTECTED] 2002-09-16 09:58 ------- 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. -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
