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);
void save()
Saves the map to a file.
A MapModel reflects the data of a map.
A MapManager manages all opened maps.
PathManager getPathManager()
Returns the PathManager.
Regression tests for DefaultMapManager.
void endTransaction()
End a transaction.
Helper class for creating MapModel instances for regression tests.
Helper class for creating MapControl instances for regression tests.
MapFile getMapFile(@NotNull final AbsoluteMapPath mapPath)
Returns a MapFile instance from an AbsoluteMapPath.
A MapArchObject implementation for testing purposes.
MapModel< G, A, R > getMapModel()
Returns the map model.
TestGameObject insertFloor(@NotNull final MapModel< TestGameObject, TestMapArchObject, TestArchetype > mapModel, @NotNull final Point point)
Inserts a floorArchetype game object into a map model.
void testRevertResizedMap()
A map that has been resized must still be revertable.
void revert(@NotNull MapControl< G, A, R > mapControl)
Reverts one map.
Base package of all Gridarta classes.
An Exception indicating that an Archetype name is not unique.
GameObjects are the objects based on Archetypes found on maps.
static void checkMapContents(@NotNull final MapModel< TestGameObject, TestMapArchObject, TestArchetype > mapModel, @NotNull final String... lines)
Checks for expected MapModel's contents.
TestMapModelHelper newMapModelCreator()
Creates a new TestMapModelHelper instance.
A getMapArchObject()
Returns the Map Arch Object with the meta information about the map.
Currently nothing more than a marker interface for unification.
An Archetype implementation for testing purposes.
A GameObject implementation for testing purposes.
void beginTransaction(@NotNull String name)
Starts a new transaction.
MapManager< TestGameObject, TestMapArchObject, TestArchetype > getMapManager()
Returns the MapManager.
The class Size2D represents a 2d rectangular area.
MapControl< TestGameObject, TestMapArchObject, TestArchetype > newMapControl(@Nullable final MapFile mapFile, @NotNull final String mapName, @NotNull final Size2D mapSize)
Creates a new map control.