Skip to content

Commit

Permalink
TRIB-210: code coverage storage service test
Browse files Browse the repository at this point in the history
- isFileExistingSadPath
  • Loading branch information
mrsbluerose committed Jan 16, 2024
1 parent 257acad commit 05cfb85
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,17 @@ public void isFileExistingHappyPath() throws IOException {
directory.delete();
}
}

@Test
public void isFileExistingSadPath() throws IOException {
String resourceType = "testResourceType";
String filename = "testFile.txt";
String directoryPath = "/";

when(resourceTypeService.getDirectoryForResourceType(anyString())).thenReturn(directoryPath);

long result = storageService.isFileExisting(resourceType, filename);
assertTrue(result == 0);

}
}

0 comments on commit 05cfb85

Please sign in to comment.