ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doo...@apache.org
Subject svn commit: r910357 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/test/DateTimeTests.java
Date Mon, 15 Feb 2010 22:25:33 GMT
Author: doogie
Date: Mon Feb 15 22:25:33 2010
New Revision: 910357

URL: http://svn.apache.org/viewvc?rev=910357&view=rev
Log:
Add more DateTime conversion tests.

Modified:
    ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/test/DateTimeTests.java

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/test/DateTimeTests.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/test/DateTimeTests.java?rev=910357&r1=910356&r2=910357&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/test/DateTimeTests.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/conversion/test/DateTimeTests.java Mon Feb
15 22:25:33 2010
@@ -41,11 +41,18 @@
         assertConversion("DateToLong", new DateTimeConverters.DateToLong(), utilDate, currentTime);
         assertConversion("DateToSqlDate", new DateTimeConverters.DateToSqlDate(), utilDate,
new java.sql.Date(currentTime));
         assertConversion("DateToString", new DateTimeConverters.DateToString(), utilDate,
utilDate.toString());
+        //assertConversion("StringToDate", new DateTimeConverters.StringToDate(), utilDate.toString(),
utilDate);
         assertConversion("DateToTimestamp", new DateTimeConverters.DateToTimestamp(), utilDate,
new java.sql.Timestamp(currentTime));
         // Source class = java.sql.Date
         java.sql.Date sqlDate = new java.sql.Date(currentTime);
         assertConversion("SqlDateToDate", new DateTimeConverters.SqlDateToDate(), sqlDate,
utilDate);
         assertConversion("SqlDateToString", new DateTimeConverters.SqlDateToString(), sqlDate,
sqlDate.toString());
-        assertConversion("SqlDateToTimestamp", new DateTimeConverters.SqlDateToTimestamp(),
sqlDate, new java.sql.Timestamp(currentTime));
+        //assertConversion("StringToSqlDate", new DateTimeConverters.StringToSqlDate(), sqlDate.toString(),
sqlDate);
+        java.sql.Timestamp timestamp = new java.sql.Timestamp(currentTime);
+        assertConversion("SqlDateToTimestamp", new DateTimeConverters.SqlDateToTimestamp(),
sqlDate, timestamp);
+        assertConversion("StringToTimestamp", new DateTimeConverters.StringToTimestamp(),
timestamp.toString(), timestamp);
+        assertConversion("TimestampToDate", new DateTimeConverters.TimestampToDate(), timestamp,
utilDate);
+        assertConversion("TimestampToSqlDate", new DateTimeConverters.TimestampToSqlDate(),
timestamp, sqlDate);
+        //assertConversion("TimestampToString", new DateTimeConverters.TimestampToString(),
timestamp, timestamp.toString());
     }
 }



Mime
View raw message