1 | package jpacman; |
2 | |
3 | import junit.framework.JUnit4TestAdapter; |
4 | |
5 | import org.junit.runner.RunWith; |
6 | import org.junit.runners.Suite; |
7 | import org.junit.runners.Suite.SuiteClasses; |
8 | |
9 | import jpacman.controller.ImageFactoryTest; |
10 | |
11 | import jpacman.model.BoardTest; |
12 | import jpacman.model.CellTest; |
13 | import jpacman.model.EngineTest; |
14 | import jpacman.model.GameTest; |
15 | import jpacman.model.ObserverTest; |
16 | import jpacman.model.PlayerMoveTest; |
17 | |
18 | |
19 | |
20 | /** |
21 | * Test suite containing all Pacman junit test cases. |
22 | * |
23 | * This class is provided so that, e.g., ant's junit |
24 | * task that is still based on junit 3.8.1. can run the |
25 | * test suite as well. |
26 | * |
27 | * @author Arie van Deursen; Aug 1, 2003 |
28 | * @version $Id: TestAll.java,v 1.8 2008/02/04 11:00:38 arie Exp $ |
29 | */ |
30 | |
31 | |
32 | /** |
33 | * If you'd like your class to be tested, |
34 | * include it below in the list of suite classes. |
35 | */ |
36 | @RunWith(Suite.class) |
37 | @SuiteClasses({ |
38 | PacmanTest.class, |
39 | BoardTest.class, |
40 | CellTest.class, |
41 | GameTest.class, |
42 | EngineTest.class, |
43 | ObserverTest.class, |
44 | PlayerMoveTest.class, |
45 | ImageFactoryTest.class |
46 | }) |
47 | |
48 | public final class TestAll { |
49 | |
50 | /** |
51 | * Create a JUnit 3.8 Suite object that can be used to exercise |
52 | * the JUnit 4 test suite from the command line or from ant. |
53 | * @return The overall test suite. |
54 | */ |
55 | public static junit.framework.Test suite() { |
56 | return new JUnit4TestAdapter(TestAll.class); |
57 | } |
58 | |
59 | /** |
60 | * Convencience method making it easiest to exercise all Pacman test cases. |
61 | * @param args All arguments are ignored. |
62 | */ |
63 | public static void main(String[] args) { |
64 | org.junit.runner.JUnitCore.runClasses(jpacman.TestAll.class); |
65 | } |
66 | |
67 | } |