Gridarta Editor
net.sf.gridarta.model.mapmodel.AutoInsertionModeTest Class Reference

Regression tests for AutoInsertionMode. More...

+ Collaboration diagram for net.sf.gridarta.model.mapmodel.AutoInsertionModeTest:

Public Member Functions

void setUp () throws DuplicateArchetypeException
 Initializes the tests. More...
 
void testInsertSystemObject1 () throws DuplicateArchetypeException
 Checks that the auto-insertion mode works as expected. More...
 
void testInsertSystemObject2 ()
 Checks that the auto-insertion mode works as expected. More...
 

Private Attributes

final InsertionMode< TestGameObject, TestMapArchObject, TestArchetypeautoInsertionMode = new AutoInsertionMode<>(floorGameObjectMatcher, wallGameObjectMatcher, belowFloorGameObjectMatcher, systemGameObjectMatcher)
 The auto-insertion mode. More...
 
final GameObjectMatcher belowFloorGameObjectMatcher = new TypeNrsGameObjectMatcher(TYPE_BELOW_FLOOR)
 A GameObjectMatcher that matches objects to be put below the floor. More...
 
final GameObjectMatcher floorGameObjectMatcher = new TypeNrsGameObjectMatcher(TYPE_FLOOR)
 A GameObjectMatcher that matches floor objects. More...
 
TestMapModelCreator mapModelCreator
 The TestMapModelCreator instance. More...
 
final GameObjectMatcher systemGameObjectMatcher = new TypeNrsGameObjectMatcher(TYPE_SYSTEM)
 A GameObjectMatcher that matches system objects. More...
 
final InsertionMode< TestGameObject, TestMapArchObject, TestArchetypetopmostInsertionMode = new TopmostInsertionMode<>()
 The topmost-insertion mode. More...
 
final GameObjectMatcher wallGameObjectMatcher = new TypeNrsGameObjectMatcher(TYPE_WALL)
 A GameObjectMatcher that matches wall objects. More...
 

Static Private Attributes

static final int TYPE_BELOW_FLOOR = 3
 The archetype type for objects to be put below the floor. More...
 
static final int TYPE_FLOOR = 1
 The archetype type for floor objects. More...
 
static final int TYPE_SYSTEM = 4
 The archetype type for system objects. More...
 
static final int TYPE_WALL = 2
 The archetype type for wall objects. More...
 

Detailed Description

Regression tests for AutoInsertionMode.

Author
Andreas Kirschbaum

Definition at line 40 of file AutoInsertionModeTest.java.

Member Function Documentation

◆ setUp()

void net.sf.gridarta.model.mapmodel.AutoInsertionModeTest.setUp ( ) throws DuplicateArchetypeException

◆ testInsertSystemObject1()

◆ testInsertSystemObject2()

Member Data Documentation

◆ autoInsertionMode

The auto-insertion mode.

Definition at line 91 of file AutoInsertionModeTest.java.

◆ belowFloorGameObjectMatcher

final GameObjectMatcher net.sf.gridarta.model.mapmodel.AutoInsertionModeTest.belowFloorGameObjectMatcher = new TypeNrsGameObjectMatcher(TYPE_BELOW_FLOOR)
private

A GameObjectMatcher that matches objects to be put below the floor.

Definition at line 79 of file AutoInsertionModeTest.java.

◆ floorGameObjectMatcher

final GameObjectMatcher net.sf.gridarta.model.mapmodel.AutoInsertionModeTest.floorGameObjectMatcher = new TypeNrsGameObjectMatcher(TYPE_FLOOR)
private

A GameObjectMatcher that matches floor objects.

Definition at line 66 of file AutoInsertionModeTest.java.

◆ mapModelCreator

TestMapModelCreator net.sf.gridarta.model.mapmodel.AutoInsertionModeTest.mapModelCreator
private

The TestMapModelCreator instance.

Definition at line 102 of file AutoInsertionModeTest.java.

◆ systemGameObjectMatcher

final GameObjectMatcher net.sf.gridarta.model.mapmodel.AutoInsertionModeTest.systemGameObjectMatcher = new TypeNrsGameObjectMatcher(TYPE_SYSTEM)
private

A GameObjectMatcher that matches system objects.

Definition at line 85 of file AutoInsertionModeTest.java.

◆ topmostInsertionMode

final InsertionMode<TestGameObject, TestMapArchObject, TestArchetype> net.sf.gridarta.model.mapmodel.AutoInsertionModeTest.topmostInsertionMode = new TopmostInsertionMode<>()
private

The topmost-insertion mode.

Definition at line 97 of file AutoInsertionModeTest.java.

◆ TYPE_BELOW_FLOOR

final int net.sf.gridarta.model.mapmodel.AutoInsertionModeTest.TYPE_BELOW_FLOOR = 3
staticprivate

The archetype type for objects to be put below the floor.

Definition at line 55 of file AutoInsertionModeTest.java.

◆ TYPE_FLOOR

final int net.sf.gridarta.model.mapmodel.AutoInsertionModeTest.TYPE_FLOOR = 1
staticprivate

The archetype type for floor objects.

Definition at line 45 of file AutoInsertionModeTest.java.

◆ TYPE_SYSTEM

final int net.sf.gridarta.model.mapmodel.AutoInsertionModeTest.TYPE_SYSTEM = 4
staticprivate

The archetype type for system objects.

Definition at line 60 of file AutoInsertionModeTest.java.

◆ TYPE_WALL

final int net.sf.gridarta.model.mapmodel.AutoInsertionModeTest.TYPE_WALL = 2
staticprivate

The archetype type for wall objects.

Definition at line 50 of file AutoInsertionModeTest.java.

◆ wallGameObjectMatcher

final GameObjectMatcher net.sf.gridarta.model.mapmodel.AutoInsertionModeTest.wallGameObjectMatcher = new TypeNrsGameObjectMatcher(TYPE_WALL)
private

A GameObjectMatcher that matches wall objects.

Definition at line 72 of file AutoInsertionModeTest.java.


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