Gridarta Editor
net.sf.gridarta.model.mapgrid.MapGridTest Class Reference

Test for MapGrid. More...

+ Collaboration diagram for net.sf.gridarta.model.mapgrid.MapGridTest:

Public Member Functions

void testSelectionBorderUpdates ()
 Test case for selection border updates. More...
 

Static Private Member Functions

static void checkSelectionBorder (final MapGrid mapGrid, final String expectedBorder)
 Checks that the map border selection flags of a MapGrid instance is as expected. More...
 

Detailed Description

Test for MapGrid.

Author
Andreas Kirschbaum

Definition at line 31 of file MapGridTest.java.

Member Function Documentation

◆ checkSelectionBorder()

static void net.sf.gridarta.model.mapgrid.MapGridTest.checkSelectionBorder ( final MapGrid  mapGrid,
final String  expectedBorder 
)
staticprivate

Checks that the map border selection flags of a MapGrid instance is as expected.

The expected border selection is represented as

String

. Each square is represented as one hex digit character; 1=north, 2=east, 4=south, 8=east border is set.

Parameters
mapGridthe map grid
expectedBorderthe expected border selection

Definition at line 86 of file MapGridTest.java.

References net.sf.gridarta.model.mapgrid.MapGrid.getFlags(), net.sf.gridarta.utils.Size2D.getHeight(), net.sf.gridarta.model.mapgrid.MapGrid.getSize(), net.sf.gridarta.utils.Size2D.getWidth(), net.sf.gridarta.model.mapgrid.MapGrid.GRID_FLAG_SELECTION_EAST, net.sf.gridarta.model.mapgrid.MapGrid.GRID_FLAG_SELECTION_NORTH, net.sf.gridarta.model.mapgrid.MapGrid.GRID_FLAG_SELECTION_SOUTH, and net.sf.gridarta.model.mapgrid.MapGrid.GRID_FLAG_SELECTION_WEST.

Referenced by net.sf.gridarta.model.mapgrid.MapGridTest.testSelectionBorderUpdates().

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

◆ testSelectionBorderUpdates()


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