Gridarta Editor
net.sf.gridarta.model.baseobject.AbstractBaseObjectTest Class Reference

Regression tests for AbstractBaseObject. More...

+ Collaboration diagram for net.sf.gridarta.model.baseobject.AbstractBaseObjectTest:

Public Member Functions

void testDirection1 ()
 Checks that caching the "direction" attribute does work. More...
 
void testDirection2 ()
 Checks that caching the "direction" attribute does work. More...
 
void testDirection3 ()
 Checks that caching the "direction" attribute does work. More...
 
void testName1 ()
 Checks that caching the "name" attribute does work. More...
 
void testName2 ()
 Checks that caching the "name" attribute does work. More...
 
void testName3 ()
 Checks that caching the "name" attribute does work. More...
 
void testSetAttributeInt1 ()
 Checks that AbstractBaseObject#setAttributeInt(String, int) works as expected. More...
 
void testSetAttributeString ()
 Checks that GameObject#setAttributeString(String, String) does work. More...
 
void testSetFaceName1 ()
 Checks that setting the face name does work. More...
 
void testSetFaceName2 ()
 Checks that a custom face may be changed. More...
 
void testSetObjectTextAttributeOrdering ()
 Checks that BaseObject#setObjectText(String) ignores attribute ordering. More...
 
void testToString1 ()
 Checks that AbstractBaseObject#toString(String) works as expected. More...
 
void testType1 ()
 Checks that caching the "type" attribute does work. More...
 
void testType2 ()
 Checks that caching the "type" attribute does work. More...
 
void testType3 ()
 Checks that caching the "type" attribute does work. More...
 

Private Member Functions

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

Static Private Member Functions

static void checkDirection (@NotNull final BaseObject<?, ?, ?, ?> gameObject, final int direction)
 Checks that the "direction" attribute of a GameObject contains the expected value. More...
 
static void checkName (@NotNull final BaseObject<?, ?, ?, ?> gameObject, @NotNull final String name, @NotNull final String nameAttribute)
 Checks that the BaseObject#NAME attribute of an GameObject contains the expected value. More...
 
static void checkType (@NotNull final BaseObject<?, ?, ?, ?> gameObject, final int type)
 Checks that the BaseObject#TYPE attribute of a GameObject contains the expected value. More...
 
static TestArchetype newArchetype (@NotNull final String archetypeName, @Nullable final String objectText, @NotNull final FaceObjectProviders faceObjectProviders, @NotNull final AnimationObjects animationObjects)
 Creates a new TestArchetype instance. More...
 
static GameObject< TestGameObject, TestMapArchObject, TestArchetypenewGameObject (@NotNull final TestArchetype archetype, @NotNull final String name, @NotNull final FaceObjectProviders faceObjectProviders, @NotNull final AnimationObjects animationObjects)
 Creates a new game object instance. More...
 

Private Attributes

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

Detailed Description

Regression tests for AbstractBaseObject.

Author
Andreas Kirschbaum

Definition at line 47 of file AbstractBaseObjectTest.java.

Member Function Documentation

◆ checkDirection()

static void net.sf.gridarta.model.baseobject.AbstractBaseObjectTest.checkDirection ( @NotNull final BaseObject<?, ?, ?, ?>  gameObject,
final int  direction 
)
staticprivate

Checks that the "direction" attribute of a GameObject contains the expected value.

Parameters
gameObjectthe game object to check
directionthe expected direction

Definition at line 254 of file AbstractBaseObjectTest.java.

Referenced by net.sf.gridarta.model.baseobject.AbstractBaseObjectTest.testDirection1(), net.sf.gridarta.model.baseobject.AbstractBaseObjectTest.testDirection2(), and net.sf.gridarta.model.baseobject.AbstractBaseObjectTest.testDirection3().

+ Here is the caller graph for this function:

◆ checkName()

static void net.sf.gridarta.model.baseobject.AbstractBaseObjectTest.checkName ( @NotNull final BaseObject<?, ?, ?, ?>  gameObject,
@NotNull final String  name,
@NotNull final String  nameAttribute 
)
staticprivate

Checks that the BaseObject#NAME attribute of an GameObject contains the expected value.

Parameters
gameObjectthe game object to check
namethe expected name (cached value)
nameAttributethe expected name ("name" attribute)

Definition at line 489 of file AbstractBaseObjectTest.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.baseobject.AbstractBaseObjectTest.testName1(), net.sf.gridarta.model.baseobject.AbstractBaseObjectTest.testName2(), and net.sf.gridarta.model.baseobject.AbstractBaseObjectTest.testName3().

+ Here is the caller graph for this function:

◆ checkType()

static void net.sf.gridarta.model.baseobject.AbstractBaseObjectTest.checkType ( @NotNull final BaseObject<?, ?, ?, ?>  gameObject,
final int  type 
)
staticprivate

◆ newArchetype()

static TestArchetype net.sf.gridarta.model.baseobject.AbstractBaseObjectTest.newArchetype ( @NotNull final String  archetypeName,
@Nullable final String  objectText,
@NotNull final FaceObjectProviders  faceObjectProviders,
@NotNull final AnimationObjects  animationObjects 
)
staticprivate

◆ newFaceObjectProviders()

◆ newGameObject()

static GameObject<TestGameObject, TestMapArchObject, TestArchetype> net.sf.gridarta.model.baseobject.AbstractBaseObjectTest.newGameObject ( @NotNull final TestArchetype  archetype,
@NotNull final String  name,
@NotNull final FaceObjectProviders  faceObjectProviders,
@NotNull final AnimationObjects  animationObjects 
)
staticprivate

◆ testDirection1()

◆ testDirection2()

◆ testDirection3()

◆ testName1()

◆ testName2()

◆ testName3()

◆ testSetAttributeInt1()

◆ testSetAttributeString()

◆ testSetFaceName1()

◆ testSetFaceName2()

◆ testSetObjectTextAttributeOrdering()

◆ testToString1()

◆ testType1()

◆ testType2()

◆ testType3()

Member Data Documentation

◆ resourceIcons

final ResourceIcons net.sf.gridarta.model.baseobject.AbstractBaseObjectTest.resourceIcons = new ResourceIcons()
private

The ResourceIcons instance.

Definition at line 53 of file AbstractBaseObjectTest.java.


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