summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/javacs/UrlsTest.java15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/test/java/org/javacs/UrlsTest.java b/src/test/java/org/javacs/UrlsTest.java
index 0e45db3..d94d589 100644
--- a/src/test/java/org/javacs/UrlsTest.java
+++ b/src/test/java/org/javacs/UrlsTest.java
@@ -1,6 +1,5 @@
package org.javacs;
-import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.junit.Assert.assertThat;
@@ -8,29 +7,27 @@ import java.net.URL;
import org.junit.Test;
public class UrlsTest {
-
+
@Test
public void pathToUrl_whenPathStartsWithForwardSlash() throws Exception {
URL actual = Urls.pathToUrl("/a/b/c");
assertThat(actual.getProtocol(), equalTo("file"));
}
-
+
@Test
public void pathToUrl_whenPathStartsWithProtocol() throws Exception {
URL actual = Urls.pathToUrl("file:///a/b/c");
assertThat(actual.getProtocol(), equalTo("file"));
}
-
+
@Test
- public void pathToUrl_whenPathStartsWithDriveLetter_usingForwardSlashes()
- throws Exception {
+ public void pathToUrl_whenPathStartsWithDriveLetter_usingForwardSlashes() throws Exception {
URL actual = Urls.pathToUrl("c:/a/b/c");
assertThat(actual.getProtocol(), equalTo("file"));
}
-
+
@Test
- public void pathToUrl_whenPathStartsWithDriveLetter_usingBackslashes()
- throws Exception {
+ public void pathToUrl_whenPathStartsWithDriveLetter_usingBackslashes() throws Exception {
URL actual = Urls.pathToUrl("c:\\a\\b\\c");
assertThat(actual.getProtocol(), equalTo("file"));
}