Skip to content

Commit 33fb15b

Browse files
Tomboyogeorgewfraser
authored andcommitted
Remove unecessary OS-dependent tests.
1 parent 859d0fc commit 33fb15b

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

‎src/test/java/org/javacs/UrlsTest.java‎

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
import static org.hamcrest.CoreMatchers.containsString;
44
import static org.hamcrest.CoreMatchers.equalTo;
5-
import static org.junit.Assert.assertEquals;
6-
import static org.junit.Assert.assertTrue;
7-
import static org.junit.Assert.assertFalse;
85
import static org.junit.Assert.assertThat;
96

107
import java.net.URL;
@@ -16,29 +13,25 @@ public class UrlsTest {
1613
public void pathToUrl_whenPathStartsWithForwardSlash() throws Exception {
1714
URL actual = Urls.pathToUrl("/a/b/c");
1815
assertThat(actual.getProtocol(), equalTo("file"));
19-
assertThat(actual.getPath(), containsString("/a/b/c"));
2016
}
2117

2218
@Test
2319
public void pathToUrl_whenPathStartsWithProtocol() throws Exception {
2420
URL actual = Urls.pathToUrl("file:///a/b/c");
25-
assertThat("file", equalTo(actual.getProtocol()));
26-
assertThat(actual.getPath(), containsString("/a/b/c"));
21+
assertThat(actual.getProtocol(), equalTo("file"));
2722
}
2823

2924
@Test
3025
public void pathToUrl_whenPathStartsWithDriveLetter_usingForwardSlashes()
31-
throws Exception {
26+
throws Exception {
3227
URL actual = Urls.pathToUrl("c:/a/b/c");
3328
assertThat(actual.getProtocol(), equalTo("file"));
34-
assertThat(actual.getPath(), containsString("/a/b/c"));
3529
}
3630

3731
@Test
3832
public void pathToUrl_whenPathStartsWithDriveLetter_usingBackslashes()
39-
throws Exception {
33+
throws Exception {
4034
URL actual = Urls.pathToUrl("c:\\a\\b\\c");
4135
assertThat(actual.getProtocol(), equalTo("file"));
42-
assertThat(actual.getPath(), containsString("/a/b/c"));
4336
}
4437
}

0 commit comments

Comments
 (0)