|
|||||
|
|
|||||
DiscoveryExample
It is not necessary to specify the location of all of your tests in PicoUnit, you don't need like JUnit to add all of your classes to a TestSuite. PicoUnit will discover your tests by scanning the classpath, all you need to do is specify a starting point: package mypackage.module; import junit.framework.Test; import picounit.PicoUnit; public class Suite { public static Test suite() { PicoUnit picoUnit = new PicoUnit("Unit Tests"); return picoUnit.generateJUnitTest(); } } This 'Test Suite' is located in the package 'mypackage.module', PicoUnit will scan the classpath for all classes that implement the picounit.Test marker interface and that lie below 'mypackage.module'. |
|||||
|
Copyright 2003-2006 - The Codehaus. All rights reserved unless otherwise noted.
Powered by Atlassian Confluence
|
|||||