Skip to content

Commit

Permalink
test: fix test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Mxqueen-yr01 committed Jul 1, 2024
1 parent 3ff7824 commit d8a92e1
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public void init() throws IOException {
// retrieveListRessource() tests :

@Test
public void retrieveListRessource_OK() throws YmlPropertyNotFoundException, IOException {
public void retrieveListRessource_OK() throws YmlPropertyNotFoundException {
mediaCentreService.setUrlRessources(urlRessources);
when(mediaCentreResource.retrieveListRessource(urlRessources,userInfos)).thenReturn(listeRessourcesMediaCentre);
List<Ressource> result = mediaCentreService.retrieveListRessource(isMemberOf.getIsMemberOf());
Expand All @@ -136,7 +136,7 @@ public void retrieveListRessource_OK() throws YmlPropertyNotFoundException, IOEx
}

@Test
public void retrieveListRessource_When_No_Resource_OK() throws YmlPropertyNotFoundException, IOException {
public void retrieveListRessource_When_No_Resource_OK() throws YmlPropertyNotFoundException {
when(mediaCentreResource.retrieveListRessource(urlRessources,userInfos)).thenReturn(new ArrayList<>());
List<Ressource> result = mediaCentreService.retrieveListRessource(isMemberOf.getIsMemberOf());

Expand All @@ -145,7 +145,7 @@ public void retrieveListRessource_When_No_Resource_OK() throws YmlPropertyNotFou
}

@Test
public void retrieveListRessource_When_UrlRessources_Is_Missing_In_Yml_Properties_KO() throws YmlPropertyNotFoundException, IOException {
public void retrieveListRessource_When_UrlRessources_Is_Missing_In_Yml_Properties_KO() {
mediaCentreService.setUrlRessources("");
assertThrows(YmlPropertyNotFoundException.class, () -> {
mediaCentreService.retrieveListRessource(isMemberOf.getIsMemberOf());
Expand All @@ -164,7 +164,7 @@ public void retrieveFiltersList_OK() throws IOException, YmlPropertyNotFoundExce
}

@Test
public void retrieveFiltersList_When_No_Yml_Properties_For_Filter_Categories_KO() throws IOException, YmlPropertyNotFoundException {
public void retrieveFiltersList_When_No_Yml_Properties_For_Filter_Categories_KO() {
when(categoriesByFilters.getCategoriesByProfiles()).thenReturn(new ArrayList<>());
assertThrows(YmlPropertyNotFoundException.class, () -> {
mediaCentreService.retrieveFiltersList();
Expand Down

0 comments on commit d8a92e1

Please sign in to comment.