 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Petterson Mikael Guest
|
Posted: Tue Aug 24, 2004 1:24 pm Post subject: Test using junit |
|
|
Hi,
We are intending to use junit to create unit tests for our java objects.
To run the test cases we will use ant.
We are developing test classes (faked classes) for objects that is
dependent on the class we actually test.
First we have class Y and it depends on class Xf ( f~ faked).
Next time we test, we test X but with Yf.
The faked class and the real have the same package structure.
Is it possible to load the class Y and then get the class Yf to be
loaded when it is needed? ( Since the two classes cannot exist in the
JVM at the same time.) Must the JVM be restarted?
All advice is greatly appreciated.
Regards,
//Mikael
|
|
| Back to top |
|
 |
Bryce Guest
|
Posted: Tue Aug 24, 2004 3:12 pm Post subject: Re: Test using junit |
|
|
On Tue, 24 Aug 2004 15:24:23 +0200, Petterson Mikael
<mikael.petterson (AT) ericsson (DOT) se> wrote:
| Quote: | Hi,
We are intending to use junit to create unit tests for our java objects.
To run the test cases we will use ant.
We are developing test classes (faked classes) for objects that is
dependent on the class we actually test.
First we have class Y and it depends on class Xf ( f~ faked).
Next time we test, we test X but with Yf.
The faked class and the real have the same package structure.
Is it possible to load the class Y and then get the class Yf to be
loaded when it is needed? ( Since the two classes cannot exist in the
JVM at the same time.) Must the JVM be restarted?
|
Look at MockObjects or JMock.
--
now with more cowbell
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|