提交 f1cab9ac 编写于 作者: K Keith Donald

fixed failing test; take 2

上级 4151c52a
......@@ -326,7 +326,7 @@ public class MappingTests {
// field to multiple fields
.addAssemblerMapping("activationDateTime", new Converter<Map<String, String>, DateTime>() {
public DateTime convert(Map<String, String> source) {
MutableDateTime dateTime = new MutableDateTime(DateTimeZone.UTC);
MutableDateTime dateTime = new MutableDateTime(DateTimeZone.forID("-04:00"));
dateTime.setYear(Integer.parseInt(source.get("year")));
dateTime.setMonthOfYear(Integer.parseInt(source.get("month")));
dateTime.setDayOfMonth(Integer.parseInt(source.get("day")));
......@@ -344,7 +344,7 @@ public class MappingTests {
source.put("activationDateTime.hour", "12");
source.put("activationDateTime.minute", "0");
Account account = mapper.map(source, new Account());
assertEquals(ISODateTimeFormat.dateTime().withZone(DateTimeZone.UTC).parseDateTime("2009-10-12T12:00:00.000-04:00"), account
assertEquals(ISODateTimeFormat.dateTime().withOffsetParsed().parseDateTime("2009-10-12T12:00:00.000-04:00"), account
.getActivationDateTime());
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册