Created
July 26, 2012 15:24
-
-
Save jbarop/3182684 to your computer and use it in GitHub Desktop.
GwtTestSuite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class MyFancyGwtTestSuite extends GWTTestSuite { | |
| /** | |
| * List of all {@link GWTTestCase}s | |
| */ | |
| private final static Set<Class<? extends GWTTestCase>> allGwtTestCases = new HashSet<Class<? extends GWTTestCase>>(); | |
| /** | |
| * Find all {@link GWTTestCase}s in the "<code>com.devbliss.idpool.gwt</code>" package and return | |
| * a suite containing these tests. | |
| */ | |
| public static Test suite() { | |
| ComponentScanner scanner = new ComponentScanner(); | |
| scanner.getClasses(new ComponentQuery() { | |
| @Override | |
| protected void query() { | |
| select().from("com.devbliss.idpool.gwt").andStore( | |
| thoseExtending(GWTTestCase.class).into(allGwtTestCases)); | |
| } | |
| }); | |
| TestSuite suite = new TestSuite("All GWTTestCase tests"); | |
| for (Class<? extends GWTTestCase> unitTestClasz : allGwtTestCases) { | |
| suite.addTestSuite(unitTestClasz); | |
| } | |
| return suite; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class MyGwtTestSuite extends GWTTestSuite { | |
| public static Test suite() { | |
| TestSuite suite = new TestSuite("All GWTTestCase tests"); | |
| suite.addTestSuite(FirstGwtTest.class); | |
| suite.addTestSuite(SecondGwtTest.class); | |
| suite.addTestSuite(ThirdGwtTest.class); | |
| return suite; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <dependency> | |
| <groupId>net.sf.extcos</groupId> | |
| <artifactId>extcos</artifactId> | |
| <version>0.3b</version> | |
| <scope>test</scope> | |
| </dependency> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment