On Fri, 30 Nov 2001 01:27, Vincent Massol wrote: > No one has replied to this message that I posted 10 days ago. Let's > broaden the subject...
I agree with your idea but haven't had time to implement any ;) > Is there a place (document, thread) that describes how unit testing is > achieved in the Avalon suite ? Theres a basic JUnit testcase in excalibur ... I haven't actually used it sop you may want to ask Giacomo or Berin about it ;) > I have seen a few junit tests but they > seemed complex to me and seemed to require quite a setup of environment. Do > you guys know about mock objects testing (http://www.mockobjects.com) ? >From what I can tell the current Unit testing base class actually provides real objects by default for the Configuration/Parameters/Logger objects. It will also allow you to overide certain methods if you want to return mock objects instead. IIRC you overide Foo createFoo() to overide the Foo stage (where foo may be logger, ComponentManager, COntext etc). And thus could return mock objects there. You would then need to add some test cases to check whatever you are testing. > It > would seem very well adapted to write unit tests for components. I have > included in my previous post on this subject an example of unit test for a > JdbcDataAcess component written using Avalon, as an example. > > I think it would be nice to have such a unit test suite for each component > provided in excalibur. yep. Any volunteers? ;) -- Cheers, Pete ---------------------------------------- Whatever you do will be insignificant, but it is very important that you do it. --Gandhi ---------------------------------------- -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>