|
40 | 40 | import de.symeda.sormas.api.externalmessage.processing.ExternalMessageProcessingResult;
|
41 | 41 | import de.symeda.sormas.api.infrastructure.facility.FacilityDto;
|
42 | 42 | import de.symeda.sormas.api.infrastructure.facility.FacilityType;
|
| 43 | +import de.symeda.sormas.api.person.PersonCriteria; |
43 | 44 | import de.symeda.sormas.api.person.PersonDto;
|
44 | 45 | import de.symeda.sormas.api.person.Sex;
|
45 | 46 | import de.symeda.sormas.api.sample.PathogenTestDto;
|
@@ -314,20 +315,23 @@ public void testProcessWithExistingPersonWithSameNationalHealthIdButDifferentDet
|
314 | 315 | public void testProcessWithExistingPersonWithSameNationalHealthIdAndPersonDetailsNormalizedCheck()
|
315 | 316 | throws ExecutionException, InterruptedException {
|
316 | 317 | ExternalMessageDto externalMessage = createExternalMessage(m -> {
|
317 |
| - m.setPersonCity("person city"); |
318 |
| - m.setPersonStreet("PERSON STREET, 12a"); |
| 318 | + m.setPersonFirstName("john vander"); |
| 319 | + m.setPersonLastName("DOÉ"); |
| 320 | + m.setPersonCity(" PERSON city \n"); |
| 321 | + m.setPersonStreet(" person STREET 12A"); |
319 | 322 | });
|
320 | 323 |
|
321 |
| - creator.createPerson("john", "DOÉ", Sex.MALE, p -> { |
| 324 | + creator.createPerson("John Van Der", "Doe", Sex.MALE, p -> { |
322 | 325 | p.setNationalHealthId(externalMessage.getPersonNationalHealthId());
|
323 |
| - p.getAddress().setCity(" PERSON city \n"); |
324 |
| - p.getAddress().setStreet(" person STREET 12A"); |
| 326 | + p.getAddress().setCity("person city"); |
| 327 | + p.getAddress().setStreet("PERSON STREET, 12a"); |
325 | 328 | });
|
326 | 329 |
|
327 | 330 | ProcessingResult<ExternalMessageProcessingResult> result = runFlow(externalMessage);
|
328 | 331 | assertThat(result.getStatus(), is(DONE));
|
329 | 332 | assertThat(externalMessage.getStatus(), is(ExternalMessageStatus.PROCESSED));
|
330 | 333 | assertThat(getExternalMessageFacade().getByUuid(externalMessage.getUuid()).getStatus(), is(ExternalMessageStatus.PROCESSED));
|
| 334 | + assertThat(getPersonFacade().count(new PersonCriteria()), is(1L)); |
331 | 335 | }
|
332 | 336 |
|
333 | 337 | @Test
|
|
0 commit comments