Subversion Repository Public Repository

litesoft

Diff Revisions 859 vs 860 for /trunk/Java/core/Anywhere/tests/org/litesoft/codec/SimpleDateTypedTerminatingCodecTest.java

Diff revisions: vs.
  @@ -1,12 +1,9 @@
1 1 // This Source Code is in the Public Domain per: http://litesoft.org/License.txt
2 2 package org.litesoft.codec;
3 3
4 - import java.sql.*;
5 -
6 4 import junit.framework.*;
7 5
8 6 import org.litesoft.core.simpletypes.temporal.*;
9 - import org.litesoft.core.typeutils.*;
10 7
11 8 public class SimpleDateTypedTerminatingCodecTest extends TestCase
12 9 {
  @@ -25,7 +22,7 @@
25 22 junit.textui.TestRunner.run( suite() );
26 23 }
27 24
28 - private static final TypedTerminatingCodec<SimpleDate> CODEC = SimpleDateTypedTerminatingCodec.INSTANCE;
25 + private static final TypedTerminatingCodec<CalendarYMD> CODEC = SimpleDateTypedTerminatingCodec.INSTANCE;
29 26
30 27 public void test_checkBadStrings()
31 28 {
  @@ -50,11 +47,11 @@
50 47 }
51 48 }
52 49
53 - private SimpleDate make( long pLongMillisSinceEpoch )
50 + private CalendarYMD make( long pLongMillisSinceEpoch )
54 51 {
55 52 java.util.Date zDate = new java.util.Date( pLongMillisSinceEpoch );
56 53
57 - return new SimpleDate( zDate );
54 + return new CalendarYMD( zDate );
58 55 }
59 56
60 57 public void test_wierds()
  @@ -118,20 +115,20 @@
118 115 // checkRT( SqlDate.MAX_VALUE );
119 116 }
120 117
121 - private void checkRT( SimpleDate pValue )
118 + private void checkRT( CalendarYMD pValue )
122 119 {
123 120 String encoded = encode( pValue );
124 - SimpleDate rtValue = decode( encoded );
121 + CalendarYMD rtValue = decode( encoded );
125 122 assertEquals( "RT (" + encoded + ") ", pValue, rtValue );
126 123 System.out.println( "RT " + pValue + ": " + encoded );
127 124 }
128 125
129 - private SimpleDate decode( String pEncoded )
126 + private CalendarYMD decode( String pEncoded )
130 127 {
131 128 return CODEC.decode( pEncoded );
132 129 }
133 130
134 - private String encode( SimpleDate pValue )
131 + private String encode( CalendarYMD pValue )
135 132 {
136 133 return CODEC.encode( pValue );
137 134 }