Skip to content
Snippets Groups Projects
Commit c3b54fa4 authored by OZGCloud's avatar OZGCloud
Browse files

Merge pull request 'OZG-6641 Vereinheitlichung Postfach-Typbezeichnung...

Merge pull request 'OZG-6641 Vereinheitlichung Postfach-Typbezeichnung BayernId' (#180) from OZG-6641-Vereinheitlichung-Postfach-Typbezeichnung-BayernId into master

Reviewed-on: https://git.ozg-sh.de/ozgcloud-app/eingang-manager/pulls/180


Reviewed-by: default avatarOZGCloud <ozgcloud@mgm-tp.com>
parents db59e175 96cf528a
Branches
Tags
No related merge requests found
...@@ -12,11 +12,13 @@ import org.mapstruct.ReportingPolicy; ...@@ -12,11 +12,13 @@ import org.mapstruct.ReportingPolicy;
import de.ozgcloud.eingang.common.formdata.ServiceKonto; import de.ozgcloud.eingang.common.formdata.ServiceKonto;
import de.ozgcloud.eingang.common.formdata.ServiceKonto.PostfachAddress; import de.ozgcloud.eingang.common.formdata.ServiceKonto.PostfachAddress;
import de.ozgcloud.eingang.common.formdata.StringBasedIdentifier; import de.ozgcloud.eingang.common.formdata.StringBasedIdentifier;
import de.ozgcloud.eingang.semantik.common.ServiceKontoFactory;
@Mapper(collectionMappingStrategy = CollectionMappingStrategy.ADDER_PREFERRED, unmappedTargetPolicy = ReportingPolicy.WARN) @Mapper(collectionMappingStrategy = CollectionMappingStrategy.ADDER_PREFERRED, unmappedTargetPolicy = ReportingPolicy.WARN)
interface FormCycleServiceKontoMapper { interface FormCycleServiceKontoMapper {
@Mapping(target = "postfachAddress", ignore = true) @Mapping(target = "postfachAddress", ignore = true)
@Mapping(target = "type", constant = ServiceKontoFactory.POSTFACH_TYPE_BAYERN_ID)
@Mapping(target = "postfachAddresses", expression = "java(fromGrpcPostfachAddresses(serviceKonto))") @Mapping(target = "postfachAddresses", expression = "java(fromGrpcPostfachAddresses(serviceKonto))")
ServiceKonto fromGrpc(FormCycleServiceKonto serviceKonto); ServiceKonto fromGrpc(FormCycleServiceKonto serviceKonto);
......
...@@ -11,6 +11,7 @@ import org.mapstruct.factory.Mappers; ...@@ -11,6 +11,7 @@ import org.mapstruct.factory.Mappers;
import de.ozgcloud.eingang.common.formdata.ServiceKonto.PostfachAddress; import de.ozgcloud.eingang.common.formdata.ServiceKonto.PostfachAddress;
import de.ozgcloud.eingang.common.formdata.ServiceKontoTestFactory; import de.ozgcloud.eingang.common.formdata.ServiceKontoTestFactory;
import de.ozgcloud.eingang.common.formdata.StringBasedIdentifier; import de.ozgcloud.eingang.common.formdata.StringBasedIdentifier;
import de.ozgcloud.eingang.semantik.common.ServiceKontoFactory;
class FormCycleServiceKontoMapperTest { class FormCycleServiceKontoMapperTest {
...@@ -20,6 +21,13 @@ class FormCycleServiceKontoMapperTest { ...@@ -20,6 +21,13 @@ class FormCycleServiceKontoMapperTest {
@Nested @Nested
class TestFromGrpcServiceKonto { class TestFromGrpcServiceKonto {
@Test
void shouldMapType() {
var result = mapper.fromGrpc(FormCycleServiceKontoTestFactory.create());
assertThat(result.getType()).isEqualTo(ServiceKontoFactory.POSTFACH_TYPE_BAYERN_ID);
}
@DisplayName("trustLevel") @DisplayName("trustLevel")
@Nested @Nested
class TestTrustLevel { class TestTrustLevel {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment