 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.model.mapmodel;
22 import org.jetbrains.annotations.NotNull;
23 import org.junit.Assert;
24 import org.junit.Test;
75 @Test(expected = IllegalArgumentException.class)
83 @Test(expected = IllegalArgumentException.class)
91 @Test(expected = IllegalArgumentException.class)
137 private static <T extends MapPath> T
check(@NotNull
final String expected, @NotNull
final T mapPath) {
138 Assert.assertEquals(expected, mapPath.toString());
void testInvalid2()
Checks that invalid path components are detected.
A MapPath that is absolute, that is, it starts with a "/".
void testRelative1()
Checks that relative map paths are correctly assembled.
void testInvalid1()
Checks that invalid path components are detected.
static MapPath newMapPath(@NotNull final String string)
Creates a MapPath instance from string representation.
Utility class for MapPath related functions.
static< T extends MapPath > T check(@NotNull final String expected, @NotNull final T mapPath)
Checks that a MapPath's string representation matches the expected value.
String getMapComponent()
Returns the initial path component of a map path.
static AbsoluteMapPath newAbsoluteMapPath(@NotNull final String string)
Creates an AbsoluteMapPath instance from string representation.
void testInvalid3()
Checks that invalid path components are detected.
Represents a maps directory local map path.
void testGetMapComponent1()
Checks that MapPath#getMapComponent() works as expected.
void testAbsolute1()
Checks that absolute map paths are correctly assembled.
RelativeMapPath getRelativeMapPathFrom(@NotNull AbsoluteMapPath mapPath)
Returns this map path relative to another map path.
void testGetRelativeMapPathTo1()
Checks that MapPath#getRelativeMapPathFrom(AbsoluteMapPath) works as expected.
Regression tests for MapPath.