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

Commit

Permalink
[SELC-4864] feat: Refactor getInstitutionBrokers API to add taxCode i…
Browse files Browse the repository at this point in the history
…n brokerResponse (#486)
  • Loading branch information
flaminiaScarciofolo authored May 10, 2024
1 parent 9614f94 commit e8ced99
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
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 @@ -3807,6 +3807,9 @@
"numberOfDelegations" : {
"type" : "integer",
"format" : "int32"
},
"taxCode" : {
"type" : "string"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
public class BrokerResponse {

private String id;
private String taxCode;
private String description;
private int numberOfDelegations;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1306,6 +1306,7 @@ void getInstitutionBrokers() throws Exception {
final InstitutionType type = InstitutionType.PT;
Institution institution = new Institution();
institution.setId("id");
institution.setTaxCode("taxCode");

// When
when(institutionService.getInstitutionBrokers(any(), any())).thenReturn(List.of(institution));
Expand All @@ -1328,6 +1329,7 @@ void getInstitutionBrokers() throws Exception {
assertNotNull(response);
assertNotNull(response.get(0));
assertEquals(response.get(0).getId(), institution.getId());
assertEquals(response.get(0).getTaxCode(), institution.getTaxCode());
verify(institutionService, times(1))
.getInstitutionBrokers(productId, type);
verifyNoMoreInteractions(institutionService);
Expand Down

0 comments on commit e8ced99

Please sign in to comment.