Crossfire JXClient, Trunk
Public Member Functions | Static Private Member Functions | List of all members
com.realtime.crossfire.jxclient.gui.gauge.OrientationTest Class Reference
Collaboration diagram for com.realtime.crossfire.jxclient.gui.gauge.OrientationTest:
Collaboration graph

Public Member Functions

void testOrientations () throws Exception
 

Static Private Member Functions

static void check (@NotNull final Class<? extends Orientation > class_, final boolean useX, final boolean flip) throws IllegalAccessException, InstantiationException, InvocationTargetException, NoSuchMethodException
 
static void check (@NotNull final Orientation o, final boolean useX, final boolean flip, final boolean valid, final int x, final int y, final int w, final int h, final boolean negativeImage)
 
static void checkNegative (@NotNull final Class<? extends Orientation > class_, final boolean useX, final boolean flip) throws IllegalAccessException, InstantiationException, InvocationTargetException, NoSuchMethodException
 
static void checkPositive (@NotNull final Class<? extends Orientation > class_, final boolean useX, final boolean flip) throws IllegalAccessException, InstantiationException, InvocationTargetException, NoSuchMethodException
 

Detailed Description

Regression tests for class Orientation and implementing classes.

Author
Andreas Kirschbaum

Definition at line 34 of file OrientationTest.java.

Member Function Documentation

◆ check() [1/2]

static void com.realtime.crossfire.jxclient.gui.gauge.OrientationTest.check ( @NotNull final Class<? extends Orientation class_,
final boolean  useX,
final boolean  flip 
) throws IllegalAccessException, InstantiationException, InvocationTargetException, NoSuchMethodException
staticprivate

Checks an Orientation instance.

Parameters
class_the instance's class
useXif set, swap x and y coordinates
flipif set, invert the x coordinate
Exceptions
IllegalAccessExceptionif the test fails
InstantiationExceptionif the test fails
NoSuchMethodExceptionif the test fails
InvocationTargetExceptionif the test fails

Definition at line 58 of file OrientationTest.java.

References com.realtime.crossfire.jxclient.gui.gauge.OrientationTest.checkNegative(), and com.realtime.crossfire.jxclient.gui.gauge.OrientationTest.checkPositive().

Referenced by com.realtime.crossfire.jxclient.gui.gauge.OrientationTest.checkNegative(), com.realtime.crossfire.jxclient.gui.gauge.OrientationTest.checkPositive(), and com.realtime.crossfire.jxclient.gui.gauge.OrientationTest.testOrientations().

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

◆ check() [2/2]

static void com.realtime.crossfire.jxclient.gui.gauge.OrientationTest.check ( @NotNull final Orientation  o,
final boolean  useX,
final boolean  flip,
final boolean  valid,
final int  x,
final int  y,
final int  w,
final int  h,
final boolean  negativeImage 
)
staticprivate

Checks that a value is correctly handled.

Parameters
othe orientation instance to check
useXif set, swap x and y coordinates
flipif set, invert the x coordinate
validthe expected "valid" value
xthe expected x coordinate
ythe expected y coordinate
wthe expected width
hthe expected height
negativeImagethe expected "negative image" value

Definition at line 159 of file OrientationTest.java.

◆ checkNegative()

static void com.realtime.crossfire.jxclient.gui.gauge.OrientationTest.checkNegative ( @NotNull final Class<? extends Orientation class_,
final boolean  useX,
final boolean  flip 
) throws IllegalAccessException, InstantiationException, InvocationTargetException, NoSuchMethodException
staticprivate

Checks that negative values are correctly handled by an Orientation instance.

Parameters
class_the instance's class
useXif set, swap x and y coordinates
flipif set, invert the x coordinate
Exceptions
IllegalAccessExceptionif the test fails
InstantiationExceptionif the test fails
NoSuchMethodExceptionif the test fails
InvocationTargetExceptionif the test fails

Definition at line 116 of file OrientationTest.java.

References com.realtime.crossfire.jxclient.gui.gauge.OrientationTest.check(), com.realtime.crossfire.jxclient.gui.gauge.Orientation.setExtends(), com.realtime.crossfire.jxclient.gui.gauge.Orientation.setHasNegativeImage(), and com.realtime.crossfire.jxclient.gui.gauge.Orientation.setValues().

Referenced by com.realtime.crossfire.jxclient.gui.gauge.OrientationTest.check().

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

◆ checkPositive()

static void com.realtime.crossfire.jxclient.gui.gauge.OrientationTest.checkPositive ( @NotNull final Class<? extends Orientation class_,
final boolean  useX,
final boolean  flip 
) throws IllegalAccessException, InstantiationException, InvocationTargetException, NoSuchMethodException
staticprivate

Checks that positive values are correctly handled by an Orientation instance.

Parameters
class_the instance's class
useXif set, swap x and y coordinates
flipif set, invert the x coordinate
Exceptions
IllegalAccessExceptionif the test fails
InstantiationExceptionif the test fails
InvocationTargetExceptionif the test fails
NoSuchMethodExceptionif the test fails

Definition at line 74 of file OrientationTest.java.

References com.realtime.crossfire.jxclient.gui.gauge.OrientationTest.check(), com.realtime.crossfire.jxclient.gui.gauge.Orientation.setExtends(), com.realtime.crossfire.jxclient.gui.gauge.Orientation.setHasNegativeImage(), and com.realtime.crossfire.jxclient.gui.gauge.Orientation.setValues().

Referenced by com.realtime.crossfire.jxclient.gui.gauge.OrientationTest.check().

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

◆ testOrientations()

void com.realtime.crossfire.jxclient.gui.gauge.OrientationTest.testOrientations ( ) throws Exception

Checks that Orientation instances work correctly.

Exceptions
Exceptionif the test failed

Definition at line 41 of file OrientationTest.java.

References com.realtime.crossfire.jxclient.gui.gauge.OrientationTest.check().

Here is the call graph for this function:

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