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)))
|
||||
.thenReturn(new OrganisationSummaryResponse(
|
||||
orgAvecNomCorrespondant.getId(), "Lions Club Abidjan", "LCA",
|
||||
null, null, null, null, null, null, true));
|
||||
null, null, null, null, null, null, true, null, null));
|
||||
|
||||
given()
|
||||
.queryParam("recherche", "Lions")
|
||||
@@ -97,7 +97,7 @@ class OrganisationResourceLambdaFilterTest {
|
||||
when(organisationService.convertToSummaryResponse(any(Organisation.class)))
|
||||
.thenReturn(new OrganisationSummaryResponse(
|
||||
orgSansNom.getId(), null, "CLUBS",
|
||||
null, null, null, null, null, null, true));
|
||||
null, null, null, null, null, null, true, null, null));
|
||||
|
||||
given()
|
||||
.queryParam("recherche", "club")
|
||||
@@ -177,7 +177,7 @@ class OrganisationResourceLambdaFilterTest {
|
||||
when(organisationService.convertToSummaryResponse(any(Organisation.class)))
|
||||
.thenReturn(new OrganisationSummaryResponse(
|
||||
orgNomCourtMatch.getId(), "Association Nationale", "LC-Abj",
|
||||
null, null, null, null, null, null, true));
|
||||
null, null, null, null, null, null, true, null, null));
|
||||
|
||||
given()
|
||||
.queryParam("recherche", "lc")
|
||||
@@ -209,7 +209,7 @@ class OrganisationResourceLambdaFilterTest {
|
||||
.thenReturn(List.of(org1, org2));
|
||||
when(organisationService.convertToSummaryResponse(any(Organisation.class)))
|
||||
.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
|
||||
given()
|
||||
@@ -236,7 +236,7 @@ class OrganisationResourceLambdaFilterTest {
|
||||
.thenReturn(List.of(org));
|
||||
when(organisationService.convertToSummaryResponse(any(Organisation.class)))
|
||||
.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()
|
||||
.queryParam("recherche", " ")
|
||||
@@ -268,7 +268,7 @@ class OrganisationResourceLambdaFilterTest {
|
||||
.thenReturn(List.of(org1, org2));
|
||||
when(organisationService.convertToSummaryResponse(any(Organisation.class)))
|
||||
.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()
|
||||
.queryParam("page", 0)
|
||||
|
||||
@@ -123,7 +123,7 @@ class OrganisationResourceMissingBranchesTest {
|
||||
when(organisationService.listerOrganisationsPourUtilisateur("orgadmin@test.com"))
|
||||
.thenReturn(List.of(org1, org2, org3));
|
||||
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"
|
||||
PagedResponse<OrganisationSummaryResponse> result = organisationResource.listerOrganisations(
|
||||
|
||||
@@ -101,7 +101,7 @@ class OrganisationResourceMockTest {
|
||||
when(organisationService.listerOrganisationsActives(anyInt(), anyInt())).thenReturn(List.of());
|
||||
when(organisationService.compterOrganisationsActives()).thenReturn(0L);
|
||||
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()
|
||||
.queryParam("page", 0)
|
||||
@@ -163,7 +163,7 @@ class OrganisationResourceMockTest {
|
||||
|
||||
when(organisationService.listerOrganisationsPourUtilisateur(any())).thenReturn(List.of(org));
|
||||
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()
|
||||
.when()
|
||||
@@ -183,7 +183,7 @@ class OrganisationResourceMockTest {
|
||||
|
||||
when(organisationService.listerOrganisationsPourUtilisateur(any())).thenReturn(List.of(org));
|
||||
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()
|
||||
.queryParam("recherche", "Lions")
|
||||
|
||||
Reference in New Issue
Block a user