Use non-null DateFormat for CustomDateEditor in tests
Closes gh-29419
This commit is contained in:
parent
58bb6e7181
commit
c14cbd07f4
|
|
@ -722,7 +722,7 @@ class CustomEditorTests {
|
|||
|
||||
@Test
|
||||
void testCustomDateEditor() {
|
||||
CustomDateEditor editor = new CustomDateEditor(null, false);
|
||||
CustomDateEditor editor = new CustomDateEditor(new SimpleDateFormat("MM/dd/yyyy"), false);
|
||||
editor.setValue(null);
|
||||
assertThat(editor.getValue()).isNull();
|
||||
assertThat(editor.getAsText()).isEmpty();
|
||||
|
|
@ -730,7 +730,7 @@ class CustomEditorTests {
|
|||
|
||||
@Test
|
||||
void testCustomDateEditorWithEmptyAsNull() {
|
||||
CustomDateEditor editor = new CustomDateEditor(null, true);
|
||||
CustomDateEditor editor = new CustomDateEditor(new SimpleDateFormat("MM/dd/yyyy"), true);
|
||||
editor.setValue(null);
|
||||
assertThat(editor.getValue()).isNull();
|
||||
assertThat(editor.getAsText()).isEmpty();
|
||||
|
|
|
|||
Loading…
Reference in New Issue