-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathPathUtilsTest.java
More file actions
37 lines (27 loc) · 1.02 KB
/
PathUtilsTest.java
File metadata and controls
37 lines (27 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package org.testcontainers.containers;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.testcontainers.containers.PathUtils.normalizePath;
/**
* Tests for path utils .
*
* @author Vladimir Rogach
*/
class PathUtilsTest {
@Test
void normalizePathTest() {
assertEquals("c:/work/server.lua",
normalizePath("c:/work/server.lua"));
assertEquals("c:/work/server.lua",
normalizePath("/c:/work/server.lua"));
assertEquals("c:/work/server.lua",
normalizePath("/c:\\work\\server.lua"));
assertEquals("c:/work/server.lua",
normalizePath("c:\\work\\server.lua"));
assertEquals("c:/", normalizePath("c:\\"));
assertEquals("/dummy", normalizePath("/dummy"));
assertEquals("/c", normalizePath("/c"));
assertThrows(NullPointerException.class, () -> normalizePath((String) null));
}
}