DATACMNS-1743 - Polishing.
We now avoid identifier conversion in ReflectionrepositoryConverter if not necessary. Reestablish a couple of unit tests for DomainClassConverter that were disabled by accident.
This commit is contained in:
@@ -100,21 +100,16 @@ class DomainClassConverterUnitTests {
|
||||
assertMatches(false);
|
||||
}
|
||||
|
||||
// DATACMNS-233
|
||||
@Test // DATACMNS-233
|
||||
void returnsNullForNullSource() {
|
||||
assertThat(converter.convert(null, STRING_TYPE, USER_TYPE)).isNull();
|
||||
}
|
||||
|
||||
// DATACMNS-233
|
||||
@Test // DATACMNS-233
|
||||
void returnsNullForEmptyStringSource() {
|
||||
assertThat(converter.convert("", STRING_TYPE, USER_TYPE)).isNull();
|
||||
}
|
||||
|
||||
private void assertMatches(boolean matchExpected) {
|
||||
|
||||
assertThat(converter.matches(STRING_TYPE, USER_TYPE)).isEqualTo(matchExpected);
|
||||
}
|
||||
|
||||
@Test
|
||||
void convertsStringToUserCorrectly() throws Exception {
|
||||
|
||||
@@ -234,6 +229,10 @@ class DomainClassConverterUnitTests {
|
||||
return ctx;
|
||||
}
|
||||
|
||||
private void assertMatches(boolean matchExpected) {
|
||||
assertThat(converter.matches(STRING_TYPE, USER_TYPE)).isEqualTo(matchExpected);
|
||||
}
|
||||
|
||||
static interface Wrapper {
|
||||
|
||||
void foo(@ModelAttribute User user);
|
||||
|
||||
Reference in New Issue
Block a user