net.sf.gridarta.model.archetypetype
public class ArchetypeTypeSetParserTest extends Object
ArchetypeTypeSetParser
.Modifier and Type | Field and Description |
---|---|
private ErrorView |
errorView
The
ErrorView used for parsing. |
private ErrorViewCollector |
errorViewCollector
The
ErrorViewCollector used for parsing. |
Constructor and Description |
---|
ArchetypeTypeSetParserTest() |
Modifier and Type | Method and Description |
---|---|
private void |
check(String name)
Checks that a types.xml file can be read.
|
private static ArchetypeTypeSetParser |
createArchetypeTypeSetParser()
Creates a new
ArchetypeTypeSetParser instance. |
private ArchetypeTypeSet |
loadArchetypeTypeSet(String name)
Loads a types.xml file from resources.
|
void |
test1()
Read a simple types.xml file.
|
void |
testArchetypeOrder1()
Checks that a "archetype_order" is parsed correctly: missing
attribute_order element.
|
void |
testArchetypeOrder2()
Checks that a "archetype_order" is parsed correctly: empty element.
|
void |
testArchetypeOrder3()
Checks that a "archetype_order" is parsed correctly: all attributes
specified.
|
void |
testArchetypeOrder4()
Checks that a "archetype_order" is parsed correctly: some attributes
missing.
|
void |
testIgnoreDefaultAttribute1()
Checks that ignoring default attributes do work.
|
void |
testIgnoreDefinedAttribute1()
Checks that ignoring defined attributes do work.
|
void |
testIgnoreImportAttribute1()
Checks that ignoring import attributes do work.
|
void |
testImport1()
Checks that imports do work.
|
void |
testImport2()
Checks that multi-imports do work.
|
void |
testMsgDefault1()
Checks that a "msg" field in default_type does work.
|
void |
testMsgDefault2()
Checks that a "msg" field in default_type does work.
|
void |
testMsgDefault3()
Checks that a "msg" field in default_type CAN BE "ignored".
|
@NotNull private final ErrorViewCollector errorViewCollector
ErrorViewCollector
used for parsing.public ArchetypeTypeSetParserTest()
public void test1() throws ParserConfigurationException, IOException
ParserConfigurationException
- if the test failsIOException
- if the test failspublic void testImport1() throws ParserConfigurationException, IOException
ParserConfigurationException
- if the test failsIOException
- if the test failspublic void testImport2() throws ParserConfigurationException, IOException
ParserConfigurationException
- if the test failsIOException
- if the test failspublic void testIgnoreDefaultAttribute1() throws ParserConfigurationException, IOException
ParserConfigurationException
- if the test failsIOException
- if the test failspublic void testIgnoreImportAttribute1() throws ParserConfigurationException, IOException
ParserConfigurationException
- if the test failsIOException
- if the test failspublic void testIgnoreDefinedAttribute1() throws ParserConfigurationException, IOException
ParserConfigurationException
- if the test failsIOException
- if the test failspublic void testMsgDefault1() throws ParserConfigurationException, IOException
ParserConfigurationException
- if the test failsIOException
- if the test failspublic void testMsgDefault2() throws ParserConfigurationException, IOException
ParserConfigurationException
- if the test failsIOException
- if the test failspublic void testMsgDefault3() throws ParserConfigurationException, IOException
ParserConfigurationException
- if the test failsIOException
- if the test failspublic void testArchetypeOrder1() throws ParserConfigurationException
ParserConfigurationException
- if the test failspublic void testArchetypeOrder2() throws ParserConfigurationException
ParserConfigurationException
- if the test failspublic void testArchetypeOrder3() throws ParserConfigurationException
ParserConfigurationException
- if the test failspublic void testArchetypeOrder4() throws ParserConfigurationException
ParserConfigurationException
- if the test failsprivate void check(@NotNull String name) throws ParserConfigurationException, IOException
name
- the base name of the resources to loadParserConfigurationException
- if the test failsIOException
- if the test fails@NotNull private ArchetypeTypeSet loadArchetypeTypeSet(@NotNull String name) throws ParserConfigurationException
name
- the base name of the resources to loadParserConfigurationException
- if the file cannot be read@NotNull private static ArchetypeTypeSetParser createArchetypeTypeSetParser() throws ParserConfigurationException
ArchetypeTypeSetParser
instance.ParserConfigurationException
- if the parser cannot be createdFeedback: webmaster
© 2003-2010 The Gridarta Developers. All rights reserved.