Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @ParameterizedTest
- @CsvSource({
- "/abc/def, /abc, /",
- "abc/def\\ghi, abc/def, abc",
- "C:\\abc\\def, C:\\abc, C:\\"
- })
- void getParent(String path, String parent, String subParent) {
- FilePath fp = new FilePath(null, path);
- assertEquals(parent, (fp = fp.getParent()).getRemote());
- assertEquals(subParent, (fp = fp.getParent()).getRemote());
- assertNull(fp.getParent());
- }
Advertisement
Add Comment
Please, Sign In to add comment