From 7a4ca36413cdf71206f60330e6fd2b30e943f0ae Mon Sep 17 00:00:00 2001 From: Keith Donald Date: Fri, 30 Oct 2009 19:34:21 +0000 Subject: [PATCH] Fixed failed tests --- org.springframework.context/.classpath | 1 + .../org/springframework/mapping/support/MappingTests.java | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/org.springframework.context/.classpath b/org.springframework.context/.classpath index d44de9b52d..26698a5540 100644 --- a/org.springframework.context/.classpath +++ b/org.springframework.context/.classpath @@ -39,5 +39,6 @@ + diff --git a/org.springframework.context/src/test/java/org/springframework/mapping/support/MappingTests.java b/org.springframework.context/src/test/java/org/springframework/mapping/support/MappingTests.java index 080e6412de..1949e8de91 100644 --- a/org.springframework.context/src/test/java/org/springframework/mapping/support/MappingTests.java +++ b/org.springframework.context/src/test/java/org/springframework/mapping/support/MappingTests.java @@ -8,9 +8,11 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.HashMap; import java.util.List; +import java.util.Locale; import java.util.Map; import org.joda.time.DateTime; +import org.joda.time.DateTimeZone; import org.joda.time.MutableDateTime; import org.joda.time.format.ISODateTimeFormat; import org.junit.Test; @@ -325,7 +327,7 @@ public class MappingTests { // field to multiple fields .addAssemblerMapping("activationDateTime", new Converter, DateTime>() { public DateTime convert(Map source) { - MutableDateTime dateTime = new MutableDateTime(); + MutableDateTime dateTime = new MutableDateTime(DateTimeZone.UTC); dateTime.setYear(Integer.parseInt(source.get("year"))); dateTime.setMonthOfYear(Integer.parseInt(source.get("month"))); dateTime.setDayOfMonth(Integer.parseInt(source.get("day"))); @@ -343,7 +345,7 @@ public class MappingTests { source.put("activationDateTime.hour", "12"); source.put("activationDateTime.minute", "0"); Account account = mapper.map(source, new Account()); - assertEquals(ISODateTimeFormat.dateTime().parseDateTime("2009-10-12T12:00:00.000-04:00"), account + assertEquals(ISODateTimeFormat.dateTime().withZone(DateTimeZone.UTC).parseDateTime("2009-10-12T12:00:00.000-04:00"), account .getActivationDateTime()); }