litesoft
Diff Revisions
895
vs
897
for /trunk/Java/core/Anywhere/tests/org/litesoft/core/simpletypes/temporal/CalendarYMTest.java
|
@@ -110,15 +110,13 @@ |
110 |
110 |
|
|
111 |
111 |
|
private void chk( DateFormat pFormat, String pFieldOrder, CalendarYM pDate, String pDateFormatToString, int pYear, int pMonth ) |
112 |
112 |
|
{ |
113 |
|
- |
String zExpectedStringFormY = Integers.zeroPadIt( 4, pYear ); |
114 |
|
- |
String zExpectedStringFormM = Integers.zeroPadIt( 2, pMonth ); |
115 |
113 |
|
assertEquals( pFieldOrder, pFormat.getFieldOrder() ); |
116 |
114 |
|
assertEquals( "Year", pYear, pDate.getYear() ); |
117 |
115 |
|
assertEquals( "Month", pMonth, pDate.getMonth() ); |
118 |
116 |
|
assertEquals( pDateFormatToString, pFormat.format( pDate ) ); |
119 |
|
- |
assertEquals( "toYM", zExpectedStringFormY + "/" + zExpectedStringFormM, pDate.toYM() ); |
|
117 |
+ |
assertEquals( "toYM", toYM(pYear, pMonth), pDate.toYM() ); |
120 |
118 |
|
assertEquals( "fromYM", pDate, CalendarYM.fromYM( pDate.toYM() ) ); |
121 |
|
- |
assertEquals( "toSQLvalue", zExpectedStringFormY + "-" + zExpectedStringFormM, pDate.toSQLvalue() ); |
|
119 |
+ |
assertEquals( "toSQLvalue", toSQLvalueYM( pYear, pMonth ), pDate.toSQLvalue() ); |
122 |
120 |
|
assertEquals( "fromSQLvalue", pDate, CalendarYM.fromSQLvalue( pDate.toSQLvalue() ) ); |
123 |
121 |
|
} |
124 |
122 |
|
|