Skip to content

Commit

Permalink
Fix method names in TemporaryFolderUsageTest.
Browse files Browse the repository at this point in the history
  • Loading branch information
kcooney committed Jan 7, 2017
1 parent 5b4ced3 commit 4a3cfd9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/test/java/org/junit/rules/TemporaryFolderUsageTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void newFileWithGivenNameThrowsIllegalStateExceptionIfCreateWasNotInvoked
}

@Test
public void newFileWithGivenFilenameThrowsIllegalArgumentExceptionIfFileExists() throws IOException {
public void newFileWithGivenFilenameThrowsIOExceptionIfFileExists() throws IOException {
tempFolder.create();
tempFolder.newFile("MyFile.txt");

Expand All @@ -63,7 +63,7 @@ public void newFileWithGivenFilenameThrowsIllegalArgumentExceptionIfFileExists()
}

@Test(expected = IllegalStateException.class)
public void newFolderThrowsIllegalStateExceptionIfCreateWasNotInvoked()
public void newFolderThrowsIOExceptionIfCreateWasNotInvoked()
throws IOException {
new TemporaryFolder().newFolder();
}
Expand All @@ -74,7 +74,7 @@ public void newFolderWithGivenPathThrowsIllegalStateExceptionIfCreateWasNotInvok
}

@Test
public void newFolderWithGivenFolderThrowsIllegalArgumentExceptionIfFolderExists() throws IOException {
public void newFolderWithGivenFolderThrowsIOExceptionIfFolderExists() throws IOException {
tempFolder.create();
tempFolder.newFolder("level1");

Expand All @@ -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());
Expand Down Expand Up @@ -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");

Expand Down

0 comments on commit 4a3cfd9

Please sign in to comment.