Gridarta Editor
net.sf.gridarta.model.match.NamedGameObjectMatcherTest Class Reference

Regression tests for NamedGameObjectMatcher. More...

+ Collaboration diagram for net.sf.gridarta.model.match.NamedGameObjectMatcherTest:

Public Member Functions

void testTypeNrsGameObjectMatcher1 ()
 Checks that a NamedGameObjectMatcher works correctly when not using an environment check. More...
 
void testTypeNrsGameObjectMatcher2 ()
 Checks that a NamedGameObjectMatcher works correctly when using an environment check. More...
 

Private Member Functions

FaceObjectProviders newFaceObjectProviders ()
 Creates a new FaceObjectProviders instance. More...
 

Static Private Member Functions

static TestArchetype newArchetype (@NotNull final String archetypeName, final int typeNo, @NotNull final FaceObjectProviders faceObjectProviders, @NotNull final AnimationObjects animationObjects)
 Creates a new TestArchetype instance. More...
 
static TestGameObject newGameObject (@NotNull final GameObjectFactory< TestGameObject, TestMapArchObject, TestArchetype > gameObjectFactory, @NotNull final TestArchetype archetype, @NotNull final String gameObjectName)
 Creates a new TestGameObject instance. More...
 
static GameObject<?, ?, ?> newGameObjects (@NotNull final GameObjectFactory< TestGameObject, TestMapArchObject, TestArchetype > gameObjectFactory, @NotNull final FaceObjectProviders faceObjectProviders, @NotNull final AnimationObjects animationObjects, @NotNull final int... typeNumbers)
 Creates a chain of TestGameObject instances having the given type numbers. More...
 

Private Attributes

final ResourceIcons resourceIcons = new ResourceIcons()
 The ResourceIcons instance. More...
 

Detailed Description

Regression tests for NamedGameObjectMatcher.

Author
Andreas Kirschbaum

Definition at line 45 of file NamedGameObjectMatcherTest.java.

Member Function Documentation

◆ newArchetype()

static TestArchetype net.sf.gridarta.model.match.NamedGameObjectMatcherTest.newArchetype ( @NotNull final String  archetypeName,
final int  typeNo,
@NotNull final FaceObjectProviders  faceObjectProviders,
@NotNull final AnimationObjects  animationObjects 
)
staticprivate

Creates a new TestArchetype instance.

Parameters
archetypeNamethe archetype's name
typeNothe archetype's type number
faceObjectProvidersthe face object providers for looking up faces
animationObjectsthe animation objects for looking up animations
Returns
the new instance

Definition at line 112 of file NamedGameObjectMatcherTest.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 >.TYPE.

Referenced by net.sf.gridarta.model.match.NamedGameObjectMatcherTest.newGameObjects().

+ Here is the caller graph for this function:

◆ newFaceObjectProviders()

FaceObjectProviders net.sf.gridarta.model.match.NamedGameObjectMatcherTest.newFaceObjectProviders ( )
private

Creates a new FaceObjectProviders instance.

Returns
the face object providers instance

Definition at line 165 of file NamedGameObjectMatcherTest.java.

Referenced by net.sf.gridarta.model.match.NamedGameObjectMatcherTest.testTypeNrsGameObjectMatcher1(), and net.sf.gridarta.model.match.NamedGameObjectMatcherTest.testTypeNrsGameObjectMatcher2().

+ Here is the caller graph for this function:

◆ newGameObject()

static TestGameObject net.sf.gridarta.model.match.NamedGameObjectMatcherTest.newGameObject ( @NotNull final GameObjectFactory< TestGameObject, TestMapArchObject, TestArchetype gameObjectFactory,
@NotNull final TestArchetype  archetype,
@NotNull final String  gameObjectName 
)
staticprivate

Creates a new TestGameObject instance.

Parameters
gameObjectFactorythe game object factory to use
archetypethe game object's archetype
gameObjectNamethe game object's name
Returns
the new instance

Definition at line 126 of file NamedGameObjectMatcherTest.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 >.NAME.

Referenced by net.sf.gridarta.model.match.NamedGameObjectMatcherTest.newGameObjects().

+ Here is the caller graph for this function:

◆ newGameObjects()

static GameObject<?, ?, ?> net.sf.gridarta.model.match.NamedGameObjectMatcherTest.newGameObjects ( @NotNull final GameObjectFactory< TestGameObject, TestMapArchObject, TestArchetype gameObjectFactory,
@NotNull final FaceObjectProviders  faceObjectProviders,
@NotNull final AnimationObjects  animationObjects,
@NotNull final int...  typeNumbers 
)
staticprivate

Creates a chain of TestGameObject instances having the given type numbers.

The first type number is used for the game object; following type numbers are used for the parent objects.

Parameters
gameObjectFactorythe game object factory to use
faceObjectProvidersthe face object providers for looking up faces
animationObjectsthe animation objects for looking up animations
typeNumbersthe type numbers
Returns
the child game object

Definition at line 144 of file NamedGameObjectMatcherTest.java.

References net.sf.gridarta.model.match.NamedGameObjectMatcherTest.newArchetype(), and net.sf.gridarta.model.match.NamedGameObjectMatcherTest.newGameObject().

Referenced by net.sf.gridarta.model.match.NamedGameObjectMatcherTest.testTypeNrsGameObjectMatcher1(), and net.sf.gridarta.model.match.NamedGameObjectMatcherTest.testTypeNrsGameObjectMatcher2().

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

◆ testTypeNrsGameObjectMatcher1()

void net.sf.gridarta.model.match.NamedGameObjectMatcherTest.testTypeNrsGameObjectMatcher1 ( )

◆ testTypeNrsGameObjectMatcher2()

void net.sf.gridarta.model.match.NamedGameObjectMatcherTest.testTypeNrsGameObjectMatcher2 ( )

Member Data Documentation

◆ resourceIcons

final ResourceIcons net.sf.gridarta.model.match.NamedGameObjectMatcherTest.resourceIcons = new ResourceIcons()
private

The ResourceIcons instance.

Definition at line 51 of file NamedGameObjectMatcherTest.java.


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