Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
[SELC-4993] feat: added istatCode in InstitutionResponse (#503)
Browse files Browse the repository at this point in the history
  • Loading branch information
empassaro authored May 31, 2024
1 parent 115831e commit 3b4122b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions app/src/main/resources/swagger/api-docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -3401,6 +3401,9 @@
"type" : "string",
"enum" : [ "AS", "CON", "GSP", "PA", "PG", "PSP", "PT", "REC", "SA", "SCP" ]
},
"istatCode" : {
"type" : "string"
},
"onboarding" : {
"type" : "array",
"items" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class InstitutionResponse {
private String city;
private String county;
private String country;
private String istatCode;
private List<GeoTaxonomies> geographicTaxonomies;
private List<AttributesResponse> attributes;
private List<OnboardedProductResponse> onboarding;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ class InstitutionControllerTest {
institution.setDescription("description");
institution.setOnboarding(List.of(onboarding));
institution.setAttributes(List.of(attribute));
institution.setIstatCode("istatCode");

}

Expand Down Expand Up @@ -285,7 +286,7 @@ void testRetrieveInstitutionById() throws Exception {
.perform(requestBuilder)
.andExpect(MockMvcResultMatchers.status().isOk())
.andExpect(MockMvcResultMatchers.content().contentType("application/json"))
.andExpect(MockMvcResultMatchers.content().string("{\"id\":\"42\",\"description\":\"description\",\"institutionType\":\"PG\",\"attributes\":[{\"origin\":null,\"code\":\"code\",\"description\":\"description\"}],\"onboarding\":[{\"productId\":\"example\",\"status\":\"ACTIVE\",\"billing\":{\"vatNumber\":\"example\",\"taxCodeInvoicing\":\"example\",\"recipientCode\":\"example\",\"publicServices\":false},\"createdAt\":null,\"updatedAt\":null}],\"imported\":false,\"delegation\":false}"));
.andExpect(MockMvcResultMatchers.content().string("{\"id\":\"42\",\"description\":\"description\",\"institutionType\":\"PG\",\"istatCode\":\"istatCode\",\"attributes\":[{\"origin\":null,\"code\":\"code\",\"description\":\"description\"}],\"onboarding\":[{\"productId\":\"example\",\"status\":\"ACTIVE\",\"billing\":{\"vatNumber\":\"example\",\"taxCodeInvoicing\":\"example\",\"recipientCode\":\"example\",\"publicServices\":false},\"createdAt\":null,\"updatedAt\":null}],\"imported\":false,\"delegation\":false}"));
}

@Test
Expand Down

0 comments on commit 3b4122b

Please sign in to comment.