ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Lawrence Murphy <>
Subject Anonymous threads in Unittestgen testAll
Date Fri, 18 Jan 2002 04:19:41 GMT

This may be an Ant question, but it could also be a unittestgen
( question --- I'm hoping this is
something others have already encountered and solved, or that
there is a config option somewhere to get the effect I need.

I have a collection class to be tested by two concurrent threads.
To do this, I used the general anonymous Thread syntax

         (new Thread() {
              public void run() {
              // stuff and extract data

I am using the unittestgent TestAll class with my test suite passed in
as a class, and I assume suite.addTest() is using introspection to
extract all Test* inner classes, and then inspecting those classes for
all test methods.

Unfortunately, these anonymous classes are not public, and this is
tripping an exception in my unit test report:

    Class ca.cbc.sportwire.util.TestTTLCacheMap$1 is not public

    junit.framework.AssertionFailedError: Class ca.cbc.sportwire.util.TestTTLCacheMap$1 is
not public
    at junit.framework.TestSuite$1.runTest(
    at junit.framework.TestCase.runBare(
    at junit.framework.TestResult$1.protect(
    at junit.framework.TestResult.runProtected(
    at junit.framework.TestSuite.runTest(

Is there anything I can do about this?  I need to give the unit test
results to some management types who are not going to really understand
why the application does not reach a perfect bug-free score in the
unit tests ;)

(ok, I /could/ hand-edit the HTML, but that's really cheating :)

Gary Lawrence Murphy <> TeleDynamics Communications Inc
What happens on Groundhog Day?
"There are many things which do not concern the process" --- Joan of Arc

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message