long style formatting tests
This commit is contained in:
parent
2f539cded9
commit
d7a8d499be
|
|
@ -151,6 +151,16 @@ public class JodaTimeFormattingTests {
|
||||||
"localDateTimeAnnotated"));
|
"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
|
@Test
|
||||||
public void testBindDateTime() {
|
public void testBindDateTime() {
|
||||||
MutablePropertyValues propertyValues = new MutablePropertyValues();
|
MutablePropertyValues propertyValues = new MutablePropertyValues();
|
||||||
|
|
@ -287,6 +297,9 @@ public class JodaTimeFormattingTests {
|
||||||
@DateTimeFormat(style="FF")
|
@DateTimeFormat(style="FF")
|
||||||
private LocalDateTime localDateTimeAnnotated;
|
private LocalDateTime localDateTimeAnnotated;
|
||||||
|
|
||||||
|
@DateTimeFormat(style="LL")
|
||||||
|
private LocalDateTime localDateTimeAnnotatedLong;
|
||||||
|
|
||||||
private DateTime dateTime;
|
private DateTime dateTime;
|
||||||
|
|
||||||
@DateTimeFormat(style="MS")
|
@DateTimeFormat(style="MS")
|
||||||
|
|
@ -372,6 +385,14 @@ public class JodaTimeFormattingTests {
|
||||||
this.localDateTimeAnnotated = localDateTimeAnnotated;
|
this.localDateTimeAnnotated = localDateTimeAnnotated;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LocalDateTime getLocalDateTimeAnnotatedLong() {
|
||||||
|
return localDateTimeAnnotatedLong;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLocalDateTimeAnnotatedLong(LocalDateTime localDateTimeAnnotatedLong) {
|
||||||
|
this.localDateTimeAnnotatedLong = localDateTimeAnnotatedLong;
|
||||||
|
}
|
||||||
|
|
||||||
public DateTime getDateTime() {
|
public DateTime getDateTime() {
|
||||||
return dateTime;
|
return dateTime;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue