From: Steve F. <st...@m3...> - 2002-05-08 22:25:20
|
From: <lau...@ma...> > trying to create)? Or should I set up the object beforehand and have the > create() method make sure it is called and then return the data I have > previously set up? What are you trying to test? If you want to test that some other code talks to the create() method correctly, then I would check that it's called appropriately and pre-load the result. The point is to mock up the environment around so that you can isolate the code under test. On the other hand, if it's easy to create and instance and you don't need to do anything with it in the rest of the test, then maybe you could just assert that the object returned from create() is of the right type? Do you have an example? S. |