Browse Source

long style formatting tests

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2650 50f2f4bb-b051-0410-bef5-90022cba6387
pull/1/head
Keith Donald 16 years ago
parent
commit
2dbe05aa24
  1. 21
      org.springframework.context/src/test/java/org/springframework/format/datetime/joda/JodaTimeFormattingTests.java

21
org.springframework.context/src/test/java/org/springframework/format/datetime/joda/JodaTimeFormattingTests.java

@ -151,6 +151,16 @@ public class JodaTimeFormattingTests { @@ -151,6 +151,16 @@ public class JodaTimeFormattingTests {
"localDateTimeAnnotated"));
}
@Test
public void testBindLocalDateTimeAnnotatedLong() {
MutablePropertyValues propertyValues = new MutablePropertyValues();
propertyValues.add("localDateTimeAnnotatedLong", "October 31, 2009 12:00:00 PM ");
binder.bind(propertyValues);
assertEquals(0, binder.getBindingResult().getErrorCount());
assertEquals("October 31, 2009 12:00:00 PM ", binder.getBindingResult().getFieldValue(
"localDateTimeAnnotatedLong"));
}
@Test
public void testBindDateTime() {
MutablePropertyValues propertyValues = new MutablePropertyValues();
@ -287,6 +297,9 @@ public class JodaTimeFormattingTests { @@ -287,6 +297,9 @@ public class JodaTimeFormattingTests {
@DateTimeFormat(style="FF")
private LocalDateTime localDateTimeAnnotated;
@DateTimeFormat(style="LL")
private LocalDateTime localDateTimeAnnotatedLong;
private DateTime dateTime;
@DateTimeFormat(style="MS")
@ -371,6 +384,14 @@ public class JodaTimeFormattingTests { @@ -371,6 +384,14 @@ public class JodaTimeFormattingTests {
public void setLocalDateTimeAnnotated(LocalDateTime localDateTimeAnnotated) {
this.localDateTimeAnnotated = localDateTimeAnnotated;
}
public LocalDateTime getLocalDateTimeAnnotatedLong() {
return localDateTimeAnnotatedLong;
}
public void setLocalDateTimeAnnotatedLong(LocalDateTime localDateTimeAnnotatedLong) {
this.localDateTimeAnnotatedLong = localDateTimeAnnotatedLong;
}
public DateTime getDateTime() {
return dateTime;

Loading…
Cancel
Save