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

Merge branch 'OZG-7573-use-xzufi-id-for-weiterleitung' into 'main'

OZG-7573 Use xzufi-id for weiterleitung

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