001 /*
002 * Copyright 2001-2011 Stephen Colebourne
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package org.joda.time;
017
018 import java.util.Locale;
019 import java.util.TimeZone;
020
021 import junit.framework.Test;
022 import junit.framework.TestCase;
023 import junit.framework.TestSuite;
024
025 /**
026 * Entry point for all tests in Joda Time.
027 *
028 * @version $Revision$ $Date$
029 *
030 * @author Stephen Colebourne
031 */
032 public class TestAllPackages extends TestCase {
033
034 public TestAllPackages(String testName) {
035 super(testName);
036 }
037
038 public static Test suite() {
039 TestSuite suite = new TestSuite();
040 suite.addTest(org.joda.time.TestAll.suite());
041 suite.addTest(org.joda.time.chrono.TestAll.suite());
042 suite.addTest(org.joda.time.chrono.gj.TestAll.suite());
043 suite.addTest(org.joda.time.convert.TestAll.suite());
044 suite.addTest(org.joda.time.field.TestAll.suite());
045 suite.addTest(org.joda.time.format.TestAll.suite());
046 suite.addTest(org.joda.time.tz.TestAll.suite());
047 return suite;
048 }
049
050 public static void main(String args[]) {
051 // setup a time zone other than one tester is in
052 TimeZone.setDefault(TimeZone.getTimeZone("Asia/Seoul"));
053
054 // setup a locale other than one the tester is in
055 Locale.setDefault(new Locale("th", "TH"));
056
057 // run tests
058 String[] testCaseName = {
059 TestAllPackages.class.getName()
060 };
061 junit.textui.TestRunner.main(testCaseName);
062 }
063
064 }