long style formatting tests
This commit is contained in:
parent
2f539cded9
commit
d7a8d499be
|
|
@ -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 {
|
|||
@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 {
|
|||
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…
Reference in New Issue