Skip to content
Snippets Groups Projects
Commit 4776cd26 authored by Krzysztof Witukiewicz's avatar Krzysztof Witukiewicz
Browse files

OZG-7573 Use xzufi-id for weiterleitung

parent 40af839a
Branches
Tags
1 merge request!23OZG-7573 Use xzufi-id for weiterleitung
...@@ -32,7 +32,7 @@ import de.ozgcloud.alfa.collaboration.OrganisationsEinheit; ...@@ -32,7 +32,7 @@ import de.ozgcloud.alfa.collaboration.OrganisationsEinheit;
@Mapper @Mapper
interface ForwardVorgangCommandBodyMapper { interface ForwardVorgangCommandBodyMapper {
@Mapping(target = "organisationEinheitId", ignore = true) @Mapping(target = "organisationEinheitId", source = "xzufiId.id")
@Mapping(target = ".", source = "anschrift") @Mapping(target = ".", source = "anschrift")
ForwardVorgangCommandBody updateFromOrganisationEinheit(OrganisationsEinheit organisationsEinheit, @MappingTarget ForwardVorgangCommandBody commandBody); ForwardVorgangCommandBody updateFromOrganisationEinheit(OrganisationsEinheit organisationsEinheit, @MappingTarget ForwardVorgangCommandBody commandBody);
} }
...@@ -49,15 +49,7 @@ class ForwardVorgangCommandBodyMapperTest { ...@@ -49,15 +49,7 @@ class ForwardVorgangCommandBodyMapperTest {
void shouldUpdateFromOrganisationEinheit() { void shouldUpdateFromOrganisationEinheit() {
mapper.updateFromOrganisationEinheit(OrganisationsEinheitTestFactory.create(), body); mapper.updateFromOrganisationEinheit(OrganisationsEinheitTestFactory.create(), body);
assertThat(body).usingRecursiveComparison().ignoringFields("organisationEinheitId") assertThat(body).usingRecursiveComparison().isEqualTo(ForwardVorgangCommandBodyTestFactory.create());
.isEqualTo(ForwardVorgangCommandBodyTestFactory.create());
}
@Test
void shouldPreserveId() {
mapper.updateFromOrganisationEinheit(OrganisationsEinheitTestFactory.create(), body);
assertThat(body.getOrganisationEinheitId()).isEqualTo(ORGANISATIONS_EINHEIT_ID);
} }
} }
} }
...@@ -35,7 +35,7 @@ class ForwardVorgangCommandBodyTestFactory { ...@@ -35,7 +35,7 @@ class ForwardVorgangCommandBodyTestFactory {
static ForwardVorgangCommandBodyBuilder createBuilder() { static ForwardVorgangCommandBodyBuilder createBuilder() {
return ForwardVorgangCommandBody.builder() return ForwardVorgangCommandBody.builder()
.organisationEinheitId(OrganisationsEinheitTestFactory.ID) .organisationEinheitId(OrganisationsEinheitTestFactory.XZUFI_ID.getId())
.name(OrganisationsEinheitTestFactory.NAME) .name(OrganisationsEinheitTestFactory.NAME)
.strasse(AnschriftTestFactory.STRASSE) .strasse(AnschriftTestFactory.STRASSE)
.ort(AnschriftTestFactory.ORT) .ort(AnschriftTestFactory.ORT)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment