 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.utils;
22 import org.junit.Assert;
23 import org.junit.Test;
36 Assert.assertEquals(
"Expecting trailing slash from directories being removed.",
"/foo",
PathManagerUtils.
path(
"/foo/"));
37 Assert.assertEquals(
"Expecting file: URIs being converted to URIs without scheme.",
"/foo",
PathManagerUtils.
path(
"file:/foo/"));
38 Assert.assertEquals(
"Expecting multiple // characters to be collapsed.",
"/foo/bar",
PathManagerUtils.
path(
"//foo///bar"));
static String absoluteToRelative(@NotNull final String reference, @NotNull final String absolute)
Converts an absolute path to a relative path.
void testIsRelative()
Test case for PathManagerUtils#isRelative(String).
static String path(@NotNull final CharSequence str)
Creates a reasonable path.
void testRelativeToAbsolute()
Test case for String).
void testAbsoluteToRelative()
Test case for String).
Test for PathManagerUtils.
static boolean isAbsolute(@NotNull final String path)
Check whether a path is absolute.
void testIsAbsolute()
Test case for PathManagerUtils#isAbsolute(String).
Utility class for converting relative map paths to absolute map paths and vice versa.
static boolean isRelative(@NotNull final String path)
Check whether a path is relative.
static String relativeToAbsolute(@NotNull final String reference, @NotNull final String relative)
Converts a relative path to an absolute path.
void testPath()
Test case for PathManagerUtils#path(CharSequence).