Skip to content

Commit 4a3cfd9

Browse files
committed
Fix method names in TemporaryFolderUsageTest.
1 parent 5b4ced3 commit 4a3cfd9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/test/java/org/junit/rules/TemporaryFolderUsageTest.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public void newFileWithGivenNameThrowsIllegalStateExceptionIfCreateWasNotInvoked
5353
}
5454

5555
@Test
56-
public void newFileWithGivenFilenameThrowsIllegalArgumentExceptionIfFileExists() throws IOException {
56+
public void newFileWithGivenFilenameThrowsIOExceptionIfFileExists() throws IOException {
5757
tempFolder.create();
5858
tempFolder.newFile("MyFile.txt");
5959

@@ -63,7 +63,7 @@ public void newFileWithGivenFilenameThrowsIllegalArgumentExceptionIfFileExists()
6363
}
6464

6565
@Test(expected = IllegalStateException.class)
66-
public void newFolderThrowsIllegalStateExceptionIfCreateWasNotInvoked()
66+
public void newFolderThrowsIOExceptionIfCreateWasNotInvoked()
6767
throws IOException {
6868
new TemporaryFolder().newFolder();
6969
}
@@ -74,7 +74,7 @@ public void newFolderWithGivenPathThrowsIllegalStateExceptionIfCreateWasNotInvok
7474
}
7575

7676
@Test
77-
public void newFolderWithGivenFolderThrowsIllegalArgumentExceptionIfFolderExists() throws IOException {
77+
public void newFolderWithGivenFolderThrowsIOExceptionIfFolderExists() throws IOException {
7878
tempFolder.create();
7979
tempFolder.newFolder("level1");
8080

@@ -84,7 +84,7 @@ public void newFolderWithGivenFolderThrowsIllegalArgumentExceptionIfFolderExists
8484
}
8585

8686
@Test
87-
public void newFolderWithGivenFolderThrowsIllegalArgumentExceptionIfFileExists() throws IOException {
87+
public void newFolderWithGivenFolderThrowsIOExceptionIfFileExists() throws IOException {
8888
tempFolder.create();
8989
File file = new File(tempFolder.getRoot(), "level1");
9090
assertTrue("Could not create" + file, file.createNewFile());
@@ -124,7 +124,7 @@ public void newFolderWithPathContainingForwardSlashCreatesDirectories()
124124
}
125125

126126
@Test
127-
public void newFolderWithGivenPathThrowsIllegalArgumentExceptionIfFolderExists() throws IOException {
127+
public void newFolderWithGivenPathThrowsIOExceptionIfFolderExists() throws IOException {
128128
tempFolder.create();
129129
tempFolder.newFolder("level1", "level2", "level3");
130130

0 commit comments

Comments
 (0)