Use non-null DateFormat for CustomDateEditor in tests
Closes gh-29419
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user