|
Gridarta Editor
|
Helper class for creating MapModel instances for regression tests. More...
Collaboration diagram for net.sf.gridarta.model.mapmodel.TestMapModelHelper:Static Public Member Functions | |
| static void | checkContents (@NotNull final Iterable< TestGameObject > mapSquare, @NotNull final BaseObject<?, ?, ?, ?>... gameObjects) |
| Checks that a MapSquare contains the given game objects. More... | |
| static void | checkMapContents (@NotNull final MapModel< TestGameObject, TestMapArchObject, TestArchetype > mapModel, @NotNull final String... lines) |
| Checks for expected MapModel's contents. More... | |
Static Public Attributes | |
| static final int | EXIT_TYPE = 1 |
| The archetype type used for "exit" game objects. More... | |
Static Private Member Functions | |
| static void | checkContentsString (@NotNull final MapSquare< TestGameObject, TestMapArchObject, TestArchetype > mapSquare, @NotNull final String... gameObjects) |
| Checks that a MapSquare contains the given game objects. More... | |
Private Attributes | |
| final TestArchetype | exitArchetype |
| The archetype to create exit game objects. More... | |
| final TestArchetype | floorArchetype |
| The archetype to create floor game objects. More... | |
| final GameObjectFactory< TestGameObject, TestMapArchObject, TestArchetype > | gameObjectFactory |
| The GameObjectFactory instance. More... | |
| final TestArchetype | mob21Archetype |
| The archetype to create 2x1 mob game objects. More... | |
| final InsertionMode< TestGameObject, TestMapArchObject, TestArchetype > | topmostInsertionMode |
| The "topmost" InsertionMode instance. More... | |
Static Private Attributes | |
| static final String [] | EMPTY_STRING_ARRAY = new String[0] |
| An empty array of strings. More... | |
| static final int | FLOOR_TYPE = 2 |
| The archetype type used for "floor" game objects. More... | |
| static final int | MOB_TYPE = 3 |
| The archetype type used for "mob" game objects. More... | |
Helper class for creating MapModel instances for regression tests.
Definition at line 45 of file TestMapModelHelper.java.
| net.sf.gridarta.model.mapmodel.TestMapModelHelper.TestMapModelHelper | ( | @NotNull final InsertionMode< TestGameObject, TestMapArchObject, TestArchetype > | topmostInsertionMode, |
| @NotNull final GameObjectFactory< TestGameObject, TestMapArchObject, TestArchetype > | gameObjectFactory, | ||
| @NotNull final ArchetypeSet< TestGameObject, TestMapArchObject, TestArchetype > | archetypeSet, | ||
| @NotNull final FaceObjectProviders | faceObjectProviders, | ||
| @NotNull final AnimationObjects | animationObjects | ||
| ) | throws DuplicateArchetypeException |
Creates a new instance.
| topmostInsertionMode | the "topmost" insertion mode instance |
| gameObjectFactory | the game object factory to use |
| archetypeSet | the archetype set to use |
| faceObjectProviders | the face object providers to use |
| animationObjects | the animation objects to use |
| DuplicateArchetypeException | if an internal error occurs |
Definition at line 107 of file TestMapModelHelper.java.
References net.sf.gridarta.model.mapmodel.TestMapModelHelper.gameObjectFactory, net.sf.gridarta.model.archetype.Archetype< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.setMultiX(), net.sf.gridarta.model.mapmodel.TestMapModelHelper.topmostInsertionMode, and net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.TYPE.
Here is the call graph for this function:
|
static |
Checks that a MapSquare contains the given game objects.
| mapSquare | the map square |
| gameObjects | the game object |
Definition at line 277 of file TestMapModelHelper.java.
Referenced by net.sf.gridarta.gui.copybuffer.CopyBufferTest.testCutPaste1(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareBottomMulti(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareBottomSingle(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareDownMulti(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareDownSingle(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareEnvMulti3(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareEnvMulti4(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareEnvSingle1(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareEnvSingle2(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareEnvSingle3(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareInvIntoHead1(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareInvMulti1(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareInvSingle1(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareTopMulti(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareTopSingle(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareUpMulti(), and net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareUpSingle().
Here is the caller graph for this function:
|
staticprivate |
Checks that a MapSquare contains the given game objects.
| mapSquare | the map square |
| gameObjects | the game object |
Definition at line 256 of file TestMapModelHelper.java.
References net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.getMapX(), and net.sf.gridarta.model.baseobject.BaseObject< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, T extends BaseObject< G, A, R, T >.getMapY().
Referenced by net.sf.gridarta.model.mapmodel.TestMapModelHelper.checkMapContents().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Checks for expected MapModel's contents.
| mapModel | the map model |
| lines | the expected contents |
Definition at line 230 of file TestMapModelHelper.java.
References net.sf.gridarta.model.mapmodel.TestMapModelHelper.checkContentsString(), net.sf.gridarta.model.mapmodel.TestMapModelHelper.EMPTY_STRING_ARRAY, net.sf.gridarta.utils.Size2D.getHeight(), net.sf.gridarta.utils.Size2D.getWidth(), and net.sf.gridarta.utils.StringUtils.PATTERN_COMMA.
Referenced by net.sf.gridarta.gui.copybuffer.CopyBufferTest.testCutPaste1(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareInvIntoHead1(), net.sf.gridarta.actions.UndoActionsTest.testInsert1(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testInsert1(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testInsertAlt1(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testInsertAlt2(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testInsertAlt3(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testInsertDuplicate1(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testInsertReplace1(), net.sf.gridarta.action.SelectedSquareActionsTest.testMoveEnvIntoSelectedMapSquare(), net.sf.gridarta.action.SelectedSquareActionsTest.testMoveTailPart(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testRemove1(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testRemoveAlt1(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testRemoveAlt2(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testRemoveAlt3(), and net.sf.gridarta.model.mapmanager.DefaultMapManagerTest.testRevertResizedMap().
Here is the call graph for this function:
Here is the caller graph for this function:| TestGameObject net.sf.gridarta.model.mapmodel.TestMapModelHelper.insertArchetype | ( | @NotNull final MapModel< TestGameObject, TestMapArchObject, TestArchetype > | mapModel, |
| final int | x, | ||
| final int | y, | ||
| @NotNull final BaseObject< TestGameObject, TestMapArchObject, TestArchetype, ?> | archetype, | ||
| final boolean | join | ||
| ) |
Inserts an archetype game object into a map model.
| mapModel | the map model to insert into |
| x | the x coordinate to insert at |
| y | the y coordinate to insert at |
| archetype | the archetype to insert |
| join | whether to perform autojoining |
Definition at line 171 of file TestMapModelHelper.java.
Referenced by net.sf.gridarta.model.mapmodel.TestMapModelHelper.insertExit(), net.sf.gridarta.model.mapmodel.TestMapModelHelper.insertFloor(), net.sf.gridarta.model.mapmodel.TestMapModelHelper.insertMob21(), net.sf.gridarta.model.floodfill.FillUtilsTest.testFillAdjacent(), net.sf.gridarta.actions.UndoActionsTest.testInsert1(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testInsert1(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testInsertAlt1(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testInsertAlt2(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testInsertAlt3(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testInsertDuplicate1(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testInsertReplace1(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testRemove1(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testRemoveAlt1(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testRemoveAlt2(), net.sf.gridarta.model.autojoin.AutojoinListsTest.testRemoveAlt3(), and net.sf.gridarta.model.gameobject.GameObjectFactoryTest.testUpdateFaceInformation().
Here is the caller graph for this function:| TestGameObject net.sf.gridarta.model.mapmodel.TestMapModelHelper.insertArchetype | ( | @NotNull final MapModel< TestGameObject, TestMapArchObject, TestArchetype > | mapModel, |
| @NotNull final Point | point, | ||
| @NotNull final BaseObject< TestGameObject, TestMapArchObject, TestArchetype, ?> | archetype, | ||
| final boolean | join | ||
| ) |
Inserts an archetype game object into a map model.
| mapModel | the map model to insert into |
| point | the position to insert at |
| archetype | the archetype to insert |
| join | whether to perform autojoining |
Definition at line 184 of file TestMapModelHelper.java.
| TestGameObject net.sf.gridarta.model.mapmodel.TestMapModelHelper.insertArchetype | ( | @NotNull final GameObjectContainer< TestGameObject, TestMapArchObject, TestArchetype > | gameObject, |
| @NotNull final BaseObject< TestGameObject, TestMapArchObject, TestArchetype, ?> | archetype | ||
| ) |
Inserts an archetype into a game object.
| gameObject | the game object |
| archetype | the archetype to insert |
Definition at line 219 of file TestMapModelHelper.java.
| TestGameObject net.sf.gridarta.model.mapmodel.TestMapModelHelper.insertExit | ( | @NotNull final MapModel< TestGameObject, TestMapArchObject, TestArchetype > | mapModel, |
| @NotNull final Point | point | ||
| ) |
Inserts an exitArchetype game object into a map model.
| mapModel | the map model to insert into |
| point | the position to insert at |
Definition at line 146 of file TestMapModelHelper.java.
References net.sf.gridarta.model.mapmodel.TestMapModelHelper.insertArchetype().
Referenced by net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareBottomSingle(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareDownSingle(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareEnvMulti3(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareEnvMulti4(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareEnvSingle1(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareEnvSingle2(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareEnvSingle3(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareInvMulti1(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareInvSingle1(), net.sf.gridarta.model.gameobject.GameObjectFactoryTest.testDoMoveSquareTopSingle(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareTopSingle(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareUpSingle(), net.sf.gridarta.actions.ExitConnectorActionsTest.testExitConnect1(), net.sf.gridarta.actions.ExitConnectorActionsTest.testExitPaste1(), net.sf.gridarta.action.SelectedSquareActionsTest.testMoveTailPart(), and net.sf.gridarta.actions.ExitConnectorActionsTest.testPath().
Here is the call graph for this function:
Here is the caller graph for this function:| TestGameObject net.sf.gridarta.model.mapmodel.TestMapModelHelper.insertExit | ( | @NotNull final GameObjectContainer< TestGameObject, TestMapArchObject, TestArchetype > | gameObject | ) |
Inserts an exitArchetype game object into a game object.
| gameObject | the game object |
Definition at line 198 of file TestMapModelHelper.java.
References net.sf.gridarta.model.mapmodel.TestMapModelHelper.insertArchetype().
Here is the call graph for this function:| TestGameObject net.sf.gridarta.model.mapmodel.TestMapModelHelper.insertFloor | ( | @NotNull final MapModel< TestGameObject, TestMapArchObject, TestArchetype > | mapModel, |
| @NotNull final Point | point | ||
| ) |
Inserts a floorArchetype game object into a map model.
| mapModel | the map model to insert into |
| point | the position to insert at |
Definition at line 135 of file TestMapModelHelper.java.
References net.sf.gridarta.model.mapmodel.TestMapModelHelper.insertArchetype().
Referenced by net.sf.gridarta.gui.copybuffer.CopyBufferTest.testCutPaste1(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareBottomMulti(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareBottomSingle(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareDownMulti(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareDownSingle(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareTopMulti(), net.sf.gridarta.model.gameobject.GameObjectFactoryTest.testDoMoveSquareTopSingle(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareTopSingle(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareUpMulti(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareUpSingle(), net.sf.gridarta.actions.ExitConnectorActionsTest.testExitConnect1(), net.sf.gridarta.actions.ExitConnectorActionsTest.testExitPaste1(), and net.sf.gridarta.model.mapmanager.DefaultMapManagerTest.testRevertResizedMap().
Here is the call graph for this function:
Here is the caller graph for this function:| TestGameObject net.sf.gridarta.model.mapmodel.TestMapModelHelper.insertMob21 | ( | @NotNull final MapModel< TestGameObject, TestMapArchObject, TestArchetype > | mapModel, |
| @NotNull final Point | point | ||
| ) |
Inserts a mob21Archetype game object into a map model.
| mapModel | the map model to insert into |
| point | the position to insert at |
Definition at line 157 of file TestMapModelHelper.java.
References net.sf.gridarta.model.mapmodel.TestMapModelHelper.insertArchetype().
Referenced by net.sf.gridarta.gui.copybuffer.CopyBufferTest.testCutPaste1(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareBottomMulti(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareDownMulti(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareEnvMulti3(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareEnvMulti4(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareInvIntoHead1(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareInvMulti1(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareTopMulti(), net.sf.gridarta.action.SelectedSquareActionsTest.testDoMoveSquareUpMulti(), net.sf.gridarta.action.SelectedSquareActionsTest.testMoveEnvIntoSelectedMapSquare(), and net.sf.gridarta.action.SelectedSquareActionsTest.testMoveTailPart().
Here is the call graph for this function:
Here is the caller graph for this function:| TestGameObject net.sf.gridarta.model.mapmodel.TestMapModelHelper.insertMob21 | ( | @NotNull final GameObjectContainer< TestGameObject, TestMapArchObject, TestArchetype > | gameObject | ) |
Inserts a mob21Archetype game object into a game object.
| gameObject | the game object |
Definition at line 208 of file TestMapModelHelper.java.
References net.sf.gridarta.model.mapmodel.TestMapModelHelper.insertArchetype().
Here is the call graph for this function:
|
staticprivate |
An empty array of strings.
Definition at line 66 of file TestMapModelHelper.java.
Referenced by net.sf.gridarta.model.mapmodel.TestMapModelHelper.checkMapContents().
|
static |
The archetype type used for "exit" game objects.
Definition at line 50 of file TestMapModelHelper.java.
Referenced by net.sf.gridarta.actions.ExitConnectorActionsTest.checkExit(), and net.sf.gridarta.model.mapcontrol.TestMapControlCreator.TestMapControlCreator().
|
private |
The archetype to create exit game objects.
Definition at line 90 of file TestMapModelHelper.java.
|
staticprivate |
The archetype type used for "floor" game objects.
Definition at line 55 of file TestMapModelHelper.java.
|
private |
The archetype to create floor game objects.
Definition at line 84 of file TestMapModelHelper.java.
|
private |
The GameObjectFactory instance.
Definition at line 78 of file TestMapModelHelper.java.
Referenced by net.sf.gridarta.model.mapmodel.TestMapModelHelper.TestMapModelHelper().
|
private |
The archetype to create 2x1 mob game objects.
Definition at line 96 of file TestMapModelHelper.java.
|
staticprivate |
The archetype type used for "mob" game objects.
Definition at line 60 of file TestMapModelHelper.java.
|
private |
The "topmost" InsertionMode instance.
Definition at line 72 of file TestMapModelHelper.java.
Referenced by net.sf.gridarta.model.mapmodel.TestMapModelHelper.TestMapModelHelper().