 |
Gridarta Editor
|
Go to the documentation of this file.
20 package net.sf.gridarta.model.mapmanager;
22 import java.awt.Point;
24 import java.io.IOException;
34 import org.junit.Test;
49 final File file = File.createTempFile(
"gridarta",
null);
61 mapModelHelper.
insertFloor(mapModel,
new Point(1, 0));
76 mapModelHelper.
insertFloor(mapModel,
new Point(0, 1));
84 mapManager.
revert(mapControl);
An Archetype implementation for testing purposes.
MapManager< TestGameObject, TestMapArchObject, TestArchetype > getMapManager()
Returns the MapManager.
A MapModel reflects the data of a map.
A getMapArchObject()
Returns the Map Arch Object with the meta information about the map.
A MapManager manages all opened maps.
Base package of all Gridarta classes.
Helper class for creating MapModel instances for regression tests.
void endTransaction()
End a transaction.
A GameObject implementation for testing purposes.
void beginTransaction(@NotNull String name)
Starts a new transaction.
void testRevertResizedMap()
A map that has been resized must still be revertable.
PathManager getPathManager()
Returns the PathManager.
Helper class for creating MapControl instances for regression tests.
GameObjects are the objects based on Archetypes found on maps.
Regression tests for DefaultMapManager.
TestMapModelHelper newMapModelCreator()
Creates a new TestMapModelHelper instance.
MapFile getMapFile(@NotNull final AbsoluteMapPath mapPath)
Returns a MapFile instance from an AbsoluteMapPath.
TestGameObject insertFloor(@NotNull final MapModel< TestGameObject, TestMapArchObject, TestArchetype > mapModel, @NotNull final Point point)
Inserts a floorArchetype game object into a map model.
void save()
Saves the map to a file.
static void checkMapContents(@NotNull final MapModel< TestGameObject, TestMapArchObject, TestArchetype > mapModel, @NotNull final String... lines)
Checks for expected MapModel's contents.
void revert(@NotNull MapControl< G, A, R > mapControl)
Reverts one map.
MapControl< TestGameObject, TestMapArchObject, TestArchetype > newMapControl(@Nullable final MapFile mapFile, @NotNull final String mapName, @NotNull final Size2D mapSize)
Creates a new map control.
An Exception indicating that an Archetype name is not unique.
Currently nothing more than a marker interface for unification.
MapModel< G, A, R > getMapModel()
Returns the map model.
A MapArchObject implementation for testing purposes.
The class Size2D represents a 2d rectangular area.