Skip to content

Commit

Permalink
Merge pull request #126 from companieshouse/feature/DSND-2798
Browse files Browse the repository at this point in the history
mapped ceased on field
  • Loading branch information
SALMANCH007 authored Jul 15, 2024
2 parents 72728a8 + a4fd19e commit 1a56cb5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public Individual transformPscDocToIndividual(
individual.setNationality(pscData.getNationality());
individual.setLinks(pscData.getLinks());
individual.setNotifiedOn(pscData.getNotifiedOn());
individual.setCeasedOn(pscData.getCeasedOn());
}
if (pscDocument.getSensitiveData() != null) {
individual.setDateOfBirth(mapDateOfBirth(
Expand Down Expand Up @@ -100,6 +101,7 @@ public IndividualBeneficialOwner transformPscDocToIndividualBeneficialOwner(
individualBo.setNationality(pscData.getNationality());
individualBo.setIsSanctioned(pscData.getSanctioned());
individualBo.setNotifiedOn(pscData.getNotifiedOn());
individualBo.setCeasedOn(pscData.getCeasedOn());
}
if (pscDocument.getSensitiveData() != null) {
individualBo.setDateOfBirth(mapDateOfBirth(
Expand Down Expand Up @@ -161,6 +163,7 @@ public CorporateEntityBeneficialOwner transformPscDocToCorporateEntityBeneficial
corporateEntityBo.setNotifiedOn(pscData.getNotifiedOn());
corporateEntityBo.setPrincipalOfficeAddress(mapPrincipleAddress(
pscData.getPrincipalOfficeAddress()));
corporateEntityBo.setCeasedOn(pscData.getCeasedOn());
}
return corporateEntityBo;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ void testInsertCorporateEntityPscIsTransformedSuccessfully() throws FailedToTran
Assertions.assertNotNull(result.getData().getAddress());
Assertions.assertNotNull(result.getData().getIdentification().getLegalForm());
Assertions.assertNotNull(result.getData().getIdentification().getCountryRegistered());
Assertions.assertNotNull(result.getData().getCeasedOn());

pscInsertAssertions(expectedDocument, result);
}
Expand All @@ -131,6 +132,7 @@ void testInsertLegalPersonPscIsTransformedSuccessfully() throws FailedToTransfor
Assertions.assertNotNull(result.getData().getAddress());
Assertions.assertNotNull(result.getData().getIdentification().getLegalForm());
Assertions.assertNull(result.getData().getIdentification().getCountryRegistered());
Assertions.assertNotNull(result.getData().getCeasedOn());

pscInsertAssertions(expectedDocument, result);
}
Expand Down Expand Up @@ -171,6 +173,7 @@ void testInsertIndividualBeneficialOwnerPscIsTransformedSuccessfully() throws Fa
Assertions.assertNotNull(result.getData().getName());
Assertions.assertNotNull(result.getData().getNationality());
Assertions.assertNotNull(result.getData().getCountryOfResidence());
Assertions.assertNotNull(result.getData().getCeasedOn());

pscInsertAssertions(expectedDocument, result);
}
Expand All @@ -195,6 +198,7 @@ void testInsertIndividualBeneficialOwnerPscIsTransformedSuccessfullyNoPscStateme
Assertions.assertNotNull(result.getData().getNationality());
Assertions.assertNotNull(result.getData().getCountryOfResidence());
Assertions.assertNull(result.getData().getLinks().getStatements());
Assertions.assertNotNull(result.getData().getCeasedOn());

pscInsertAssertions(expectedDocument, result);
}
Expand All @@ -215,6 +219,7 @@ void testInsertCorporateEntityBeneficialOwnerPscIsTransformedSuccessfully() thro
Assertions.assertNotNull(result.getData().getIdentification().getLegalForm());
Assertions.assertNotNull(result.getData().getIdentification().getCountryRegistered());
Assertions.assertNotNull(result.getData().getPrincipalOfficeAddress());
Assertions.assertNotNull(result.getData().getCeasedOn());

pscInsertAssertions(expectedDocument, result);
}
Expand All @@ -234,6 +239,7 @@ void testInsertLegalPersonBeneficialOwnerPscIsTransformedSuccessfully() throws F
Assertions.assertNotNull(result.getData().getIdentification().getLegalForm());
Assertions.assertNull(result.getData().getIdentification().getCountryRegistered());
Assertions.assertNotNull(result.getData().getPrincipalOfficeAddress());
Assertions.assertNotNull(result.getData().getCeasedOn());

pscInsertAssertions(expectedDocument, result);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public static FullRecordCompanyPSCApi buildFullRecordPsc(String kind, boolean sh
output.setInternalData(internalData);

data.setKind(kind);
data.setCeasedOn(LocalDate.of(2012,12,12));
data.setNotifiedOn(LocalDate.of(2000,12,12));
data.setEtag("etag");
data.setName("wholeName");
Expand Down Expand Up @@ -213,6 +214,7 @@ public static PscDocument buildPscDocument(String kind, boolean showFullDateOfBi
output.setUpdatedBy("user");

pscData.setKind(kind);
pscData.setCeasedOn(LocalDate.of(2012,12,12));
pscData.setNotifiedOn(LocalDate.of(2000,12,12));
pscData.setEtag("etag");
pscData.setName("wholeName");
Expand Down

0 comments on commit 1a56cb5

Please sign in to comment.