Gridarta Editor
net.sf.gridarta.actions.UndoActionsTest Class Reference
+ Collaboration diagram for net.sf.gridarta.actions.UndoActionsTest:

Public Member Functions

void testInsert1 () throws DuplicateArchetypeException, IllegalAutojoinListException
 

Static Private Member Functions

static void checkFace (@NotNull final MapModel< TestGameObject, TestMapArchObject, TestArchetype > mapModel, final int x, final int y, @NotNull final String face)
 

Detailed Description

Regression tests for UndoActions.

Author
Andreas Kirschbaum

Definition at line 47 of file UndoActionsTest.java.

Member Function Documentation

◆ checkFace()

static void net.sf.gridarta.actions.UndoActionsTest.checkFace ( @NotNull final MapModel< TestGameObject, TestMapArchObject, TestArchetype mapModel,
final int  x,
final int  y,
@NotNull final String  face 
)
staticprivate

Checks the face name of the first object in a map square.

Parameters
mapModelthe map model to check
xthe x coordinate of the map square to check
ythe y coordinate of the map square to check
facethe expected face name

Definition at line 113 of file UndoActionsTest.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 >.FACE, net.sf.gridarta.model.mapmodel.MapSquare< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getFirst(), and net.sf.gridarta.model.mapmodel.MapSquare< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapSquare().

Referenced by net.sf.gridarta.actions.UndoActionsTest.testInsert1().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ testInsert1()

void net.sf.gridarta.actions.UndoActionsTest.testInsert1 ( ) throws DuplicateArchetypeException, IllegalAutojoinListException

Checks that undo correctly sets the "face" attribute.

Exceptions
IllegalAutojoinListExceptionif the test fails
DuplicateArchetypeExceptionif the test fails

Definition at line 55 of file UndoActionsTest.java.

References net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.beginTransaction(), net.sf.gridarta.actions.UndoActionsTest.checkFace(), net.sf.gridarta.model.mapmodel.TestMapModelHelper.checkMapContents(), net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.endTransaction(), 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 >.FACE, net.sf.gridarta.model.mapmodel.TestMapModelCreator.getArchetype(), net.sf.gridarta.model.mapmodel.TestMapModelCreator.getGameObjectFactory(), net.sf.gridarta.model.mapmodel.TestMapModelCreator.getGameObjectMatchers(), net.sf.gridarta.model.mapcontrol.TestMapControlCreator.getMapManager(), net.sf.gridarta.model.mapcontrol.MapControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapModel(), net.sf.gridarta.model.mapcontrol.TestMapControlCreator.getMapModelCreator(), net.sf.gridarta.model.mapmodel.TestMapModelCreator.getMapViewSettings(), net.sf.gridarta.model.mapmodel.TestMapModelHelper.insertArchetype(), net.sf.gridarta.model.autojoin.AutojoinListsHelper.newAutojoinLists(), net.sf.gridarta.model.mapcontrol.TestMapControlCreator.newAutojoinListsHelper(), net.sf.gridarta.model.mapmodel.TestMapModelCreator.newTestMapModelHelper(), net.sf.gridarta.model.mapviewsettings.MapViewSettings.setAutojoin(), net.sf.gridarta.model.maparchobject.AbstractMapArchObject< A extends MapArchObject< A >.setMapSize(), and net.sf.gridarta.gui.undo.UndoControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.undo().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: