aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/java/jopt-simple/src/test/java/joptsimple/util/PathPropertiesTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/java/jopt-simple/src/test/java/joptsimple/util/PathPropertiesTest.java')
-rw-r--r--third_party/java/jopt-simple/src/test/java/joptsimple/util/PathPropertiesTest.java54
1 files changed, 0 insertions, 54 deletions
diff --git a/third_party/java/jopt-simple/src/test/java/joptsimple/util/PathPropertiesTest.java b/third_party/java/jopt-simple/src/test/java/joptsimple/util/PathPropertiesTest.java
deleted file mode 100644
index 1c6bf59718..0000000000
--- a/third_party/java/jopt-simple/src/test/java/joptsimple/util/PathPropertiesTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package joptsimple.util;
-
-import java.nio.file.Files;
-import java.nio.file.Path;
-
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-import static joptsimple.util.PathProperties.*;
-
-public class PathPropertiesTest {
- @Test
- public void readableFile() throws Exception {
- Path path = Files.createTempFile("prefix", null);
-
- path.toFile().deleteOnExit();
-
- assertTrue( READABLE.accept( path ) );
- assertFalse( DIRECTORY_EXISTING.accept( path ) );
- assertTrue( FILE_EXISTING.accept( path ) );
- assertTrue( FILE_OVERWRITABLE.accept( path ) );
- assertTrue( WRITABLE.accept( path ) );
- assertFalse( NOT_EXISTING.accept( path ) );
- }
-
- @Test
- public void nonExisting() throws Exception {
- Path path = Files.createTempFile( "prefix", null );
-
- Files.deleteIfExists( path );
-
- assertFalse( READABLE.accept( path ) );
- assertFalse( DIRECTORY_EXISTING.accept( path ) );
- assertFalse( FILE_EXISTING.accept( path ) );
- assertFalse( FILE_OVERWRITABLE.accept( path ) );
- assertTrue( NOT_EXISTING.accept( path ) );
- assertFalse( WRITABLE.accept( path ) );
- }
-
- @Test
- public void directory() throws Exception {
- Path path = Files.createTempDirectory( "prefix" );
-
- path.toFile().deleteOnExit();
-
- assertTrue( READABLE.accept( path ) );
- assertTrue( DIRECTORY_EXISTING.accept( path ) );
- assertFalse( FILE_EXISTING.accept( path ) );
- assertFalse( FILE_OVERWRITABLE.accept( path ) );
- assertFalse( NOT_EXISTING.accept( path ) );
- assertTrue( WRITABLE.accept( path ) );
- }
-}