diff --git a/_infra/helm/collection-exercise/Chart.yaml b/_infra/helm/collection-exercise/Chart.yaml index 563a44ba9..8d8cded02 100644 --- a/_infra/helm/collection-exercise/Chart.yaml +++ b/_infra/helm/collection-exercise/Chart.yaml @@ -14,9 +14,9 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. -version: 13.0.32 +version: 13.0.33 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. -appVersion: 13.0.32 +appVersion: 13.0.33 diff --git a/src/main/java/uk/gov/ons/ctp/response/collection/exercise/lib/party/representation/PartyDTO.java b/src/main/java/uk/gov/ons/ctp/response/collection/exercise/lib/party/representation/PartyDTO.java deleted file mode 100644 index 4a3807f0d..000000000 --- a/src/main/java/uk/gov/ons/ctp/response/collection/exercise/lib/party/representation/PartyDTO.java +++ /dev/null @@ -1,23 +0,0 @@ -package uk.gov.ons.ctp.response.collection.exercise.lib.party.representation; - -import com.fasterxml.jackson.annotation.JsonIgnore; -import java.util.List; -import lombok.AccessLevel; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -@Data -@AllArgsConstructor -@NoArgsConstructor(access = AccessLevel.PUBLIC) -public class PartyDTO { - private String id; - private String sampleUnitType; - private String sampleSummaryId; - private String sampleUnitRef; - private String name; - private Attributes attributes; - private List associations; - - @JsonIgnore private String status; // required to cope with a BI response from PartySvc -} diff --git a/src/test/java/uk/gov/ons/ctp/response/collection/exercise/endpoint/CollectionExerciseEndpointIT.java b/src/test/java/uk/gov/ons/ctp/response/collection/exercise/endpoint/CollectionExerciseEndpointIT.java index 998526e41..96d5e7cca 100644 --- a/src/test/java/uk/gov/ons/ctp/response/collection/exercise/endpoint/CollectionExerciseEndpointIT.java +++ b/src/test/java/uk/gov/ons/ctp/response/collection/exercise/endpoint/CollectionExerciseEndpointIT.java @@ -180,7 +180,6 @@ public void shouldTransitionCollectionExerciseToReadyToReviewOnSampleSummaryLink // Given stubSurveyServiceBusiness(); stubCollectionInstrumentCount(); - stubGetPartyBySampleUnitRef(); SampleSummaryDTO sampleSummary = stubSampleSummary(); UUID collectionExerciseId = createScheduledCollectionExercise(); @@ -199,7 +198,6 @@ public void shouldTransitionWhenToldSampleIsReady() throws Exception { // Given stubSurveyServiceBusiness(); stubCollectionInstrumentCount(); - stubGetPartyBySampleUnitRef(); SampleSummaryDTO sampleSummary = stubSampleSummary(); UUID collectionExerciseId = createScheduledCollectionExercise(); this.client.linkSampleSummary(collectionExerciseId, sampleSummary.getId()); @@ -218,7 +216,6 @@ public void shouldNotTransitionWhenSampleIsNotReady() throws Exception { // Given stubSurveyServiceBusiness(); stubCollectionInstrumentCount(); - stubGetPartyBySampleUnitRef(); SampleSummaryDTO sampleSummary = stubInitSampleSummary(); UUID collectionExerciseId = createScheduledCollectionExercise(); this.client.linkSampleSummary(collectionExerciseId, sampleSummary.getId()); @@ -332,46 +329,6 @@ private void stubCollectionInstrumentCount() throws IOException { .willReturn(aResponse().withBody("1"))); } - private void stubGetPartyBySampleUnitRef() throws IOException { - String json = - loadResourceAsString( - CollectionExerciseEndpointIT.class, - "CollectionExerciseEndpointIT.PartyDTO.with-associations.json"); - this.wireMockRule.stubFor( - get(urlPathMatching("/party-api/v1/businesses/ref/(.*)")) - .willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(json))); - } - - private void stubGetPartyNoAssociations() throws IOException { - String json = - loadResourceAsString( - CollectionExerciseEndpointIT.class, - "CollectionExerciseEndpointIT.PartyDTO.no-associations.json"); - this.wireMockRule.stubFor( - get(urlPathMatching("/party-api/v1/businesses/ref/(.*)")) - .willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(json))); - } - - private void stubGetPartyWithAssociations() throws IOException { - String json = - loadResourceAsString( - CollectionExerciseEndpointIT.class, - "CollectionExerciseEndpointIT.Supplementary.with-associations.json"); - this.wireMockRule.stubFor( - get(urlPathMatching("/party-api/v1/businesses/ref/(.*)")) - .willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(json))); - } - - private void stubGetSupplementaryDataServvice() throws IOException { - String json = - loadResourceAsString( - CollectionExerciseEndpointIT.class, - "CollectionExerciseEndpointIT.SupplementaryDatasetDTO.with-associations.json"); - this.wireMockRule.stubFor( - get(urlPathMatching("/party-api/v1/businesses/ref/(.*)")) - .willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(json))); - } - private void createSurveyServiceClassifierStubs() throws IOException { String json = loadResourceAsString( diff --git a/src/test/resources/uk/gov/ons/ctp/response/collection/exercise/distribution/SampleUnitDistributorTest.PartyDTO.json b/src/test/resources/uk/gov/ons/ctp/response/collection/exercise/distribution/SampleUnitDistributorTest.PartyDTO.json deleted file mode 100644 index 1e8321206..000000000 --- a/src/test/resources/uk/gov/ons/ctp/response/collection/exercise/distribution/SampleUnitDistributorTest.PartyDTO.json +++ /dev/null @@ -1,69 +0,0 @@ -[ - { - "associations": [ - { - "enrolments": [ - { - "enrolmentStatus": "PENDING", - "name": "Business Register and Employment Survey", - "surveyId": "cb0711c3-0ac8-41d3-ae0e-567e5ea1ef87" - } - ], - "partyId": "4eed610a-39f7-437b-a37d-9de1f905cb39" - }, - { - "enrolments": [ - { - "enrolmentStatus": "ENABLED", - "name": "Business Register and Employment Survey", - "surveyId": "cb0711c3-0ac8-41d3-ae0e-567e5ea1ef87" - } - ], - "partyId": "e85f3aa9-1559-4406-956a-074d478cbcae" - }, - { - "enrolments": [ - { - "enrolmentStatus": "ENABLED", - "name": "Something Different Survey", - "surveyId": "cb0812d4-9df4-53r2-dr0y-568h5ea1xy99" - } - ], - "partyId": "8ed4caa4-4df5-42e2-93d1-7cd79a32786d" - } - ], - "attributes": { - "birthdate": "01/09/1993", - "cellNo": 1, - "checkletter": "A", - "currency": "H", - "entname1": "ENTNAME1", - "entname2": "ENTNAME2", - "entname3": "ENTNAME3", - "entref": "1234567890", - "entrepmkr": "C", - "formtype": "0001", - "froempment": 50, - "frosic2007": "11111", - "frosic92": "11111", - "frotover": 50, - "inclexcl": "G", - "legalstatus": "B", - "name": "Bolts and Ratchets Ltd", - "region": "DE", - "runame1": "Bolts", - "runame2": "and", - "runame3": "Ratchets Ltd", - "ruref": "49900000000", - "rusic2007": "11111", - "rusic92": "11111", - "seltype": "F", - "tradstyle1": "TRADSTYLE1", - "tradstyle2": "TRADSTYLE2", - "tradstyle3": "TRADSTYLE3" - }, - "id": "45297c23-763d-46a9-b4e5-c37ff5b4fbe8", - "sampleUnitRef": "49900000000", - "sampleUnitType": "B" - } -] \ No newline at end of file diff --git a/src/test/resources/uk/gov/ons/ctp/response/collection/exercise/endpoint/CollectionExerciseEndpointIT.PartyDTO.no-associations.json b/src/test/resources/uk/gov/ons/ctp/response/collection/exercise/endpoint/CollectionExerciseEndpointIT.PartyDTO.no-associations.json deleted file mode 100644 index 5cadcb22a..000000000 --- a/src/test/resources/uk/gov/ons/ctp/response/collection/exercise/endpoint/CollectionExerciseEndpointIT.PartyDTO.no-associations.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "associations": [], - "attributes": { - "birthdate": "01/09/1993", - "cellNo": 1, - "checkletter": "A", - "currency": "H", - "entname1": "ENTNAME1", - "entname2": "ENTNAME2", - "entname3": "ENTNAME3", - "entref": "1234567890", - "entrepmkr": "C", - "formtype": "0001", - "froempment": 50, - "frosic2007": "11111", - "frosic92": "11111", - "frotover": 50, - "inclexcl": "G", - "legalstatus": "B", - "name": "Bolts and Ratchets Ltd", - "region": "DE", - "runame1": "Bolts", - "runame2": "and", - "runame3": "Ratchets Ltd", - "ruref": "49900000000", - "rusic2007": "11111", - "rusic92": "11111", - "seltype": "F", - "tradstyle1": "TRADSTYLE1", - "tradstyle2": "TRADSTYLE2", - "tradstyle3": "TRADSTYLE3" - }, - "id": "45297c23-763d-46a9-b4e5-c37ff5b4fbe8", - "sampleUnitRef": "49900000000", - "sampleUnitType": "B" -} diff --git a/src/test/resources/uk/gov/ons/ctp/response/collection/exercise/endpoint/CollectionExerciseEndpointIT.PartyDTO.with-associations.json b/src/test/resources/uk/gov/ons/ctp/response/collection/exercise/endpoint/CollectionExerciseEndpointIT.PartyDTO.with-associations.json deleted file mode 100644 index a1b6099c1..000000000 --- a/src/test/resources/uk/gov/ons/ctp/response/collection/exercise/endpoint/CollectionExerciseEndpointIT.PartyDTO.with-associations.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "associations": [ - { - "enrolments": [ - { - "enrolmentStatus": "PENDING", - "name": "Test Survey", - "surveyId": "c23bb1c1-5202-43bb-8357-7a07c844308f" - } - ], - "partyId": "4eed610a-39f7-437b-a37d-9de1f905cb39" - }, - { - "enrolments": [ - { - "enrolmentStatus": "ENABLED", - "name": "Test Survey", - "surveyId": "c23bb1c1-5202-43bb-8357-7a07c844308f" - } - ], - "partyId": "4625df99-7c20-4610-a18c-2f93daffce2a" - } - ], - "attributes": { - "birthdate": "01/09/1993", - "cellNo": 1, - "checkletter": "A", - "currency": "H", - "entname1": "ENTNAME1", - "entname2": "ENTNAME2", - "entname3": "ENTNAME3", - "entref": "1234567890", - "entrepmkr": "C", - "formtype": "0001", - "froempment": 50, - "frosic2007": "11111", - "frosic92": "11111", - "frotover": 50, - "inclexcl": "G", - "legalstatus": "B", - "name": "Bolts and Ratchets Ltd", - "region": "DE", - "runame1": "Bolts", - "runame2": "and", - "runame3": "Ratchets Ltd", - "ruref": "49900000000", - "rusic2007": "11111", - "rusic92": "11111", - "seltype": "F", - "tradstyle1": "TRADSTYLE1", - "tradstyle2": "TRADSTYLE2", - "tradstyle3": "TRADSTYLE3" - }, - "id": "45297c23-763d-46a9-b4e5-c37ff5b4fbe8", - "sampleUnitRef": "49900000000", - "sampleUnitType": "B" -} diff --git a/src/test/resources/uk/gov/ons/ctp/response/collection/exercise/service/ValidateSampleUnitsTest.PartyDTO.json b/src/test/resources/uk/gov/ons/ctp/response/collection/exercise/service/ValidateSampleUnitsTest.PartyDTO.json deleted file mode 100644 index 890ebbef1..000000000 --- a/src/test/resources/uk/gov/ons/ctp/response/collection/exercise/service/ValidateSampleUnitsTest.PartyDTO.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "associations": [ - { - "enrolments": [ - { - "enrolmentStatus": "PENDING", - "name": "Business Register and Employment Survey", - "surveyId": "cb0711c3-0ac8-41d3-ae0e-567e5ea1ef87" - } - ], - "partyId": "4eed610a-39f7-437b-a37d-9de1f905cb39" - }, - { - "enrolments": [ - { - "enrolmentStatus": "ENABLED", - "name": "Business Register and Employment Survey", - "surveyId": "cb0711c3-0ac8-41d3-ae0e-567e5ea1ef87" - } - ], - "partyId": "4625df99-7c20-4610-a18c-2f93daffce2a" - }, - { - "enrolments": [ - { - "enrolmentStatus": "ENABLED", - "name": "Something Different Survey", - "surveyId": "cb0812d4-9df4-53r2-dr0y-568h5ea1xy99" - } - ], - "partyId": "8ed4caa4-4df5-42e2-93d1-7cd79a32786d" - } - ], - "attributes": { - "birthdate": "01/09/1993", - "cellNo": 1, - "checkletter": "A", - "currency": "H", - "entname1": "ENTNAME1", - "entname2": "ENTNAME2", - "entname3": "ENTNAME3", - "entref": "1234567890", - "entrepmkr": "C", - "formtype": "0001", - "froempment": 50, - "frosic2007": "11111", - "frosic92": "11111", - "frotover": 50, - "inclexcl": "G", - "legalstatus": "B", - "name": "Bolts and Ratchets Ltd", - "region": "DE", - "runame1": "Bolts", - "runame2": "and", - "runame3": "Ratchets Ltd", - "ruref": "49900000000", - "rusic2007": "11111", - "rusic92": "11111", - "seltype": "F", - "tradstyle1": "TRADSTYLE1", - "tradstyle2": "TRADSTYLE2", - "tradstyle3": "TRADSTYLE3" - }, - "id": "45297c23-763d-46a9-b4e5-c37ff5b4fbe8", - "sampleUnitRef": "49900000000", - "sampleUnitType": "B" -}