CustomEditorTests.java (spring-framework-5.3.23) | : | CustomEditorTests.java (spring-framework-5.3.24) | ||
---|---|---|---|---|
skipping to change at line 725 | skipping to change at line 725 | |||
assertThat(editor.getValue()).isEqualTo(Boolean.FALSE); | assertThat(editor.getValue()).isEqualTo(Boolean.FALSE); | |||
assertThat(editor.getAsText()).isEqualTo("false"); | assertThat(editor.getAsText()).isEqualTo("false"); | |||
editor.setValue(null); | editor.setValue(null); | |||
assertThat(editor.getValue()).isNull(); | assertThat(editor.getValue()).isNull(); | |||
assertThat(editor.getAsText()).isEmpty(); | assertThat(editor.getAsText()).isEmpty(); | |||
} | } | |||
@Test | @Test | |||
void testCustomDateEditor() { | void testCustomDateEditor() { | |||
CustomDateEditor editor = new CustomDateEditor(null, false); | CustomDateEditor editor = new CustomDateEditor(new SimpleDateForm at("MM/dd/yyyy"), false); | |||
editor.setValue(null); | editor.setValue(null); | |||
assertThat(editor.getValue()).isNull(); | assertThat(editor.getValue()).isNull(); | |||
assertThat(editor.getAsText()).isEmpty(); | assertThat(editor.getAsText()).isEmpty(); | |||
} | } | |||
@Test | @Test | |||
void testCustomDateEditorWithEmptyAsNull() { | void testCustomDateEditorWithEmptyAsNull() { | |||
CustomDateEditor editor = new CustomDateEditor(null, true); | CustomDateEditor editor = new CustomDateEditor(new SimpleDateForm at("MM/dd/yyyy"), true); | |||
editor.setValue(null); | editor.setValue(null); | |||
assertThat(editor.getValue()).isNull(); | assertThat(editor.getValue()).isNull(); | |||
assertThat(editor.getAsText()).isEmpty(); | assertThat(editor.getAsText()).isEmpty(); | |||
} | } | |||
@Test | @Test | |||
void testCustomDateEditorWithExactDateLength() { | void testCustomDateEditorWithExactDateLength() { | |||
int maxLength = 10; | int maxLength = 10; | |||
String validDate = "01/01/2005"; | String validDate = "01/01/2005"; | |||
String invalidDate = "01/01/05"; | String invalidDate = "01/01/05"; | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added |