@@ -183,10 +183,11 @@ public void testDaylightSavingToSummerTime() throws Exception {
183
183
184
184
for (int i = 0 ; i < 36 ; i ++) {
185
185
final Date date = calendar .getTime ();
186
- assertEquals ("SimpleDateFormat TZ=US Central" , expectedDstAndNoDst [i ][0 ], usCentral .format (date ));
187
- assertEquals ("SimpleDateFormat TZ=UTC" , expectedDstAndNoDst [i ][1 ], utc .format (date ));
188
- assertEquals ("FixedDateFormat TZ=US Central" , expectedDstAndNoDst [i ][0 ], fixedUsCentral .format (date .getTime ()));
189
- assertEquals ("FixedDateFormat TZ=UTC" , expectedDstAndNoDst [i ][1 ], fixedUtc .format (date .getTime ()));
186
+ assertEquals (expectedDstAndNoDst [i ][0 ], usCentral .format (date ), "SimpleDateFormat TZ=US Central" );
187
+ assertEquals (expectedDstAndNoDst [i ][1 ], utc .format (date ), "SimpleDateFormat TZ=UTC" );
188
+ assertEquals (expectedDstAndNoDst [i ][0 ], fixedUsCentral .format (date .getTime ()),
189
+ "FixedDateFormat TZ=US Central" );
190
+ assertEquals (expectedDstAndNoDst [i ][1 ], fixedUtc .format (date .getTime ()), "FixedDateFormat TZ=UTC" );
190
191
calendar .add (Calendar .HOUR_OF_DAY , 1 );
191
192
}
192
193
}
@@ -248,10 +249,11 @@ public void testDaylightSavingToWinterTime() throws Exception {
248
249
for (int i = 0 ; i < 36 ; i ++) {
249
250
final Date date = calendar .getTime ();
250
251
//System.out.println(usCentral.format(date) + ", Fixed: " + fixedUsCentral.format(date.getTime()) + ", utc: " + utc.format(date));
251
- assertEquals ("SimpleDateFormat TZ=US Central" , expectedDstAndNoDst [i ][0 ], usCentral .format (date ));
252
- assertEquals ("SimpleDateFormat TZ=UTC" , expectedDstAndNoDst [i ][1 ], utc .format (date ));
253
- assertEquals ("FixedDateFormat TZ=US Central" , expectedDstAndNoDst [i ][0 ], fixedUsCentral .format (date .getTime ()));
254
- assertEquals ("FixedDateFormat TZ=UTC" , expectedDstAndNoDst [i ][1 ], fixedUtc .format (date .getTime ()));
252
+ assertEquals (expectedDstAndNoDst [i ][0 ], usCentral .format (date ), "SimpleDateFormat TZ=US Central" );
253
+ assertEquals (expectedDstAndNoDst [i ][1 ], utc .format (date ), "SimpleDateFormat TZ=UTC" );
254
+ assertEquals (expectedDstAndNoDst [i ][0 ], fixedUsCentral .format (date .getTime ()),
255
+ "FixedDateFormat TZ=US Central" );
256
+ assertEquals (expectedDstAndNoDst [i ][1 ], fixedUtc .format (date .getTime ()), "FixedDateFormat TZ=US Central" );
255
257
calendar .add (Calendar .HOUR_OF_DAY , 1 );
256
258
}
257
259
}
@@ -309,7 +311,7 @@ public void testFormatLong() {
309
311
for (long time = start ; time < end ; time += 12345 ) {
310
312
final String actual = customTF .format (time );
311
313
final String expected = simpleDF .format (new Date (time ));
312
- assertEquals (format + "(" + pattern + ")" + "/" + time , expected , actual );
314
+ assertEquals (expected , actual , format + "(" + pattern + ")" + "/" + time );
313
315
}
314
316
}
315
317
}
@@ -329,7 +331,7 @@ public void testFormatLong_goingBackInTime() {
329
331
for (long time = end ; time > start ; time -= 12345 ) {
330
332
final String actual = customTF .format (time );
331
333
final String expected = simpleDF .format (new Date (time ));
332
- assertEquals (format + "(" + pattern + ")" + "/" + time , expected , actual );
334
+ assertEquals (expected , actual , format + "(" + pattern + ")" + "/" + time );
333
335
}
334
336
}
335
337
}
@@ -357,7 +359,7 @@ public void testFormatLong_goingBackInTime_DST() {
357
359
for (long time = end ; time > start ; time -= 12345 ) {
358
360
final String actual = customTF .format (time );
359
361
final String expected = simpleDF .format (new Date (time ));
360
- assertEquals (format + "(" + pattern + ")" + "/" + time , expected , actual );
362
+ assertEquals (expected , actual , format + "(" + pattern + ")" + "/" + time );
361
363
}
362
364
}
363
365
}
@@ -381,7 +383,7 @@ public void testFormatLongCharArrayInt() {
381
383
final int length = customTF .format (time , buffer , 23 );
382
384
final String actual = new String (buffer , 23 , length );
383
385
final String expected = simpleDF .format (new Date (time ));
384
- assertEquals (format + "(" + pattern + ")" + "/" + time , expected , actual );
386
+ assertEquals (expected , actual , format + "(" + pattern + ")" + "/" + time );
385
387
}
386
388
}
387
389
}
@@ -403,7 +405,7 @@ public void testFormatLongCharArrayInt_goingBackInTime() {
403
405
final int length = customTF .format (time , buffer , 23 );
404
406
final String actual = new String (buffer , 23 , length );
405
407
final String expected = simpleDF .format (new Date (time ));
406
- assertEquals (format + "(" + pattern + ")" + "/" + time , expected , actual );
408
+ assertEquals (expected , actual , format + "(" + pattern + ")" + "/" + time );
407
409
}
408
410
}
409
411
}
0 commit comments