On 07/09/2012 03:32 AM, Vincent Massol wrote:
Hi devs,
Over the weekend I've brought one change to xwiki-commons-test.
Now by default when you write a unit test that extends AbstractMockingComponentTestCase
there will be no component registered against the component manager except those mocked
automatically by the @MockingRequirement annotation.
This has 2 advantages:
* This is the spirit of AbstractMockingComponentTestCase since they're supposed to
mock all dependencies and define their behaviors
* It makes the tests up to 10 times faster
If you really need to register some components, use the {@link ComponentList}
annotation and if you really really need to register all components (it takes time) then
use {@link AllComponents}.
Ah, finally. A very good idea, thanks Vincent.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/