1 /*
2 * $Header: /cvsroot/jdbforms/dbforms/tests/test/org/dbforms/TestMisc.java,v 1.9 2004/08/18 12:26:11 hkollmann Exp $
3 * $Revision: 1.9 $
4 * $Date: 2004/08/18 12:26:11 $
5 *
6 * DbForms - a Rapid Application Development Framework
7 * Copyright (C) 2001 Joachim Peer <joepeer@excite.com>
8 *
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23
24 package org.dbforms;
25
26 import java.util.Calendar;
27
28
29
30 /***
31 * This is a class to test elements of DbForms that don't have a class them selves. For instance, jdk1.4 and 1.3 workarounds.
32 *
33 * @author epugh
34 */
35 public class TestMisc extends org.dbforms.util.AbstractTestCase {
36 /***
37 * This is a testcase for checking if the jdk1.4 method
38 * cal.getTimeInMillis() is approximate to the jdk1.3
39 * workaround cal.getDate().getTime()
40 *
41 */
42 public void testTimeInMillisApproximate() throws Exception {
43 System.out.println("IF YOU ARE ON JDK1.4, PLEASE UNCOMMENT THE CONTENTS OF testJDK to TEST 1.4 versus 1.3 method.");
44
45 Calendar cal = Calendar.getInstance();
46 long jdk14Method = cal.getTimeInMillis();
47 long jdk13Method = cal.getTime()
48 .getTime();
49 assertTrue("jdk14Method == jdk13Method", (jdk14Method == jdk13Method));
50 }
51 }