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
No related branches found
No related tags found
1 merge request!23OZG-7573 Use xzufi-id for weiterleitung
This commit is part of merge request !23. Comments created here will be created in the context of that merge request.
......@@ -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.
Please register or to comment