net.sf.gridarta.plugin.parameter
public class PluginParameterCodecTest extends Object
PluginParameterCodec
.Constructor and Description |
---|
PluginParameterCodecTest() |
Modifier and Type | Method and Description |
---|---|
private static PluginParameter<TestGameObject,TestMapArchObject,TestArchetype,?> |
fromXML(TestMapControlCreator mapControlCreator,
String string)
Decodes a
PluginParameter from its string representation. |
void |
testArchetypeFromXml1()
Checks that a
ArchetypeParameter is correctly decoded. |
void |
testArchetypeFromXml2()
Checks that an
ArchetypeParameter is correctly decoded. |
void |
testArchetypeFromXml3()
Checks that an
ArchetypeParameter is correctly decoded. |
void |
testArchetypeToXml1()
Checks that an
ArchetypeParameter instance is correctly encoded. |
void |
testArchetypeToXml2()
Checks that an
ArchetypeParameter instance is correctly encoded. |
void |
testArchetypeToXml3()
Checks that an
ArchetypeParameter instance is correctly encoded. |
void |
testBooleanFromXml1()
Checks that a
BooleanParameter is correctly decoded. |
void |
testBooleanFromXml2()
Checks that a
BooleanParameter is correctly decoded. |
void |
testBooleanToXml1()
Checks that a
BooleanParameter instance is correctly encoded. |
void |
testBooleanToXml2()
Checks that a
BooleanParameter instance is correctly encoded. |
void |
testDoubleFromXml1()
Checks that a
DoubleParameter is correctly decoded. |
void |
testDoubleFromXml2()
Checks that a
DoubleParameter is correctly decoded. |
void |
testDoubleToXml1()
Checks that a
DoubleParameter instance is correctly encoded. |
void |
testDoubleToXml2()
Checks that a
DoubleParameter instance is correctly encoded. |
void |
testFilterFromXml1()
Checks that a
FilterParameter is correctly decoded. |
void |
testFilterFromXml2()
Checks that a
FilterParameter is correctly decoded. |
void |
testFilterToXml1()
Checks that a
FilterParameter instance is correctly encoded. |
void |
testFilterToXml2()
Checks that a
FilterParameter instance is correctly encoded. |
void |
testIntegerFromXml1()
Checks that an
IntegerParameter is correctly decoded. |
void |
testIntegerFromXml2()
Checks that an
IntegerParameter is correctly decoded. |
void |
testIntegerToXml1()
Checks that an
IntegerParameter instance is correctly encoded. |
void |
testIntegerToXml2()
Checks that an
IntegerParameter instance is correctly encoded. |
void |
testMapFromXml1()
Checks that a
MapParameter is correctly decoded. |
void |
testMapFromXml3()
Checks that a
MapParameter is correctly decoded. |
void |
testMapPathToXml1()
Checks that a
MapPathParameter instance is correctly encoded. |
void |
testMapPathToXml2()
Checks that a
MapPathParameter instance is correctly encoded. |
void |
testMapToXml1()
Checks that a
MapParameter instance is correctly encoded. |
void |
testMapToXml2()
Checks that a
MapParameter instance is correctly encoded. |
void |
testMapToXml3()
Checks that a
MapParameter instance is correctly encoded. |
void |
testStringToXml1()
Checks that a
StringParameter instance is correctly encoded. |
void |
testStringToXml2()
Checks that a
StringParameter instance is correctly encoded. |
private static String |
toXML(PluginParameter<TestGameObject,TestMapArchObject,TestArchetype,?> parameter)
Encodes a
PluginParameter to its string representation. |
public PluginParameterCodecTest()
public void testArchetypeToXml1() throws IOException
ArchetypeParameter
instance is correctly encoded.IOException
- if the test failspublic void testArchetypeToXml2() throws IOException
ArchetypeParameter
instance is correctly encoded.IOException
- if the test failspublic void testArchetypeToXml3() throws IOException
ArchetypeParameter
instance is correctly encoded.IOException
- if the test failspublic void testBooleanToXml1() throws IOException
BooleanParameter
instance is correctly encoded.IOException
- if the test failspublic void testBooleanToXml2() throws IOException
BooleanParameter
instance is correctly encoded.IOException
- if the test failspublic void testDoubleToXml1() throws IOException
DoubleParameter
instance is correctly encoded.IOException
- if the test failspublic void testDoubleToXml2() throws IOException
DoubleParameter
instance is correctly encoded.IOException
- if the test failspublic void testFilterToXml1() throws IOException
FilterParameter
instance is correctly encoded.IOException
- if the test failspublic void testFilterToXml2() throws IOException
FilterParameter
instance is correctly encoded.IOException
- if the test failspublic void testIntegerToXml1() throws IOException
IntegerParameter
instance is correctly encoded.IOException
- if the test failspublic void testIntegerToXml2() throws IOException
IntegerParameter
instance is correctly encoded.IOException
- if the test failspublic void testMapToXml1() throws IOException
MapParameter
instance is correctly encoded.IOException
- if the test failspublic void testMapToXml2() throws IOException
MapParameter
instance is correctly encoded.IOException
- if the test failspublic void testMapToXml3() throws IOException
MapParameter
instance is correctly encoded.IOException
- if the test failspublic void testMapPathToXml1() throws IOException
MapPathParameter
instance is correctly encoded.IOException
- if the test failspublic void testMapPathToXml2() throws IOException
MapPathParameter
instance is correctly encoded.IOException
- if the test failspublic void testStringToXml1() throws IOException
StringParameter
instance is correctly encoded.IOException
- if the test failspublic void testStringToXml2() throws IOException
StringParameter
instance is correctly encoded.IOException
- if the test failspublic void testArchetypeFromXml1() throws IOException, org.jdom.JDOMException, NoSuchParameterException
ArchetypeParameter
is correctly decoded.IOException
- if the test failsorg.jdom.JDOMException
- if the test failsNoSuchParameterException
- if the test failspublic void testArchetypeFromXml2() throws IOException, org.jdom.JDOMException, NoSuchParameterException
ArchetypeParameter
is correctly decoded.IOException
- if the test failsorg.jdom.JDOMException
- if the test failsNoSuchParameterException
- if the test failspublic void testArchetypeFromXml3() throws IOException, org.jdom.JDOMException, NoSuchParameterException
ArchetypeParameter
is correctly decoded.IOException
- if the test failsorg.jdom.JDOMException
- if the test failsNoSuchParameterException
- if the test failspublic void testBooleanFromXml1() throws IOException, org.jdom.JDOMException, NoSuchParameterException
BooleanParameter
is correctly decoded.IOException
- if the test failsorg.jdom.JDOMException
- if the test failsNoSuchParameterException
- if the test failspublic void testBooleanFromXml2() throws IOException, org.jdom.JDOMException, NoSuchParameterException
BooleanParameter
is correctly decoded.IOException
- if the test failsorg.jdom.JDOMException
- if the test failsNoSuchParameterException
- if the test failspublic void testDoubleFromXml1() throws IOException, org.jdom.JDOMException, NoSuchParameterException
DoubleParameter
is correctly decoded.IOException
- if the test failsorg.jdom.JDOMException
- if the test failsNoSuchParameterException
- if the test failspublic void testDoubleFromXml2() throws IOException, org.jdom.JDOMException, NoSuchParameterException
DoubleParameter
is correctly decoded.IOException
- if the test failsorg.jdom.JDOMException
- if the test failsNoSuchParameterException
- if the test failspublic void testFilterFromXml1() throws IOException, org.jdom.JDOMException, NoSuchParameterException
FilterParameter
is correctly decoded.IOException
- if the test failsorg.jdom.JDOMException
- if the test failsNoSuchParameterException
- if the test failspublic void testFilterFromXml2() throws IOException, org.jdom.JDOMException, NoSuchParameterException
FilterParameter
is correctly decoded.IOException
- if the test failsorg.jdom.JDOMException
- if the test failsNoSuchParameterException
- if the test failspublic void testIntegerFromXml1() throws IOException, org.jdom.JDOMException, NoSuchParameterException
IntegerParameter
is correctly decoded.IOException
- if the test failsorg.jdom.JDOMException
- if the test failsNoSuchParameterException
- if the test failspublic void testIntegerFromXml2() throws IOException, org.jdom.JDOMException, NoSuchParameterException
IntegerParameter
is correctly decoded.IOException
- if the test failsorg.jdom.JDOMException
- if the test failsNoSuchParameterException
- if the test failspublic void testMapFromXml1() throws IOException, org.jdom.JDOMException, NoSuchParameterException
MapParameter
is correctly decoded.IOException
- if the test failsorg.jdom.JDOMException
- if the test failsNoSuchParameterException
- if the test failspublic void testMapFromXml3() throws IOException, org.jdom.JDOMException, NoSuchParameterException
MapParameter
is correctly decoded.IOException
- if the test failsorg.jdom.JDOMException
- if the test failsNoSuchParameterException
- if the test fails@NotNull private static String toXML(@NotNull PluginParameter<TestGameObject,TestMapArchObject,TestArchetype,?> parameter) throws IOException
PluginParameter
to its string representation.parameter
- the plugin parameterIOException
- if encoding fails@NotNull private static PluginParameter<TestGameObject,TestMapArchObject,TestArchetype,?> fromXML(@NotNull TestMapControlCreator mapControlCreator, @NotNull String string) throws IOException, org.jdom.JDOMException, NoSuchParameterException
PluginParameter
from its string representation.mapControlCreator
- the map control creator to usestring
- the string representationIOException
- if decoding failsorg.jdom.JDOMException
- if decoding failsNoSuchParameterException
- if decoding failsFeedback: webmaster
© 2003-2010 The Gridarta Developers. All rights reserved.