Skip to content

Commit

Permalink
finetune testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
dennischen committed Nov 4, 2013
1 parent b706bdb commit 153bd00
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ public void testInputDateObjectTW(Book book){
r = Ranges.range(sheet,"A1");
Assert.assertEquals("General", r.getCellStyle().getDataFormat());
CellOperationUtil.applyDataFormat(r, "m/d/yyyy");
todayStr = new SimpleDateFormat("yyyy/MM/dd",Setup.getZssContextLocale()).format(today);
todayStrLong = new SimpleDateFormat("yyyy/MM/dd a hh:mm:ss",Setup.getZssContextLocale()).format(today); //it is hh:mm:ss in TW
todayStr = new SimpleDateFormat("yyyy/M/d",Setup.getZssContextLocale()).format(today);
todayStrLong = new SimpleDateFormat("yyyy/M/d a hh:mm:ss",Setup.getZssContextLocale()).format(today); //it is hh:mm:ss in TW

r.setCellEditText(todayStr);
Assert.assertEquals("yyyy/m/d", r.getCellStyle().getDataFormat()); //format change
Expand Down Expand Up @@ -382,8 +382,8 @@ public void testInputDateObjectUS(Book book){
r = Ranges.range(sheet,"A1");
Assert.assertEquals("General", r.getCellStyle().getDataFormat());
CellOperationUtil.applyDataFormat(r, "m/d/yyyy");
todayStr = Util.getDateFormat("MM/dd/yyyy",Setup.getZssContextLocale()).format(today);
todayStrLong = Util.getDateFormat("MM/dd/yyyy h:mm:ss a",Setup.getZssContextLocale()).format(today); // it is h:mm:ss in US
todayStr = Util.getDateFormat("M/d/yyyy",Setup.getZssContextLocale()).format(today);
todayStrLong = Util.getDateFormat("M/dd/yyyy h:mm:ss a",Setup.getZssContextLocale()).format(today); // it is M/dd/yyyy h:mm:ss in US

r.setCellEditText(todayStr);
Assert.assertEquals("m/d/yyyy", r.getCellStyle().getDataFormat()); //format change
Expand Down

0 comments on commit 153bd00

Please sign in to comment.