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

Commit

Permalink
Cleaned ImageTagsControllerTest.java
Browse files Browse the repository at this point in the history
  • Loading branch information
ErminaTrontzou committed Jan 8, 2023
1 parent 8fc2feb commit bed1794
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ public void tearDown(){

@Test
public void getAllImageTagsFromService() throws Exception{
List<ImageTags> mockImageTags = new ArrayList<>();
mockImageTags.add(firstImageTag);
mockImageTags.add(secondImageTag);
mockImageTags.add(thirdImageTag);
mockImageTags.add(fourthImageTag);
List<ImageTags> imageTags = new ArrayList<>();
imageTags.add(firstImageTag);
imageTags.add(secondImageTag);
imageTags.add(thirdImageTag);
imageTags.add(fourthImageTag);

when(imageTagsService.listAllImageTags()).thenReturn(new ResponseEntity(mockImageTags, HttpStatus.OK));
when(imageTagsService.listAllImageTags()).thenReturn(new ResponseEntity(imageTags, HttpStatus.OK));
mockMvc.perform(MockMvcRequestBuilders
.get("http://localhost:8080/api/v1/image_tags")
.contentType(MediaType.APPLICATION_JSON))
Expand Down

0 comments on commit bed1794

Please sign in to comment.