Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Commit

Permalink
Test for negative case.
Browse files Browse the repository at this point in the history
  • Loading branch information
marchof committed Dec 28, 2011
1 parent ca95261 commit 39c8641
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import java.io.File;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.junit.Before;
Expand Down Expand Up @@ -50,6 +51,12 @@ public void testNewFile() throws Exception {
assertEquals(0, file.length());
}

@Test(expected = CoreException.class)
public void testNewFileNegative() throws Exception {
folder.delete();
files.newFile();
}

@Test
public void testDeleteTemporaryFiles() throws Exception {
final File file1 = new File(files.newFile().toOSString());
Expand Down

0 comments on commit 39c8641

Please sign in to comment.