Skip to content

Commit

Permalink
added unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
mynecker committed Oct 17, 2024
1 parent cb4716a commit 8b8a77e
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,19 @@ public void testIsScanCompleteIsNotComplete(String scanStatus) {
Assertions.assertFalse(scanService.isScanComplete("scan1"));
}

@Test
@SneakyThrows
public void testIsScanCompleteIsNotCompleteEmptyScanTypeList() {
ScanStatusEntity scanStatusA = scanServiceHelper.buildScanStatusEntity("status1", "COMPLETE");

when(scanTypeRepository.findAllByScanId(any(String.class)))
.thenReturn(List.of());
when(scanStatusRepository.findByScanType(any(ScanTypeEntity.class)))
.thenReturn(scanStatusA);

Assertions.assertFalse(scanService.isScanComplete("scan1"));
}

@Test
@SneakyThrows
public void testIsScanCompleteIsCompleteScans() {
Expand Down

0 comments on commit 8b8a77e

Please sign in to comment.