Skip to content

Commit

Permalink
Add PathUtilsTest.testSetReadOnlyFileAbsent()
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Jun 6, 2024
1 parent 27b0943 commit a0c1482
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/test/java/org/apache/commons/io/file/PathUtilsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,11 @@ public void testSetReadOnlyFile() throws IOException {
PathUtils.deleteFile(resolved);
}

@Test
public void testSetReadOnlyFileAbsent() {
assertThrows(IOException.class, () -> PathUtils.setReadOnly(Paths.get("does-not-exist-at-all-ever-never"), true));
}

@Test
public void testTouch() throws IOException {
assertThrows(NullPointerException.class, () -> FileUtils.touch(null));
Expand Down

0 comments on commit a0c1482

Please sign in to comment.