View Javadoc

1   /*
2    *  Copyright 2001-2011 Stephen Colebourne
3    *
4    *  Licensed under the Apache License, Version 2.0 (the "License");
5    *  you may not use this file except in compliance with the License.
6    *  You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   *  Unless required by applicable law or agreed to in writing, software
11   *  distributed under the License is distributed on an "AS IS" BASIS,
12   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *  See the License for the specific language governing permissions and
14   *  limitations under the License.
15   */
16  package org.joda.time;
17  
18  import java.util.Locale;
19  import java.util.TimeZone;
20  
21  import junit.framework.Test;
22  import junit.framework.TestCase;
23  import junit.framework.TestSuite;
24  
25  /**
26   * Entry point for all tests in Joda Time.
27   * 
28   * @version $Revision$ $Date$
29   * 
30   * @author Stephen Colebourne
31   */
32  public class TestAllPackages extends TestCase {
33  
34      public TestAllPackages(String testName) {
35          super(testName);
36      }
37  
38      public static Test suite() {
39          TestSuite suite = new TestSuite();
40          suite.addTest(org.joda.time.TestAll.suite());
41          suite.addTest(org.joda.time.chrono.TestAll.suite());
42          suite.addTest(org.joda.time.chrono.gj.TestAll.suite());
43          suite.addTest(org.joda.time.convert.TestAll.suite());
44          suite.addTest(org.joda.time.field.TestAll.suite());
45          suite.addTest(org.joda.time.format.TestAll.suite());
46          suite.addTest(org.joda.time.tz.TestAll.suite());
47          return suite;
48      }
49  
50      public static void main(String args[]) {
51          // setup a time zone other than one tester is in
52          TimeZone.setDefault(TimeZone.getTimeZone("Asia/Seoul"));
53          
54          // setup a locale other than one the tester is in
55          Locale.setDefault(new Locale("th", "TH"));
56          
57          // run tests
58          String[] testCaseName = {
59              TestAllPackages.class.getName()
60          };
61          junit.textui.TestRunner.main(testCaseName);
62      }
63  
64  }