ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conor MacNeill <>
Subject Re: JUnit: setUp() method called multiple times ?
Date Thu, 03 Oct 2002 10:21:32 GMT
P. Fleury wrote:
> Erik Hatcher wrote:
>> Correct.  This is just the way JUnit works (regardless of it being run 
>> from Ant or otherwise).  setUp(), testXXX, tearDown().... setUp(), 
>> testZZZ(), tearDown() - that is the JUnit-way, call setUp(), then a 
>> test method, then tearDown() repeatedly.
>>     Erik
> Mmm. Well, if in my class, I have 3 test functions which needs some 
> object to be initialized to run properly. Now it takes a looong time to 
> setup that object, so in the current situation, if my class is

For one-off stuff just put it into the test class constructor.


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

View raw message