diff --git a/src/test/java/org/junit/rules/TemporaryFolderUsageTest.java b/src/test/java/org/junit/rules/TemporaryFolderUsageTest.java index 0e6b1e5df9d78..e29d4646c21ff 100644 --- a/src/test/java/org/junit/rules/TemporaryFolderUsageTest.java +++ b/src/test/java/org/junit/rules/TemporaryFolderUsageTest.java @@ -53,7 +53,7 @@ public void newFileWithGivenNameThrowsIllegalStateExceptionIfCreateWasNotInvoked } @Test - public void newFileWithGivenFilenameThrowsIllegalArgumentExceptionIfFileExists() throws IOException { + public void newFileWithGivenFilenameThrowsIOExceptionIfFileExists() throws IOException { tempFolder.create(); tempFolder.newFile("MyFile.txt"); @@ -74,7 +74,7 @@ public void newFolderWithGivenPathThrowsIllegalStateExceptionIfCreateWasNotInvok } @Test - public void newFolderWithGivenFolderThrowsIllegalArgumentExceptionIfFolderExists() throws IOException { + public void newFolderWithGivenFolderThrowsIOExceptionIfFolderExists() throws IOException { tempFolder.create(); tempFolder.newFolder("level1"); @@ -84,7 +84,7 @@ public void newFolderWithGivenFolderThrowsIllegalArgumentExceptionIfFolderExists } @Test - public void newFolderWithGivenFolderThrowsIllegalArgumentExceptionIfFileExists() throws IOException { + public void newFolderWithGivenFolderThrowsIOExceptionIfFileExists() throws IOException { tempFolder.create(); File file = new File(tempFolder.getRoot(), "level1"); assertTrue("Could not create" + file, file.createNewFile()); @@ -124,7 +124,7 @@ public void newFolderWithPathContainingForwardSlashCreatesDirectories() } @Test - public void newFolderWithGivenPathThrowsIllegalArgumentExceptionIfFolderExists() throws IOException { + public void newFolderWithGivenPathThrowsIOExceptionIfFolderExists() throws IOException { tempFolder.create(); tempFolder.newFolder("level1", "level2", "level3");