Browse Source

Fixed failed tests

pull/23217/head
Keith Donald 15 years ago
parent
commit
7a4ca36413
  1. 1
      org.springframework.context/.classpath
  2. 6
      org.springframework.context/src/test/java/org/springframework/mapping/support/MappingTests.java

1
org.springframework.context/.classpath

@ -39,5 +39,6 @@ @@ -39,5 +39,6 @@
<classpathentry kind="var" path="IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.6.0.jar"/>
<classpathentry kind="var" path="IVY_CACHE/javax.inject/com.springsource.org.atinject.tck/1.0.0/com.springsource.org.atinject.tck-1.0.0.jar" sourcepath="/IVY_CACHE/javax.inject/com.springsource.org.atinject.tck/1.0.0/com.springsource.org.atinject.tck-sources-1.0.0.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.jboss.cl/com.springsource.org.jboss.classloader/2.0.5.GA/com.springsource.org.jboss.classloader-2.0.5.GA.jar"/>
<classpathentry kind="var" path="IVY_CACHE/org.jboss.util/com.springsource.org.jboss.util/2.2.9.GA/com.springsource.org.jboss.util-2.2.9.GA.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

6
org.springframework.context/src/test/java/org/springframework/mapping/support/MappingTests.java

@ -8,9 +8,11 @@ import java.math.BigDecimal; @@ -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 { @@ -325,7 +327,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();
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 { @@ -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());
}

Loading…
Cancel
Save