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:
Oliver Drotbohm
2020-06-16 16:11:26 +02:00
parent aa1c1d4f15
commit 52154f6986
2 changed files with 14 additions and 11 deletions

View File

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