memberNumber as partnerNumber+memberNumberSuffix #13

Merged
hsh-michaelhoennig merged 78 commits from memberNumberSuffix-and-partnerNumber into master 2024-01-24 15:57:16 +01:00
Showing only changes of commit d34e1f9e14 - Show all commits

View File

@ -1,5 +1,6 @@
package net.hostsharing.hsadminng.hs.office.person; package net.hostsharing.hsadminng.hs.office.person;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.EnumSource; import org.junit.jupiter.params.provider.EnumSource;
@ -15,10 +16,19 @@ class HsOfficePersonTypeConverterUnitTest {
assertThat(converter.convertToDatabaseColumn(given)).isEqualTo(given.shortName); assertThat(converter.convertToDatabaseColumn(given)).isEqualTo(given.shortName);
} }
@Test
void mapsNullToDatabaseValue() {
assertThat(converter.convertToDatabaseColumn(null)).isEqualTo(null);
}
@ParameterizedTest @ParameterizedTest
@EnumSource(HsOfficePersonType.class) @EnumSource(HsOfficePersonType.class)
void mapsFromDatabaseValue(final HsOfficePersonType given) { void mapsFromDatabaseValue(final HsOfficePersonType given) {
assertThat(converter.convertToEntityAttribute(given.shortName)).isEqualTo(given); assertThat(converter.convertToEntityAttribute(given.shortName)).isEqualTo(given);
} }
@Test
void mapsNullFromDatabaseValue() {
assertThat(converter.convertToEntityAttribute(null)).isEqualTo(null);
}
} }