Skip to content

Commit

Permalink
MARP-760 Update UT
Browse files Browse the repository at this point in the history
  • Loading branch information
tvtphuc-axonivy committed Aug 30, 2024
1 parent 8012552 commit 2d08f4e
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -470,4 +470,13 @@ void testGetProductJsonContentByIdAndVersion() throws JsonProcessingException {

Assertions.assertEquals("Amazon Comprehend", result.get("name"));
}

@Test
void testGetProductJsonContentByIdAndVersion_noResult() {
Mockito.when(productJsonContentRepository.findByProductIdAndVersion(anyString(), anyString())).thenReturn(null);

Map<String, Object> result = versionService.getProductJsonContentByIdAndVersion("amazon-comprehend", "11.3.1");

Assertions.assertEquals(new HashMap<>(), result);
}
}

0 comments on commit 2d08f4e

Please sign in to comment.