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());
static MapPath newMapPath(@NotNull final String string)
Creates a MapPath instance from string representation.
A MapPath that is absolute, that is, it starts with a "/".
void testInvalid2()
Checks that invalid path components are detected.
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.
static AbsoluteMapPath newAbsoluteMapPath(@NotNull final String string)
Creates an AbsoluteMapPath instance from string representation.
void testRelative1()
Checks that relative map paths are correctly assembled.
Regression tests for MapPath.
RelativeMapPath getRelativeMapPathTo(@NotNull final MapPath mapPath)
Returns a map path of an another map path relative to this map path.
String getMapComponent()
Returns the initial path component of a map path.
void testGetMapComponent1()
Checks that MapPath#getMapComponent() works as expected.
void testAbsolute1()
Checks that absolute map paths are correctly assembled.
Utility class for MapPath related functions.
void testGetRelativeMapPathTo1()
Checks that AbsoluteMapPath#getRelativeMapPathTo(MapPath) works as expected.
void testInvalid1()
Checks that invalid path components are detected.
Represents a maps directory local map path.
void testInvalid3()
Checks that invalid path components are detected.