Skip to content

Commit

Permalink
Use non-null DateFormat for CustomDateEditor in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sdeleuze committed Nov 2, 2022
1 parent 58bb6e7 commit c14cbd0
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -722,15 +722,15 @@ void testCustomBooleanEditorWithEmptyAsNull() {

@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();
}

@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();
Expand Down

0 comments on commit c14cbd0

Please sign in to comment.