test: corriger constructeurs OrganisationSummaryResponse 10→12 args (ville+pays)
3 fichiers de test utilisaient l'ancien constructeur à 10 arguments. Ajout de null, null pour ville et pays dans tous les appels.
This commit is contained in:
@@ -67,7 +67,7 @@ class OrganisationResourceLambdaFilterTest {
|
|||||||
when(organisationService.convertToSummaryResponse(any(Organisation.class)))
|
when(organisationService.convertToSummaryResponse(any(Organisation.class)))
|
||||||
.thenReturn(new OrganisationSummaryResponse(
|
.thenReturn(new OrganisationSummaryResponse(
|
||||||
orgAvecNomCorrespondant.getId(), "Lions Club Abidjan", "LCA",
|
orgAvecNomCorrespondant.getId(), "Lions Club Abidjan", "LCA",
|
||||||
null, null, null, null, null, null, true));
|
null, null, null, null, null, null, true, null, null));
|
||||||
|
|
||||||
given()
|
given()
|
||||||
.queryParam("recherche", "Lions")
|
.queryParam("recherche", "Lions")
|
||||||
@@ -97,7 +97,7 @@ class OrganisationResourceLambdaFilterTest {
|
|||||||
when(organisationService.convertToSummaryResponse(any(Organisation.class)))
|
when(organisationService.convertToSummaryResponse(any(Organisation.class)))
|
||||||
.thenReturn(new OrganisationSummaryResponse(
|
.thenReturn(new OrganisationSummaryResponse(
|
||||||
orgSansNom.getId(), null, "CLUBS",
|
orgSansNom.getId(), null, "CLUBS",
|
||||||
null, null, null, null, null, null, true));
|
null, null, null, null, null, null, true, null, null));
|
||||||
|
|
||||||
given()
|
given()
|
||||||
.queryParam("recherche", "club")
|
.queryParam("recherche", "club")
|
||||||
@@ -177,7 +177,7 @@ class OrganisationResourceLambdaFilterTest {
|
|||||||
when(organisationService.convertToSummaryResponse(any(Organisation.class)))
|
when(organisationService.convertToSummaryResponse(any(Organisation.class)))
|
||||||
.thenReturn(new OrganisationSummaryResponse(
|
.thenReturn(new OrganisationSummaryResponse(
|
||||||
orgNomCourtMatch.getId(), "Association Nationale", "LC-Abj",
|
orgNomCourtMatch.getId(), "Association Nationale", "LC-Abj",
|
||||||
null, null, null, null, null, null, true));
|
null, null, null, null, null, null, true, null, null));
|
||||||
|
|
||||||
given()
|
given()
|
||||||
.queryParam("recherche", "lc")
|
.queryParam("recherche", "lc")
|
||||||
@@ -209,7 +209,7 @@ class OrganisationResourceLambdaFilterTest {
|
|||||||
.thenReturn(List.of(org1, org2));
|
.thenReturn(List.of(org1, org2));
|
||||||
when(organisationService.convertToSummaryResponse(any(Organisation.class)))
|
when(organisationService.convertToSummaryResponse(any(Organisation.class)))
|
||||||
.thenReturn(new OrganisationSummaryResponse(
|
.thenReturn(new OrganisationSummaryResponse(
|
||||||
UUID.randomUUID(), "Org", null, null, null, null, null, null, null, true));
|
UUID.randomUUID(), "Org", null, null, null, null, null, null, null, true, null, null));
|
||||||
|
|
||||||
// Pas de queryParam "recherche" → isBlank → pas de filtre
|
// Pas de queryParam "recherche" → isBlank → pas de filtre
|
||||||
given()
|
given()
|
||||||
@@ -236,7 +236,7 @@ class OrganisationResourceLambdaFilterTest {
|
|||||||
.thenReturn(List.of(org));
|
.thenReturn(List.of(org));
|
||||||
when(organisationService.convertToSummaryResponse(any(Organisation.class)))
|
when(organisationService.convertToSummaryResponse(any(Organisation.class)))
|
||||||
.thenReturn(new OrganisationSummaryResponse(
|
.thenReturn(new OrganisationSummaryResponse(
|
||||||
org.getId(), "Org Espace Test", null, null, null, null, null, null, null, true));
|
org.getId(), "Org Espace Test", null, null, null, null, null, null, null, true, null, null));
|
||||||
|
|
||||||
given()
|
given()
|
||||||
.queryParam("recherche", " ")
|
.queryParam("recherche", " ")
|
||||||
@@ -268,7 +268,7 @@ class OrganisationResourceLambdaFilterTest {
|
|||||||
.thenReturn(List.of(org1, org2));
|
.thenReturn(List.of(org1, org2));
|
||||||
when(organisationService.convertToSummaryResponse(any(Organisation.class)))
|
when(organisationService.convertToSummaryResponse(any(Organisation.class)))
|
||||||
.thenReturn(new OrganisationSummaryResponse(
|
.thenReturn(new OrganisationSummaryResponse(
|
||||||
UUID.randomUUID(), "Org", null, null, null, null, null, null, null, true));
|
UUID.randomUUID(), "Org", null, null, null, null, null, null, null, true, null, null));
|
||||||
|
|
||||||
given()
|
given()
|
||||||
.queryParam("page", 0)
|
.queryParam("page", 0)
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ class OrganisationResourceMissingBranchesTest {
|
|||||||
when(organisationService.listerOrganisationsPourUtilisateur("orgadmin@test.com"))
|
when(organisationService.listerOrganisationsPourUtilisateur("orgadmin@test.com"))
|
||||||
.thenReturn(List.of(org1, org2, org3));
|
.thenReturn(List.of(org1, org2, org3));
|
||||||
when(organisationService.convertToSummaryResponse(any(Organisation.class)))
|
when(organisationService.convertToSummaryResponse(any(Organisation.class)))
|
||||||
.thenReturn(new OrganisationSummaryResponse(null, null, null, null, null, null, null, null, null, null));
|
.thenReturn(new OrganisationSummaryResponse(null, null, null, null, null, null, null, null, null, null, null, null));
|
||||||
|
|
||||||
// recherche = "test" → filtre les organisations dont nom ou nomCourt contient "test"
|
// recherche = "test" → filtre les organisations dont nom ou nomCourt contient "test"
|
||||||
PagedResponse<OrganisationSummaryResponse> result = organisationResource.listerOrganisations(
|
PagedResponse<OrganisationSummaryResponse> result = organisationResource.listerOrganisations(
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ class OrganisationResourceMockTest {
|
|||||||
when(organisationService.listerOrganisationsActives(anyInt(), anyInt())).thenReturn(List.of());
|
when(organisationService.listerOrganisationsActives(anyInt(), anyInt())).thenReturn(List.of());
|
||||||
when(organisationService.compterOrganisationsActives()).thenReturn(0L);
|
when(organisationService.compterOrganisationsActives()).thenReturn(0L);
|
||||||
when(organisationService.convertToSummaryResponse(any(Organisation.class)))
|
when(organisationService.convertToSummaryResponse(any(Organisation.class)))
|
||||||
.thenReturn(new OrganisationSummaryResponse(null, null, null, null, null, null, null, null, null, null));
|
.thenReturn(new OrganisationSummaryResponse(null, null, null, null, null, null, null, null, null, null, null, null));
|
||||||
|
|
||||||
given()
|
given()
|
||||||
.queryParam("page", 0)
|
.queryParam("page", 0)
|
||||||
@@ -163,7 +163,7 @@ class OrganisationResourceMockTest {
|
|||||||
|
|
||||||
when(organisationService.listerOrganisationsPourUtilisateur(any())).thenReturn(List.of(org));
|
when(organisationService.listerOrganisationsPourUtilisateur(any())).thenReturn(List.of(org));
|
||||||
when(organisationService.convertToSummaryResponse(any(Organisation.class)))
|
when(organisationService.convertToSummaryResponse(any(Organisation.class)))
|
||||||
.thenReturn(new OrganisationSummaryResponse(org.getId(), "Org Admin", null, null, null, null, null, null, null, true));
|
.thenReturn(new OrganisationSummaryResponse(org.getId(), "Org Admin", null, null, null, null, null, null, null, true, null, null));
|
||||||
|
|
||||||
given()
|
given()
|
||||||
.when()
|
.when()
|
||||||
@@ -183,7 +183,7 @@ class OrganisationResourceMockTest {
|
|||||||
|
|
||||||
when(organisationService.listerOrganisationsPourUtilisateur(any())).thenReturn(List.of(org));
|
when(organisationService.listerOrganisationsPourUtilisateur(any())).thenReturn(List.of(org));
|
||||||
when(organisationService.convertToSummaryResponse(any(Organisation.class)))
|
when(organisationService.convertToSummaryResponse(any(Organisation.class)))
|
||||||
.thenReturn(new OrganisationSummaryResponse(org.getId(), "Association Des Lions", null, null, null, null, null, null, null, true));
|
.thenReturn(new OrganisationSummaryResponse(org.getId(), "Association Des Lions", null, null, null, null, null, null, null, true, null, null));
|
||||||
|
|
||||||
given()
|
given()
|
||||||
.queryParam("recherche", "Lions")
|
.queryParam("recherche", "Lions")
|
||||||
|
|||||||
Reference in New Issue
Block a user