Gridarta Editor
net.sf.gridarta.plugin.parameter.PluginParameterCodecTest Class Reference

Regression tests for PluginParameterCodec. More...

+ Collaboration diagram for net.sf.gridarta.plugin.parameter.PluginParameterCodecTest:

Public Member Functions

void testArchetypeFromXml1 () throws IOException, NoSuchParameterException, ParsingException, SAXException
 Checks that a ArchetypeParameter is correctly decoded. More...
 
void testArchetypeFromXml2 () throws IOException, NoSuchParameterException, ParsingException, SAXException
 Checks that an ArchetypeParameter is correctly decoded. More...
 
void testArchetypeFromXml3 () throws IOException, NoSuchParameterException, ParsingException, SAXException
 Checks that an ArchetypeParameter is correctly decoded. More...
 
void testArchetypeToXml1 () throws IOException
 Checks that an ArchetypeParameter instance is correctly encoded. More...
 
void testArchetypeToXml2 () throws IOException
 Checks that an ArchetypeParameter instance is correctly encoded. More...
 
void testArchetypeToXml3 () throws IOException
 Checks that an ArchetypeParameter instance is correctly encoded. More...
 
void testBooleanFromXml1 () throws IOException, NoSuchParameterException, ParsingException, SAXException
 Checks that a BooleanParameter is correctly decoded. More...
 
void testBooleanFromXml2 () throws IOException, NoSuchParameterException, ParsingException, SAXException
 Checks that a BooleanParameter is correctly decoded. More...
 
void testBooleanToXml1 () throws IOException
 Checks that a BooleanParameter instance is correctly encoded. More...
 
void testBooleanToXml2 () throws IOException
 Checks that a BooleanParameter instance is correctly encoded. More...
 
void testDoubleFromXml1 () throws IOException, NoSuchParameterException, ParsingException, SAXException
 Checks that a DoubleParameter is correctly decoded. More...
 
void testDoubleFromXml2 () throws IOException, NoSuchParameterException, ParsingException, SAXException
 Checks that a DoubleParameter is correctly decoded. More...
 
void testDoubleToXml1 () throws IOException
 Checks that a DoubleParameter instance is correctly encoded. More...
 
void testDoubleToXml2 () throws IOException
 Checks that a DoubleParameter instance is correctly encoded. More...
 
void testIntegerFromXml1 () throws IOException, NoSuchParameterException, ParsingException, SAXException
 Checks that an IntegerParameter is correctly decoded. More...
 
void testIntegerFromXml2 () throws IOException, NoSuchParameterException, ParsingException, SAXException
 Checks that an IntegerParameter is correctly decoded. More...
 
void testIntegerToXml1 () throws IOException
 Checks that an IntegerParameter instance is correctly encoded. More...
 
void testIntegerToXml2 () throws IOException
 Checks that an IntegerParameter instance is correctly encoded. More...
 
void testMapFromXml1 () throws IOException, NoSuchParameterException, ParsingException, SAXException
 Checks that a MapParameter is correctly decoded. More...
 
void testMapFromXml3 () throws IOException, NoSuchParameterException, ParsingException, SAXException
 Checks that a MapParameter is correctly decoded. More...
 
void testMapPathToXml1 () throws IOException
 Checks that a MapPathParameter instance is correctly encoded. More...
 
void testMapPathToXml2 () throws IOException
 Checks that a MapPathParameter instance is correctly encoded. More...
 
void testMapToXml1 () throws IOException
 Checks that a MapParameter instance is correctly encoded. More...
 
void testMapToXml2 () throws IOException
 Checks that a MapParameter instance is correctly encoded. More...
 
void testMapToXml3 () throws IOException
 Checks that a MapParameter instance is correctly encoded. More...
 
void testStringToXml1 () throws IOException
 Checks that a StringParameter instance is correctly encoded. More...
 
void testStringToXml2 () throws IOException
 Checks that a StringParameter instance is correctly encoded. More...
 

Static Private Member Functions

static PluginParameter< TestGameObject, TestMapArchObject, TestArchetype, ?> fromXML (@NotNull final TestMapControlCreator mapControlCreator, @NotNull final String string) throws IOException, NoSuchParameterException, ParsingException, SAXException
 Decodes a PluginParameter from its string representation. More...
 
static String toXML (@NotNull final PluginParameter< TestGameObject, TestMapArchObject, TestArchetype, ?> parameter) throws IOException
 Encodes a PluginParameter to its string representation. More...
 

Detailed Description

Regression tests for PluginParameterCodec.

Author
Andreas Kirschbaum

Definition at line 55 of file PluginParameterCodecTest.java.

Member Function Documentation

◆ fromXML()

static PluginParameter<TestGameObject, TestMapArchObject, TestArchetype, ?> net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.fromXML ( @NotNull final TestMapControlCreator  mapControlCreator,
@NotNull final String  string 
) throws IOException, NoSuchParameterException, ParsingException, SAXException
staticprivate

Decodes a PluginParameter from its string representation.

Parameters
mapControlCreatorthe map control creator to use
stringthe string representation
Returns
the plugin parameter
Exceptions
IOExceptionif decoding fails
NoSuchParameterExceptionif decoding fails
ParsingExceptionif decoding fails
SAXExceptionif decoding fails

Definition at line 755 of file PluginParameterCodecTest.java.

References net.sf.gridarta.plugin.parameter.PluginParameterFactory< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.createParameter().

Referenced by net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testArchetypeFromXml1(), net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testArchetypeFromXml2(), net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testArchetypeFromXml3(), net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testBooleanFromXml1(), net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testBooleanFromXml2(), net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testDoubleFromXml1(), net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testDoubleFromXml2(), net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testIntegerFromXml1(), net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testIntegerFromXml2(), net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testMapFromXml1(), and net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testMapFromXml3().

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

◆ testArchetypeFromXml1()

◆ testArchetypeFromXml2()

◆ testArchetypeFromXml3()

void net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testArchetypeFromXml3 ( ) throws IOException, NoSuchParameterException, ParsingException, SAXException

◆ testArchetypeToXml1()

void net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testArchetypeToXml1 ( ) throws IOException

Checks that an ArchetypeParameter instance is correctly encoded.

Exceptions
IOExceptionif the test fails

Definition at line 62 of file PluginParameterCodecTest.java.

References net.sf.gridarta.model.mapmodel.TestMapModelCreator.getArchetypeSet(), and net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.toXML().

+ Here is the call graph for this function:

◆ testArchetypeToXml2()

void net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testArchetypeToXml2 ( ) throws IOException

◆ testArchetypeToXml3()

◆ testBooleanFromXml1()

void net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testBooleanFromXml1 ( ) throws IOException, NoSuchParameterException, ParsingException, SAXException

◆ testBooleanFromXml2()

void net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testBooleanFromXml2 ( ) throws IOException, NoSuchParameterException, ParsingException, SAXException

◆ testBooleanToXml1()

void net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testBooleanToXml1 ( ) throws IOException

◆ testBooleanToXml2()

◆ testDoubleFromXml1()

◆ testDoubleFromXml2()

◆ testDoubleToXml1()

void net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testDoubleToXml1 ( ) throws IOException

◆ testDoubleToXml2()

◆ testIntegerFromXml1()

◆ testIntegerFromXml2()

◆ testIntegerToXml1()

void net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testIntegerToXml1 ( ) throws IOException

◆ testIntegerToXml2()

◆ testMapFromXml1()

◆ testMapFromXml3()

void net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testMapFromXml3 ( ) throws IOException, NoSuchParameterException, ParsingException, SAXException

Checks that a MapParameter is correctly decoded.

Exceptions
IOExceptionif the test fails
NoSuchParameterExceptionif the test fails
ParsingExceptionif the test fails
SAXExceptionif the test fails

Definition at line 702 of file PluginParameterCodecTest.java.

References net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.fromXML(), net.sf.gridarta.plugin.parameter.PluginParameter< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, V >.getDescription(), net.sf.gridarta.model.io.PathManager.getMapFile(), net.sf.gridarta.model.mapmodel.MapModel< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapFile(), net.sf.gridarta.model.mapcontrol.TestMapControlCreator.getMapManager(), net.sf.gridarta.model.mapcontrol.MapControl< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getMapModel(), net.sf.gridarta.model.mapmodel.MapFile.getMapPath(), net.sf.gridarta.plugin.parameter.PluginParameter< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, V >.getName(), net.sf.gridarta.plugin.parameter.PluginParameter< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R, V >.getParameterType(), net.sf.gridarta.model.mapcontrol.TestMapControlCreator.getPathManager(), net.sf.gridarta.plugin.parameter.MapParameter< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.getValueOrNull(), and net.sf.gridarta.model.mapmodel.AbsoluteMapPath.toString().

+ Here is the call graph for this function:

◆ testMapPathToXml1()

void net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testMapPathToXml1 ( ) throws IOException

◆ testMapPathToXml2()

void net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testMapPathToXml2 ( ) throws IOException

◆ testMapToXml1()

◆ testMapToXml2()

void net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testMapToXml2 ( ) throws IOException

◆ testMapToXml3()

◆ testStringToXml1()

void net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testStringToXml1 ( ) throws IOException

◆ testStringToXml2()

void net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testStringToXml2 ( ) throws IOException

◆ toXML()

static String net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.toXML ( @NotNull final PluginParameter< TestGameObject, TestMapArchObject, TestArchetype, ?>  parameter) throws IOException
staticprivate

Encodes a PluginParameter to its string representation.

Parameters
parameterthe plugin parameter
Returns
the string representation
Exceptions
IOExceptionif the conversion fails

Definition at line 734 of file PluginParameterCodecTest.java.

References net.sf.gridarta.plugin.parameter.PluginParameterCodec< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.toXML.

Referenced by net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testArchetypeToXml1(), net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testArchetypeToXml2(), net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testArchetypeToXml3(), net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testBooleanToXml1(), net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testBooleanToXml2(), net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testDoubleToXml1(), net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testDoubleToXml2(), net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testIntegerToXml1(), net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testIntegerToXml2(), net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testMapPathToXml1(), net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testMapPathToXml2(), net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testMapToXml1(), net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testMapToXml2(), net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testMapToXml3(), net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testStringToXml1(), and net.sf.gridarta.plugin.parameter.PluginParameterCodecTest.testStringToXml2().

+ Here is the caller graph for this function:

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