Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Erdfelt2015-04-24 20:43:34 -0400
committerJoakim Erdfelt2015-04-24 20:43:34 -0400
commitf54be95ea2d34c745db921364d4ee436e879d8b3 (patch)
tree171f6d5ef834986f54ec0ef83297b233bddc3a1a
parente27099620ef0568ca41a6e01e7f77779f5e5ffcc (diff)
downloadorg.eclipse.jetty.toolchain-f54be95ea2d34c745db921364d4ee436e879d8b3.tar.gz
org.eclipse.jetty.toolchain-f54be95ea2d34c745db921364d4ee436e879d8b3.tar.xz
org.eclipse.jetty.toolchain-f54be95ea2d34c745db921364d4ee436e879d8b3.zip
Cleaning up test case build warnings
-rw-r--r--jetty-test-helper/src/test/java/org/eclipse/jetty/toolchain/test/FSTest.java4
-rw-r--r--jetty-test-helper/src/test/java/org/eclipse/jetty/toolchain/test/OSTest.java2
-rw-r--r--jetty-test-helper/src/test/java/org/eclipse/jetty/toolchain/test/TestingDirTest.java10
3 files changed, 9 insertions, 7 deletions
diff --git a/jetty-test-helper/src/test/java/org/eclipse/jetty/toolchain/test/FSTest.java b/jetty-test-helper/src/test/java/org/eclipse/jetty/toolchain/test/FSTest.java
index ec9e66a..04e95ce 100644
--- a/jetty-test-helper/src/test/java/org/eclipse/jetty/toolchain/test/FSTest.java
+++ b/jetty-test-helper/src/test/java/org/eclipse/jetty/toolchain/test/FSTest.java
@@ -22,7 +22,7 @@ public class FSTest
@Test
public void testIsTestingDirInvalid()
{
- assertInvalidTestingDir(MavenTestingUtils.getBasedir());
+ assertInvalidTestingDir(MavenTestingUtils.getBaseDir());
String tmpdir = System.getProperty("java.io.tmpdir");
assertInvalidTestingDir(new File(tmpdir));
@@ -56,7 +56,7 @@ public class FSTest
PathAssert.assertDirExists("pre-delete",testdir);
FS.deleteDirectory(testdir);
- PathAssert.assertNotExists("post-delete",testdir);
+ PathAssert.assertNotPathExists("post-delete",testdir);
}
private void createDummyDirectoryContent(File testdir) throws IOException
diff --git a/jetty-test-helper/src/test/java/org/eclipse/jetty/toolchain/test/OSTest.java b/jetty-test-helper/src/test/java/org/eclipse/jetty/toolchain/test/OSTest.java
index 3104dd1..25ed2b5 100644
--- a/jetty-test-helper/src/test/java/org/eclipse/jetty/toolchain/test/OSTest.java
+++ b/jetty-test-helper/src/test/java/org/eclipse/jetty/toolchain/test/OSTest.java
@@ -1,6 +1,6 @@
package org.eclipse.jetty.toolchain.test;
-import junit.framework.Assert;
+import org.junit.Assert;
import org.junit.Test;
diff --git a/jetty-test-helper/src/test/java/org/eclipse/jetty/toolchain/test/TestingDirTest.java b/jetty-test-helper/src/test/java/org/eclipse/jetty/toolchain/test/TestingDirTest.java
index 552b0b9..b49f424 100644
--- a/jetty-test-helper/src/test/java/org/eclipse/jetty/toolchain/test/TestingDirTest.java
+++ b/jetty-test-helper/src/test/java/org/eclipse/jetty/toolchain/test/TestingDirTest.java
@@ -1,7 +1,9 @@
package org.eclipse.jetty.toolchain.test;
import static org.hamcrest.CoreMatchers.*;
-import java.io.File;
+
+import java.io.IOException;
+import java.nio.file.Path;
import org.junit.Assert;
import org.junit.Rule;
@@ -13,11 +15,11 @@ public class TestingDirTest
public TestingDir testingdir = new TestingDir();
@Test
- public void testGetDir()
+ public void testGetPath() throws IOException
{
String expected = OS.separators("/target/tests/");
- File dir = testingdir.getDir();
- String fullpath = dir.getAbsolutePath();
+ Path dir = testingdir.getPath();
+ String fullpath = dir.toString();
Assert.assertThat(fullpath,containsString(expected));
}

Back to the top