aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Vojtek2014-07-25 12:21:10 (EDT)
committerTomas Kraus2014-07-25 14:32:08 (EDT)
commit1683bb451e3b18ecc40d7e411087afc4475e92a2 (patch)
treeacd5afacd0376a51f24f5b5547791b5963ebd35b
parent5a792de3602b42efb18d6f8c0b61603b78075e5a (diff)
downloadeclipselink.runtime-1683bb451e3b18ecc40d7e411087afc4475e92a2.zip
eclipselink.runtime-1683bb451e3b18ecc40d7e411087afc4475e92a2.tar.gz
eclipselink.runtime-1683bb451e3b18ecc40d7e411087afc4475e92a2.tar.bz2
Bug# 440415 - Fixed the possibility to run JAXB tests from Eclipse.
JAXB tests are defined as test suites in package org.eclipse.persistence.testing.jaxb. Fixed the possibility to run moxy tests from directory moxy/eclipselink.moxy.test. Tests are run as ant -f antbuild.xml test. Rename to correct folder Signed-off-by: Martin Vojtek <martin.vojtek@oracle.com>
-rw-r--r--moxy/eclipselink.moxy.test/.classpath3
-rw-r--r--moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/all-oxm.xml (renamed from moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/all-oxm.xml)20
-rw-r--r--moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/all.json (renamed from moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/all.json)10
-rw-r--r--moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/all.xml (renamed from moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/all.xml)10
-rw-r--r--moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/all.xsd (renamed from moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/all.xsd)22
-rw-r--r--moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/default-oxm.xml (renamed from moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/default-oxm.xml)20
-rw-r--r--moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/default.json (renamed from moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/default.json)10
-rw-r--r--moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/default.xml (renamed from moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/default.xml)10
-rw-r--r--moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/default.xsd (renamed from moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/default.xsd)22
-rw-r--r--moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/overrideAll-oxm.xml (renamed from moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/overrideAll-oxm.xml)20
-rw-r--r--moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/overrideSequence-oxm.xml (renamed from moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/overrideSequence-oxm.xml)20
-rw-r--r--moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/sequence-oxm.xml (renamed from moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/sequence-oxm.xml)20
-rw-r--r--moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/sequence.json (renamed from moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/sequence.json)10
-rw-r--r--moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/sequence.xml (renamed from moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/sequence.xml)10
-rw-r--r--moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/sequence.xsd (renamed from moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/sequence.xsd)22
-rw-r--r--moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/dynamic/DynamicJAXBFromXSDTestCases.java14
-rw-r--r--moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/AllTestCases.java20
-rw-r--r--moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/DefaultTestCases.java30
-rw-r--r--moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/OverrideAllTestCases.java30
-rw-r--r--moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/OverrideSequenceTestCases.java30
-rw-r--r--moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/SequenceTestCases.java30
-rw-r--r--moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/OXTestSuite.java25
-rw-r--r--moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/classloader/JARClassLoader.java45
-rw-r--r--moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/events/RootWithAnyObjectTestCases.java38
-rw-r--r--moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/events/RootWithCompositeCollectionTestCases.java38
-rw-r--r--moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/events/RootWithCompositeObjectTestCases.java38
-rw-r--r--moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/SAXMappingTestSuite.java26
-rw-r--r--moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/XMLMappingTestCases.java150
-rw-r--r--moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/advancedxpath/UnmarshalTestCases.java33
-rw-r--r--moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/choicecollection/XMLChoiceCollectionMappingMixedTestCases.java26
-rw-r--r--moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/choicecollection/XMLChoiceCollectionWithGroupingElementTestCases.java26
-rw-r--r--moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/platform/PlatformCreateDocumentTestCases.java25
-rw-r--r--moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/readonly/DirectMappingTestCases.java81
-rw-r--r--moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/schemamodelgenerator/GenerateSchemaTestCases.java24
-rw-r--r--moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/schemamodelgenerator/mappings/pathbased/PathbasedMappingTestCases.java45
-rw-r--r--moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/schemareference/XMLSchemaReferenceTestSuite.java25
-rw-r--r--moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/xmlmarshaller/XMLMarshallerTestSuite.java25
-rw-r--r--moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/xmlmarshaller/setschemas/SetXmlSchemaTestCases.java93
-rw-r--r--moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/xmlmarshaller/structureValidation/StructureValidationTestSuite.java25
-rw-r--r--moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/xmlroot/nil/XMLRootNilForceWrapTestCases.java58
-rw-r--r--moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/xmlroot/nil/XMLRootNilTestCases.java59
41 files changed, 665 insertions, 623 deletions
diff --git a/moxy/eclipselink.moxy.test/.classpath b/moxy/eclipselink.moxy.test/.classpath
index d7a2ccd..65663d8 100644
--- a/moxy/eclipselink.moxy.test/.classpath
+++ b/moxy/eclipselink.moxy.test/.classpath
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="lib" path="resource"/>
<classpathentry excluding="**/.svn/**" kind="src" path="src"/>
+ <classpathentry kind="src" path="resource"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.persistence.core"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.persistence.moxy"/>
@@ -13,5 +13,6 @@
<classpathentry kind="var" path="ECLIPSELINK_HOME/plugins/javax.xml.bind_2.2.0.v201105210648.jar" sourcepath="/ECLIPSELINK_HOME/plugins/javax.xml.bind.source_2.2.0.v201005080402.jar"/>
<classpathentry kind="var" path="ECLIPSELINK_HOME/plugins/javax.json-1.0.jar"/>
<classpathentry kind="var" path="ECLIPSELINK_HOME/plugins/org.eclipse.persistence.asm_5.0.1.v201405080102.jar" sourcepath="/ECLIPSELINK_HOME/plugins/org.eclipse.persistence.asm.source_5.0.1.v201405080102.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.persistence.moxy.dynamicxjc"/>
<classpathentry kind="output" path="classes"/>
</classpath>
diff --git a/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/all-oxm.xml b/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/all-oxm.xml
index 913460d..473b476 100644
--- a/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/all-oxm.xml
+++ b/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/all-oxm.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="US-ASCII"?>
-<xml-bindings
- xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm"
- package-name="org.eclipse.persistence.testing.jaxb.externalizedmetadata.xmltype.proporder">
- <java-types>
- <java-type name="Root">
- <xml-type prop-order=""/>
- </java-type>
- </java-types>
-</xml-bindings>
+<?xml version="1.0" encoding="US-ASCII"?>
+<xml-bindings
+ xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm"
+ package-name="org.eclipse.persistence.testing.jaxb.externalizedmetadata.xmltype.proporder">
+ <java-types>
+ <java-type name="Root">
+ <xml-type prop-order=""/>
+ </java-type>
+ </java-types>
+</xml-bindings>
diff --git a/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/all.json b/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/all.json
index 1682837..93e3617 100644
--- a/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/all.json
+++ b/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/all.json
@@ -1,5 +1,5 @@
-{"root":{
- "a":"A",
- "b":"B",
- "c":"C"
-}}
+{"root":{
+ "a":"A",
+ "b":"B",
+ "c":"C"
+}}
diff --git a/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/all.xml b/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/all.xml
index 0a83c3f..f5d6581 100644
--- a/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/all.xml
+++ b/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/all.xml
@@ -1,5 +1,5 @@
-<root>
- <a>A</a>
- <b>B</b>
- <c>C</c>
-</root>
+<root>
+ <a>A</a>
+ <b>B</b>
+ <c>C</c>
+</root>
diff --git a/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/all.xsd b/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/all.xsd
index e6d0722..fa18cec 100644
--- a/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/all.xsd
+++ b/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/all.xsd
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <xsd:complexType name="root">
- <xsd:all>
- <xsd:element name="a" type="xsd:string" minOccurs="0"/>
- <xsd:element name="b" type="xsd:string" minOccurs="0"/>
- <xsd:element name="c" type="xsd:string" minOccurs="0"/>
- </xsd:all>
- </xsd:complexType>
- <xsd:element name="root" type="root"/>
-</xsd:schema>
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <xsd:complexType name="root">
+ <xsd:all>
+ <xsd:element name="a" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="b" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="c" type="xsd:string" minOccurs="0"/>
+ </xsd:all>
+ </xsd:complexType>
+ <xsd:element name="root" type="root"/>
+</xsd:schema>
diff --git a/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/default-oxm.xml b/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/default-oxm.xml
index 8738888..1fbee5d 100644
--- a/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/default-oxm.xml
+++ b/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/default-oxm.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="US-ASCII"?>
-<xml-bindings
- xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm"
- package-name="org.eclipse.persistence.testing.jaxb.externalizedmetadata.xmltype.proporder">
- <java-types>
- <java-type name="Root">
- <xml-type/>
- </java-type>
- </java-types>
-</xml-bindings>
+<?xml version="1.0" encoding="US-ASCII"?>
+<xml-bindings
+ xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm"
+ package-name="org.eclipse.persistence.testing.jaxb.externalizedmetadata.xmltype.proporder">
+ <java-types>
+ <java-type name="Root">
+ <xml-type/>
+ </java-type>
+ </java-types>
+</xml-bindings>
diff --git a/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/default.json b/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/default.json
index 1682837..93e3617 100644
--- a/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/default.json
+++ b/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/default.json
@@ -1,5 +1,5 @@
-{"root":{
- "a":"A",
- "b":"B",
- "c":"C"
-}}
+{"root":{
+ "a":"A",
+ "b":"B",
+ "c":"C"
+}}
diff --git a/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/default.xml b/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/default.xml
index 0a83c3f..f5d6581 100644
--- a/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/default.xml
+++ b/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/default.xml
@@ -1,5 +1,5 @@
-<root>
- <a>A</a>
- <b>B</b>
- <c>C</c>
-</root>
+<root>
+ <a>A</a>
+ <b>B</b>
+ <c>C</c>
+</root>
diff --git a/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/default.xsd b/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/default.xsd
index b3e8608..1277ea2 100644
--- a/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/default.xsd
+++ b/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/default.xsd
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <xsd:complexType name="root">
- <xsd:sequence>
- <xsd:element name="a" type="xsd:string" minOccurs="0"/>
- <xsd:element name="b" type="xsd:string" minOccurs="0"/>
- <xsd:element name="c" type="xsd:string" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:element name="root" type="root"/>
-</xsd:schema>
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <xsd:complexType name="root">
+ <xsd:sequence>
+ <xsd:element name="a" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="b" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="c" type="xsd:string" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:element name="root" type="root"/>
+</xsd:schema>
diff --git a/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/overrideAll-oxm.xml b/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/overrideAll-oxm.xml
index 63e232e..47692c4 100644
--- a/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/overrideAll-oxm.xml
+++ b/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/overrideAll-oxm.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="US-ASCII"?>
-<xml-bindings
- xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm"
- package-name="org.eclipse.persistence.testing.jaxb.externalizedmetadata.xmltype.proporder">
- <java-types>
- <java-type name="OverrideAllRoot">
- <xml-type name="root" prop-order="c b a"/>
- </java-type>
- </java-types>
-</xml-bindings>
+<?xml version="1.0" encoding="US-ASCII"?>
+<xml-bindings
+ xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm"
+ package-name="org.eclipse.persistence.testing.jaxb.externalizedmetadata.xmltype.proporder">
+ <java-types>
+ <java-type name="OverrideAllRoot">
+ <xml-type name="root" prop-order="c b a"/>
+ </java-type>
+ </java-types>
+</xml-bindings>
diff --git a/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/overrideSequence-oxm.xml b/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/overrideSequence-oxm.xml
index ae3f500..bbe17658 100644
--- a/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/overrideSequence-oxm.xml
+++ b/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/overrideSequence-oxm.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="US-ASCII"?>
-<xml-bindings
- xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm"
- package-name="org.eclipse.persistence.testing.jaxb.externalizedmetadata.xmltype.proporder">
- <java-types>
- <java-type name="OverrideSequenceRoot">
- <xml-type name="root" prop-order=""/>
- </java-type>
- </java-types>
-</xml-bindings>
+<?xml version="1.0" encoding="US-ASCII"?>
+<xml-bindings
+ xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm"
+ package-name="org.eclipse.persistence.testing.jaxb.externalizedmetadata.xmltype.proporder">
+ <java-types>
+ <java-type name="OverrideSequenceRoot">
+ <xml-type name="root" prop-order=""/>
+ </java-type>
+ </java-types>
+</xml-bindings>
diff --git a/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/sequence-oxm.xml b/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/sequence-oxm.xml
index fbe1193..ff7e9bb 100644
--- a/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/sequence-oxm.xml
+++ b/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/sequence-oxm.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="US-ASCII"?>
-<xml-bindings
- xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm"
- package-name="org.eclipse.persistence.testing.jaxb.externalizedmetadata.xmltype.proporder">
- <java-types>
- <java-type name="Root">
- <xml-type prop-order="c b a"/>
- </java-type>
- </java-types>
-</xml-bindings>
+<?xml version="1.0" encoding="US-ASCII"?>
+<xml-bindings
+ xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm"
+ package-name="org.eclipse.persistence.testing.jaxb.externalizedmetadata.xmltype.proporder">
+ <java-types>
+ <java-type name="Root">
+ <xml-type prop-order="c b a"/>
+ </java-type>
+ </java-types>
+</xml-bindings>
diff --git a/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/sequence.json b/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/sequence.json
index 787ebce..9f5cf22 100644
--- a/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/sequence.json
+++ b/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/sequence.json
@@ -1,5 +1,5 @@
-{"root":{
- "c":"C",
- "b":"B",
- "a":"A"
-}}
+{"root":{
+ "c":"C",
+ "b":"B",
+ "a":"A"
+}}
diff --git a/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/sequence.xml b/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/sequence.xml
index 2f97e70..f329e57 100644
--- a/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/sequence.xml
+++ b/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/sequence.xml
@@ -1,5 +1,5 @@
-<root>
- <c>C</c>
- <b>B</b>
- <a>A</a>
-</root>
+<root>
+ <c>C</c>
+ <b>B</b>
+ <a>A</a>
+</root>
diff --git a/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/sequence.xsd b/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/sequence.xsd
index 357f3f0..3c49894 100644
--- a/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/sequence.xsd
+++ b/moxy/eclipselink.moxy.test/resource/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/sequence.xsd
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <xsd:complexType name="root">
- <xsd:sequence>
- <xsd:element name="c" type="xsd:string" minOccurs="0"/>
- <xsd:element name="b" type="xsd:string" minOccurs="0"/>
- <xsd:element name="a" type="xsd:string" minOccurs="0"/>
- </xsd:sequence>
- </xsd:complexType>
- <xsd:element name="root" type="root"/>
-</xsd:schema>
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <xsd:complexType name="root">
+ <xsd:sequence>
+ <xsd:element name="c" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="b" type="xsd:string" minOccurs="0"/>
+ <xsd:element name="a" type="xsd:string" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:element name="root" type="root"/>
+</xsd:schema>
diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/dynamic/DynamicJAXBFromXSDTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/dynamic/DynamicJAXBFromXSDTestCases.java
index 91aacc6..ebc0d4d 100644
--- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/dynamic/DynamicJAXBFromXSDTestCases.java
+++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/dynamic/DynamicJAXBFromXSDTestCases.java
@@ -1021,13 +1021,13 @@ public class DynamicJAXBFromXSDTestCases extends TestCase {
private static final String BINARY = RESOURCE_DIR + "binary.xsd";
private static final String BINARY2 = RESOURCE_DIR + "binary2.xsd";
private static final String XMLSCHEMASCHEMA = RESOURCE_DIR + "XMLSchema.xsd";
- private static final String XPATH_POSITION = RESOURCE_DIR + "xpathposition.xsd";
- private static final String DATETIME_ARRAY = RESOURCE_DIR + "dateTimeArray.xsd";
-
- private static final String ECLIPSELINK_SCHEMA = "org/eclipse/persistence/jaxb/eclipselink_oxm_2_5.xsd";
-
- // Test Instance Docs
- private static final String PERSON_XML = RESOURCE_DIR + "sub-person-en.xml";
+ private static final String XPATH_POSITION = RESOURCE_DIR + "xpathposition.xsd";
+ private static final String DATETIME_ARRAY = RESOURCE_DIR + "dateTimeArray.xsd";
+
+ private static final String ECLIPSELINK_SCHEMA = "org/eclipse/persistence/jaxb/eclipselink_oxm_2_6.xsd";
+
+ // Test Instance Docs
+ private static final String PERSON_XML = RESOURCE_DIR + "sub-person-en.xml";
private static final String PERSONNE_XML = RESOURCE_DIR + "sub-personne-fr.xml";
private static final String XPATH_POSITION_XML = RESOURCE_DIR + "xpathposition.xml";
private static final String DATETIME_ARRAY_XML = RESOURCE_DIR + "dateTimeArray.xml";
diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/AllTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/AllTestCases.java
index 0d8cfc5..e94dff5 100644
--- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/AllTestCases.java
+++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/AllTestCases.java
@@ -8,16 +8,16 @@ import java.util.Map;
import org.eclipse.persistence.jaxb.JAXBContextFactory;
import org.eclipse.persistence.testing.jaxb.JAXBWithJSONTestCases;
-
-public class AllTestCases extends JAXBWithJSONTestCases {
-
- private static final String OXM_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/all-oxm.xml";
- private static final String XML_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/all.xml";
- private static final String XSD_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/all.xsd";
- private static final String JSON_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/all.json";
- public AllTestCases(String name) throws Exception {
- super(name);
- setClasses(new Class[] {Root.class});
+
+public class AllTestCases extends JAXBWithJSONTestCases {
+
+ private static final String OXM_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/all-oxm.xml";
+ private static final String XML_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/all.xml";
+ private static final String XSD_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/all.xsd";
+ private static final String JSON_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/all.json";
+ public AllTestCases(String name) throws Exception {
+ super(name);
+ setClasses(new Class[] {Root.class});
setControlDocument(XML_RESOURCE);
setControlJSON(JSON_RESOURCE);
}
diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/DefaultTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/DefaultTestCases.java
index 018a8ae..846b32a 100644
--- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/DefaultTestCases.java
+++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/DefaultTestCases.java
@@ -1,8 +1,8 @@
-/*******************************************************************************
- * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
+/*******************************************************************************
+ * Copyright (c) 2012, 2014 Oracle and/or its affiliates. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
@@ -22,16 +22,16 @@ import javax.xml.transform.stream.StreamSource;
import org.eclipse.persistence.jaxb.JAXBContextFactory;
import org.eclipse.persistence.testing.jaxb.JAXBWithJSONTestCases;
-
-public class DefaultTestCases extends JAXBWithJSONTestCases {
-
- private static final String OXM_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/default-oxm.xml";
- private static final String XML_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/default.xml";
- private static final String XSD_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/default.xsd";
- private static final String JSON_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/default.json";
-
- public DefaultTestCases(String name) throws Exception {
- super(name);
+
+public class DefaultTestCases extends JAXBWithJSONTestCases {
+
+ private static final String OXM_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/default-oxm.xml";
+ private static final String XML_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/default.xml";
+ private static final String XSD_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/default.xsd";
+ private static final String JSON_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/default.json";
+
+ public DefaultTestCases(String name) throws Exception {
+ super(name);
setClasses(new Class[] {Root.class});
setControlDocument(XML_RESOURCE);
setControlJSON(JSON_RESOURCE);
diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/OverrideAllTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/OverrideAllTestCases.java
index 4ff17b5..8c5fcd0 100644
--- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/OverrideAllTestCases.java
+++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/OverrideAllTestCases.java
@@ -1,8 +1,8 @@
-/*******************************************************************************
- * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
+/*******************************************************************************
+ * Copyright (c) 2012, 2014 Oracle and/or its affiliates. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
@@ -20,16 +20,16 @@ import java.util.Map;
import org.eclipse.persistence.jaxb.JAXBContextFactory;
import org.eclipse.persistence.testing.jaxb.JAXBWithJSONTestCases;
-
-public class OverrideAllTestCases extends JAXBWithJSONTestCases {
-
- private static final String OXM_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/overrideAll-oxm.xml";
- private static final String XML_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/sequence.xml";
- private static final String XSD_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/sequence.xsd";
- private static final String JSON_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/sequence.json";
- public OverrideAllTestCases(String name) throws Exception {
- super(name);
- setClasses(new Class[] {OverrideAllRoot.class});
+
+public class OverrideAllTestCases extends JAXBWithJSONTestCases {
+
+ private static final String OXM_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/overrideAll-oxm.xml";
+ private static final String XML_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/sequence.xml";
+ private static final String XSD_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/sequence.xsd";
+ private static final String JSON_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/sequence.json";
+ public OverrideAllTestCases(String name) throws Exception {
+ super(name);
+ setClasses(new Class[] {OverrideAllRoot.class});
setControlDocument(XML_RESOURCE);
setControlJSON(JSON_RESOURCE);
}
diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/OverrideSequenceTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/OverrideSequenceTestCases.java
index 5dedda6..6cb9c29 100644
--- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/OverrideSequenceTestCases.java
+++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/OverrideSequenceTestCases.java
@@ -1,8 +1,8 @@
-/*******************************************************************************
- * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
+/*******************************************************************************
+ * Copyright (c) 2012, 2014 Oracle and/or its affiliates. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
@@ -20,16 +20,16 @@ import java.util.Map;
import org.eclipse.persistence.jaxb.JAXBContextFactory;
import org.eclipse.persistence.testing.jaxb.JAXBWithJSONTestCases;
-
-public class OverrideSequenceTestCases extends JAXBWithJSONTestCases {
-
- private static final String OXM_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/overrideSequence-oxm.xml";
- private static final String XML_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/all.xml";
- private static final String XSD_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/all.xsd";
- private static final String JSON_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/all.json";
-
- public OverrideSequenceTestCases(String name) throws Exception {
- super(name);
+
+public class OverrideSequenceTestCases extends JAXBWithJSONTestCases {
+
+ private static final String OXM_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/overrideSequence-oxm.xml";
+ private static final String XML_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/all.xml";
+ private static final String XSD_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/all.xsd";
+ private static final String JSON_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/all.json";
+
+ public OverrideSequenceTestCases(String name) throws Exception {
+ super(name);
setClasses(new Class[] {OverrideSequenceRoot.class});
setControlDocument(XML_RESOURCE);
setControlJSON(JSON_RESOURCE);
diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/SequenceTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/SequenceTestCases.java
index be58ef0..d560150 100644
--- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/SequenceTestCases.java
+++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/SequenceTestCases.java
@@ -1,8 +1,8 @@
-/*******************************************************************************
- * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
+/*******************************************************************************
+ * Copyright (c) 2012, 2014 Oracle and/or its affiliates. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
@@ -20,16 +20,16 @@ import java.util.Map;
import org.eclipse.persistence.jaxb.JAXBContextFactory;
import org.eclipse.persistence.testing.jaxb.JAXBWithJSONTestCases;
-
-public class SequenceTestCases extends JAXBWithJSONTestCases {
-
- private static final String OXM_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/sequence-oxm.xml";
- private static final String XML_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/sequence.xml";
- private static final String XSD_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/sequence.xsd";
- private static final String JSON_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/propOrder/sequence.json";
-
- public SequenceTestCases(String name) throws Exception {
- super(name);
+
+public class SequenceTestCases extends JAXBWithJSONTestCases {
+
+ private static final String OXM_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/sequence-oxm.xml";
+ private static final String XML_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/sequence.xml";
+ private static final String XSD_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/sequence.xsd";
+ private static final String JSON_RESOURCE = "org/eclipse/persistence/testing/jaxb/externalizedmetadata/xmltype/proporder/sequence.json";
+
+ public SequenceTestCases(String name) throws Exception {
+ super(name);
setClasses(new Class[] {Root.class});
setControlDocument(XML_RESOURCE);
setControlJSON(JSON_RESOURCE);
diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/OXTestSuite.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/OXTestSuite.java
index ca77d10..9b80447 100644
--- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/OXTestSuite.java
+++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/OXTestSuite.java
@@ -1,8 +1,8 @@
-/*******************************************************************************
- * Copyright (c) 1998, 2012 Oracle and/or its affiliates. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
+/*******************************************************************************
+ * Copyright (c) 1998, 2014 Oracle and/or its affiliates. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
@@ -46,12 +46,15 @@ public class OXTestSuite extends TestCase {
junit.textui.TestRunner.main(new String[] { "-c", "org.eclipse.persistence.testing.oxm.OXTestSuite" });
}
- public static Test suite() {
- TestSuite suite = new TestSuite("OX Test Suite");
- String platform = System.getProperty("eclipselink.xml.platform");
- boolean jaxpPlatform = platform.equalsIgnoreCase("org.eclipse.persistence.platform.xml.jaxp.JAXPPlatform");
-
- suite.addTest(RootElementTestSuite.suite());
+ public static Test suite() {
+ TestSuite suite = new TestSuite("OX Test Suite");
+ String platform = System.getProperty("eclipselink.xml.platform");
+ if (null == platform) {
+ platform = "org.eclipse.persistence.platform.xml.jaxp.JAXPPlatform";
+ }
+ boolean jaxpPlatform = platform.equalsIgnoreCase("org.eclipse.persistence.platform.xml.jaxp.JAXPPlatform");
+
+ suite.addTest(RootElementTestSuite.suite());
suite.addTest(XPathEngineTestSuite.suite());
suite.addTest(XMLMarshallerTestSuite.suite());
if (!jaxpPlatform) {
diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/classloader/JARClassLoader.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/classloader/JARClassLoader.java
index 52f7f7a..93e9234 100644
--- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/classloader/JARClassLoader.java
+++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/classloader/JARClassLoader.java
@@ -1,8 +1,8 @@
-/*******************************************************************************
- * Copyright (c) 1998, 2012 Oracle and/or its affiliates. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
+/*******************************************************************************
+ * Copyright (c) 1998, 2014 Oracle and/or its affiliates. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
@@ -10,12 +10,13 @@
* Contributors:
* Oracle - initial API and implementation from Oracle TopLink
******************************************************************************/
-package org.eclipse.persistence.testing.oxm.classloader;
-
-import java.io.*;
-import java.security.AccessController;
-import java.security.PrivilegedActionException;
-import java.util.*;
+package org.eclipse.persistence.testing.oxm.classloader;
+
+import java.io.*;
+import java.net.URISyntaxException;
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.util.*;
import java.util.zip.*;
import org.eclipse.persistence.internal.security.PrivilegedAccessHelper;
@@ -57,16 +58,18 @@ public JARClassLoader (String jarFileName) {
}
/**
* Build and return a ZIP file for the specified JAR file name.
- */
-protected ZipFile buildJARFile(String jarFileName) {
- try {
- return new ZipFile(jarFileName);
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
-}
-/**
- * Return the package name for the specified class.
+ */
+protected ZipFile buildJARFile(String jarFileName) {
+ try {
+ return new ZipFile(new File(Thread.currentThread().getContextClassLoader().getResource(jarFileName).toURI()));
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ } catch (URISyntaxException e) {
+ throw new RuntimeException(e);
+ }
+}
+/**
+ * Return the package name for the specified class.
*/
protected String buildPackageName(String className) {
return className.substring(0, className.lastIndexOf("."));
diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/events/RootWithAnyObjectTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/events/RootWithAnyObjectTestCases.java
index bbb9f31..8879f35 100644
--- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/events/RootWithAnyObjectTestCases.java
+++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/events/RootWithAnyObjectTestCases.java
@@ -1,8 +1,8 @@
-/*******************************************************************************
- * Copyright (c) 1998, 2012 Oracle and/or its affiliates. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
+/*******************************************************************************
+ * Copyright (c) 1998, 2014 Oracle and/or its affiliates. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
@@ -15,24 +15,26 @@ package org.eclipse.persistence.testing.oxm.events;
import java.util.ArrayList;
import java.util.HashMap;
-import javax.xml.namespace.QName;
-
-import org.w3c.dom.Document;
-
-import org.eclipse.persistence.oxm.XMLMarshaller;
-import org.eclipse.persistence.testing.oxm.mappings.XMLMappingTestCases;
-
+import javax.xml.namespace.QName;
+
+import org.w3c.dom.Document;
+import org.eclipse.persistence.oxm.XMLMarshaller;
+import org.eclipse.persistence.testing.oxm.mappings.XMLMappingTestCases;
+
public class RootWithAnyObjectTestCases extends XMLMappingTestCases {
public MarshalListenerImpl listener;
public UnmarshalListenerImpl unmarshalListener;
public ArrayList expectedMarshalEvents;
public ArrayList expectedUnmarshalEvents;
-
- public RootWithAnyObjectTestCases(String name) throws Exception {
- super(name);
- setProject(new EmployeeProject());
- setControlDocument("org/eclipse/persistence/testing/oxm/events/any_object.xml");
-
+
+ public RootWithAnyObjectTestCases(String name) throws Exception {
+ super(name);
+ if (!System.getProperties().contains("platformType")) {
+ System.setProperty("platformType", "DOM");
+ }
+ setProject(new EmployeeProject());
+ setControlDocument("org/eclipse/persistence/testing/oxm/events/any_object.xml");
+
expectedMarshalEvents = new ArrayList();
expectedMarshalEvents.add(MarshalListenerImpl.EMPLOYEE_BEFORE_MARSHAL);
expectedMarshalEvents.add(MarshalListenerImpl.ADDRESS_BEFORE_MARSHAL);
diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/events/RootWithCompositeCollectionTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/events/RootWithCompositeCollectionTestCases.java
index 440075f..7782fa4 100644
--- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/events/RootWithCompositeCollectionTestCases.java
+++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/events/RootWithCompositeCollectionTestCases.java
@@ -1,8 +1,8 @@
-/*******************************************************************************
- * Copyright (c) 1998, 2012 Oracle and/or its affiliates. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
+/*******************************************************************************
+ * Copyright (c) 1998, 2014 Oracle and/or its affiliates. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
@@ -15,24 +15,26 @@ package org.eclipse.persistence.testing.oxm.events;
import java.util.ArrayList;
import java.util.HashMap;
-import javax.xml.namespace.QName;
-
-import org.w3c.dom.Document;
-
-import org.eclipse.persistence.oxm.XMLMarshaller;
-import org.eclipse.persistence.testing.oxm.mappings.XMLMappingTestCases;
-
+import javax.xml.namespace.QName;
+
+import org.w3c.dom.Document;
+import org.eclipse.persistence.oxm.XMLMarshaller;
+import org.eclipse.persistence.testing.oxm.mappings.XMLMappingTestCases;
+
public class RootWithCompositeCollectionTestCases extends XMLMappingTestCases {
public MarshalListenerImpl listener;
public UnmarshalListenerImpl unmarshalListener;
public ArrayList expectedMarshalEvents;
public ArrayList expectedUnmarshalEvents;
-
- public RootWithCompositeCollectionTestCases(String name) throws Exception {
- super(name);
- setProject(new EmployeeProject());
- setControlDocument("org/eclipse/persistence/testing/oxm/events/composite_collection.xml");
-
+
+ public RootWithCompositeCollectionTestCases(String name) throws Exception {
+ super(name);
+ if (!System.getProperties().contains("platformType")) {
+ System.setProperty("platformType", "DOM");
+ }
+ setProject(new EmployeeProject());
+ setControlDocument("org/eclipse/persistence/testing/oxm/events/composite_collection.xml");
+
expectedMarshalEvents = new ArrayList();
expectedMarshalEvents.add(MarshalListenerImpl.EMPLOYEE_BEFORE_MARSHAL);
expectedMarshalEvents.add(MarshalListenerImpl.PHONE_BEFORE_MARSHAL);
diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/events/RootWithCompositeObjectTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/events/RootWithCompositeObjectTestCases.java
index 1dcd2af..3451f51 100644
--- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/events/RootWithCompositeObjectTestCases.java
+++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/events/RootWithCompositeObjectTestCases.java
@@ -1,8 +1,8 @@
-/*******************************************************************************
- * Copyright (c) 1998, 2012 Oracle and/or its affiliates. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
+/*******************************************************************************
+ * Copyright (c) 1998, 2014 Oracle and/or its affiliates. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
@@ -15,24 +15,26 @@ package org.eclipse.persistence.testing.oxm.events;
import java.util.ArrayList;
import java.util.HashMap;
-import javax.xml.namespace.QName;
-
-import org.w3c.dom.Document;
-
-import org.eclipse.persistence.oxm.XMLMarshaller;
-import org.eclipse.persistence.testing.oxm.mappings.XMLMappingTestCases;
-
+import javax.xml.namespace.QName;
+
+import org.w3c.dom.Document;
+import org.eclipse.persistence.oxm.XMLMarshaller;
+import org.eclipse.persistence.testing.oxm.mappings.XMLMappingTestCases;
+
public class RootWithCompositeObjectTestCases extends XMLMappingTestCases {
public MarshalListenerImpl listener;
public UnmarshalListenerImpl unmarshalListener;
public ArrayList expectedMarshalEvents;
public ArrayList expectedUnmarshalEvents;
-
- public RootWithCompositeObjectTestCases(String name) throws Exception {
- super(name);
- setProject(new EmployeeProject());
- setControlDocument("org/eclipse/persistence/testing/oxm/events/composite_object.xml");
-
+
+ public RootWithCompositeObjectTestCases(String name) throws Exception {
+ super(name);
+ if (!System.getProperties().contains("platformType")) {
+ System.setProperty("platformType", "DOM");
+ }
+ setProject(new EmployeeProject());
+ setControlDocument("org/eclipse/persistence/testing/oxm/events/composite_object.xml");
+
expectedMarshalEvents = new ArrayList();
expectedMarshalEvents.add(MarshalListenerImpl.EMPLOYEE_BEFORE_MARSHAL);
expectedMarshalEvents.add(MarshalListenerImpl.ADDRESS_BEFORE_MARSHAL);
diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/SAXMappingTestSuite.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/SAXMappingTestSuite.java
index 804010d..d40e9a7 100644
--- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/SAXMappingTestSuite.java
+++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/SAXMappingTestSuite.java
@@ -1,8 +1,8 @@
-/*******************************************************************************
- * Copyright (c) 1998, 2012 Oracle and/or its affiliates. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
+/*******************************************************************************
+ * Copyright (c) 1998, 2014 Oracle and/or its affiliates. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
@@ -61,12 +61,12 @@ public class SAXMappingTestSuite extends TestCase {
//suite.addTest(XMLAnyObjectAndAnyCollectionMappingTestSuite.suite());
//suite.addTestSuite(XMLMarshalTestCases.class);
- //suite.addTestSuite(XMLUnmarshalTestCases.class);
- //suite.addTestSuite(XMLMarshallerEncodingTestCases.class);
- //suite.addTestSuite(XMLMarshallerFormattingTestCases.class);
- suite.addTestSuite(XMLBinaryDataMappingTestSuite.class);
- suite.addTestSuite(XMLBinaryDataCollectionMappingTestSuite.class);
-
- return suite;
- }
+ //suite.addTestSuite(XMLUnmarshalTestCases.class);
+ //suite.addTestSuite(XMLMarshallerEncodingTestCases.class);
+ //suite.addTestSuite(XMLMarshallerFormattingTestCases.class);
+ suite.addTest(XMLBinaryDataMappingTestSuite.suite());
+ suite.addTest(XMLBinaryDataCollectionMappingTestSuite.suite());
+
+ return suite;
+ }
}
diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/XMLMappingTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/XMLMappingTestCases.java
index 6ce7e2a..fe00ba9 100644
--- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/XMLMappingTestCases.java
+++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/XMLMappingTestCases.java
@@ -3,17 +3,17 @@
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
* which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
*
* Contributors:
* Oracle - initial API and implementation from Oracle TopLink
******************************************************************************/
package org.eclipse.persistence.testing.oxm.mappings;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.io.StringReader;
import java.io.StringWriter;
@@ -22,9 +22,9 @@ import java.util.Calendar;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
-import javax.xml.stream.XMLEventReader;
-import javax.xml.stream.XMLEventWriter;
+import javax.xml.parsers.SAXParserFactory;
+import javax.xml.stream.XMLEventReader;
+import javax.xml.stream.XMLEventWriter;
import javax.xml.stream.XMLOutputFactory;
import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
@@ -84,23 +84,23 @@ public abstract class XMLMappingTestCases extends OXTestCase {
public boolean isUnmarshalTest() {
return true;
}
-
- public void setupControlDocs() throws Exception{
- if(this.controlDocumentLocation != null) {
- InputStream inputStream = ClassLoader.getSystemResourceAsStream(controlDocumentLocation);
- resourceName = controlDocumentLocation;
- controlDocument = parser.parse(inputStream);
- if (shouldRemoveEmptyTextNodesFromControlDoc()) {
+
+ public void setupControlDocs() throws Exception{
+ if(this.controlDocumentLocation != null) {
+ InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(controlDocumentLocation);
+ resourceName = controlDocumentLocation;
+ controlDocument = parser.parse(inputStream);
+ if (shouldRemoveEmptyTextNodesFromControlDoc()) {
removeEmptyTextNodes(controlDocument);
}
inputStream.close();
- }
-
- if(this.writeControlDocumentLocation != null) {
- InputStream inputStream = ClassLoader.getSystemResourceAsStream(writeControlDocumentLocation);
- writeControlDocument = parser.parse(inputStream);
- if (shouldRemoveEmptyTextNodesFromControlDoc()) {
- removeEmptyTextNodes(writeControlDocument);
+ }
+
+ if(this.writeControlDocumentLocation != null) {
+ InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(writeControlDocumentLocation);
+ writeControlDocument = parser.parse(inputStream);
+ if (shouldRemoveEmptyTextNodesFromControlDoc()) {
+ removeEmptyTextNodes(writeControlDocument);
}
inputStream.close();
}
@@ -203,32 +203,32 @@ public abstract class XMLMappingTestCases extends OXTestCase {
}
-
- public void testXMLToObjectFromInputStream() throws Exception {
- if(isUnmarshalTest()) {
- InputStream instream = ClassLoader.getSystemResourceAsStream(resourceName);
- Object testObject = xmlUnmarshaller.unmarshal(instream);
- instream.close();
- xmlToObjectTest(testObject);
+
+ public void testXMLToObjectFromInputStream() throws Exception {
+ if(isUnmarshalTest()) {
+ InputStream instream = Thread.currentThread().getContextClassLoader().getSystemResourceAsStream(resourceName);
+ Object testObject = xmlUnmarshaller.unmarshal(instream);
+ instream.close();
+ xmlToObjectTest(testObject);
}
}
-
- public void testXMLToObjectFromNode() throws Exception {
- if(isUnmarshalTest()) {
- InputStream instream = ClassLoader.getSystemResourceAsStream(resourceName);
- Node node = parser.parse(instream);
- Object testObject = xmlUnmarshaller.unmarshal(node);
- instream.close();
+
+ public void testXMLToObjectFromNode() throws Exception {
+ if(isUnmarshalTest()) {
+ InputStream instream = Thread.currentThread().getContextClassLoader().getSystemResourceAsStream(resourceName);
+ Node node = parser.parse(instream);
+ Object testObject = xmlUnmarshaller.unmarshal(node);
+ instream.close();
xmlToObjectTest(testObject);
}
}
-
- public void testXMLToObjectFromXMLStreamReader() throws Exception {
- if(isUnmarshalTest() && null != XML_INPUT_FACTORY) {
- InputStream instream = ClassLoader.getSystemResourceAsStream(resourceName);
- XMLStreamReader xmlStreamReader = XML_INPUT_FACTORY.createXMLStreamReader(instream);
- XMLStreamReaderReader staxReader = new XMLStreamReaderReader();
- staxReader.setErrorHandler(xmlUnmarshaller.getErrorHandler());
+
+ public void testXMLToObjectFromXMLStreamReader() throws Exception {
+ if(isUnmarshalTest() && null != XML_INPUT_FACTORY) {
+ InputStream instream = Thread.currentThread().getContextClassLoader().getSystemResourceAsStream(resourceName);
+ XMLStreamReader xmlStreamReader = XML_INPUT_FACTORY.createXMLStreamReader(instream);
+ XMLStreamReaderReader staxReader = new XMLStreamReaderReader();
+ staxReader.setErrorHandler(xmlUnmarshaller.getErrorHandler());
XMLStreamReaderInputSource inputSource = new XMLStreamReaderInputSource(xmlStreamReader);
Object testObject = xmlUnmarshaller.unmarshal(staxReader, inputSource);
@@ -236,13 +236,13 @@ public abstract class XMLMappingTestCases extends OXTestCase {
xmlToObjectTest(testObject);
}
}
-
- public void testXMLToObjectFromXMLEventReader() throws Exception {
- if(isUnmarshalTest() && null != XML_INPUT_FACTORY) {
- InputStream instream = ClassLoader.getSystemResourceAsStream(resourceName);
- XMLEventReader xmlEventReader = XML_INPUT_FACTORY.createXMLEventReader(instream);
- XMLEventReaderReader staxReader = new XMLEventReaderReader();
- staxReader.setErrorHandler(xmlUnmarshaller.getErrorHandler());
+
+ public void testXMLToObjectFromXMLEventReader() throws Exception {
+ if(isUnmarshalTest() && null != XML_INPUT_FACTORY) {
+ InputStream instream = Thread.currentThread().getContextClassLoader().getSystemResourceAsStream(resourceName);
+ XMLEventReader xmlEventReader = XML_INPUT_FACTORY.createXMLEventReader(instream);
+ XMLEventReaderReader staxReader = new XMLEventReaderReader();
+ staxReader.setErrorHandler(xmlUnmarshaller.getErrorHandler());
XMLEventReaderInputSource inputSource = new XMLEventReaderInputSource(xmlEventReader);
Object testObject = xmlUnmarshaller.unmarshal(staxReader, inputSource);
@@ -273,9 +273,9 @@ public abstract class XMLMappingTestCases extends OXTestCase {
compareXMLRootObjects(controlObj, testObj);
} else {
assertEquals(getReadControlObject(), testObject);
- }
- }
-
+ }
+ }
+
public static void compareXMLRootObjects(XMLRoot controlObj, XMLRoot testObj) {
assertEquals(controlObj.getLocalName(), testObj.getLocalName());
assertEquals(controlObj.getNamespaceURI(), testObj.getNamespaceURI());
@@ -287,9 +287,9 @@ public abstract class XMLMappingTestCases extends OXTestCase {
assertEquals(controlObj.getSchemaType(), testObj.getSchemaType());
}
- public void objectToXMLDocumentTest(Document testDocument) throws Exception {
- log("**objectToXMLDocumentTest**");
- log("Expected:");
+ public void objectToXMLDocumentTest(Document testDocument) throws Exception {
+ log("**objectToXMLDocumentTest**");
+ log("Expected:");
log(getWriteControlDocument());
log("\nActual:");
log(testDocument);
@@ -625,13 +625,13 @@ public abstract class XMLMappingTestCases extends OXTestCase {
//this.assertXMLEqual(diff, true);
assertXMLIdentical(controlDocument, testDocument);
}
-
- public void testXMLToObjectFromURL() throws Exception {
- if(isUnmarshalTest()) {
- java.net.URL url = ClassLoader.getSystemResource(resourceName);
- Object testObject = xmlUnmarshaller.unmarshal(url);
- xmlToObjectTest(testObject);
- }
+
+ public void testXMLToObjectFromURL() throws Exception {
+ if(isUnmarshalTest()) {
+ java.net.URL url = Thread.currentThread().getContextClassLoader().getResource(resourceName);
+ Object testObject = xmlUnmarshaller.unmarshal(url);
+ xmlToObjectTest(testObject);
+ }
}
public void testUnmarshallerHandler() throws Exception {
@@ -641,13 +641,13 @@ public abstract class XMLMappingTestCases extends OXTestCase {
SAXParser saxParser = saxParserFactory.newSAXParser();
XMLReader xmlReader = saxParser.getXMLReader();
- XMLUnmarshallerHandler xmlUnmarshallerHandler = xmlUnmarshaller.getUnmarshallerHandler();
- xmlReader.setContentHandler(xmlUnmarshallerHandler);
-
- InputStream inputStream = ClassLoader.getSystemResourceAsStream(resourceName);
- InputSource inputSource = new InputSource(inputStream);
- xmlReader.parse(inputSource);
-
+ XMLUnmarshallerHandler xmlUnmarshallerHandler = xmlUnmarshaller.getUnmarshallerHandler();
+ xmlReader.setContentHandler(xmlUnmarshallerHandler);
+
+ InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(resourceName);
+ InputSource inputSource = new InputSource(inputStream);
+ xmlReader.parse(inputSource);
+
xmlToObjectTest(xmlUnmarshallerHandler.getResult());
}
}
@@ -751,7 +751,7 @@ public abstract class XMLMappingTestCases extends OXTestCase {
@Override
public TypeInfoProvider getTypeInfoProvider() {
return null;
- }
- }
-
-} \ No newline at end of file
+ }
+ }
+
+}
diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/advancedxpath/UnmarshalTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/advancedxpath/UnmarshalTestCases.java
index b0f27de..6be6268 100644
--- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/advancedxpath/UnmarshalTestCases.java
+++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/advancedxpath/UnmarshalTestCases.java
@@ -1,8 +1,8 @@
-/*******************************************************************************
-* Copyright (c) 1998, 2012 Oracle and/or its affiliates. All rights reserved.
-* This program and the accompanying materials are made available under the
-* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
-* which accompanies this distribution.
+/*******************************************************************************
+* Copyright (c) 1998, 2014 Oracle and/or its affiliates. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+* which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
@@ -17,12 +17,15 @@ import org.eclipse.persistence.testing.oxm.mappings.XMLMappingTestCases;
public class UnmarshalTestCases extends XMLMappingTestCases {
private static final String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/mappings/advancedxpath/unmarshal.xml";
-
- public UnmarshalTestCases(String name) throws Exception {
- super(name);
- this.setProject(new CustomerProject());
- this.setControlDocument(XML_RESOURCE);
- }
+
+ public UnmarshalTestCases(String name) throws Exception {
+ super(name);
+ if (!System.getProperties().contains("platformType")) {
+ System.setProperty("platformType", "DOM");
+ }
+ this.setProject(new CustomerProject());
+ this.setControlDocument(XML_RESOURCE);
+ }
@Override
protected Object getControlObject() {
@@ -62,7 +65,7 @@ public class UnmarshalTestCases extends XMLMappingTestCases {
}
@Override
- public void testValidatingMarshal() throws Exception {
- }
-
-} \ No newline at end of file
+ public void testValidatingMarshal() throws Exception {
+ }
+
+}
diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/choicecollection/XMLChoiceCollectionMappingMixedTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/choicecollection/XMLChoiceCollectionMappingMixedTestCases.java
index 1a64445..aa98028 100644
--- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/choicecollection/XMLChoiceCollectionMappingMixedTestCases.java
+++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/choicecollection/XMLChoiceCollectionMappingMixedTestCases.java
@@ -1,8 +1,8 @@
-/*******************************************************************************
- * Copyright (c) 1998, 2012 Oracle and/or its affiliates. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
+/*******************************************************************************
+ * Copyright (c) 1998, 2014 Oracle and/or its affiliates. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
@@ -108,15 +108,13 @@ public class XMLChoiceCollectionMappingMixedTestCases extends XMLWithJSONMapping
return project;
}
- public void testReadDeploymentXML() {
- try {
- // Read the deploymentXML-file.xml back in with XMLProjectReader
- FileReader fileReader = new FileReader(DEPLOYMENT_XML_RESOURCE);
- Project newProject = XMLProjectReader.read(fileReader);
- fileReader.close();
- XMLContext ctx = new XMLContext(newProject);
- XMLUnmarshaller unmarshaller = ctx.createUnmarshaller();
- InputStream instream = ClassLoader.getSystemResourceAsStream(XML_RESOURCE);
+ public void testReadDeploymentXML() {
+ try {
+ // Read the deploymentXML-file.xml back in with XMLProjectReader
+ Project newProject = XMLProjectReader.read(DEPLOYMENT_XML_RESOURCE, Thread.currentThread().getContextClassLoader());
+ XMLContext ctx = new XMLContext(newProject);
+ XMLUnmarshaller unmarshaller = ctx.createUnmarshaller();
+ InputStream instream = ClassLoader.getSystemResourceAsStream(XML_RESOURCE);
Employee emp = (Employee) unmarshaller.unmarshal(instream);
instream.close();
Object[] choices = emp.choice.toArray();
diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/choicecollection/XMLChoiceCollectionWithGroupingElementTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/choicecollection/XMLChoiceCollectionWithGroupingElementTestCases.java
index 587093d..dfd1e78 100644
--- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/choicecollection/XMLChoiceCollectionWithGroupingElementTestCases.java
+++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/mappings/choicecollection/XMLChoiceCollectionWithGroupingElementTestCases.java
@@ -1,8 +1,8 @@
-/*******************************************************************************
- * Copyright (c) 1998, 2012 Oracle and/or its affiliates. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
+/*******************************************************************************
+ * Copyright (c) 1998, 2014 Oracle and/or its affiliates. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
@@ -79,15 +79,13 @@ public class XMLChoiceCollectionWithGroupingElementTestCases extends XMLWithJSON
return project;
}
- public void testReadDeploymentXML() {
- try {
- // Read the deploymentXML-file.xml back in with XMLProjectReader
- FileReader fileReader = new FileReader(DEPLOYMENT_XML_RESOURCE);
- Project newProject = XMLProjectReader.read(fileReader);
- fileReader.close();
- XMLContext ctx = new XMLContext(newProject);
- XMLUnmarshaller unmarshaller = ctx.createUnmarshaller();
- InputStream instream = ClassLoader.getSystemResourceAsStream(XML_RESOURCE);
+ public void testReadDeploymentXML() {
+ try {
+ // Read the deploymentXML-file.xml back in with XMLProjectReader
+ Project newProject = XMLProjectReader.read(DEPLOYMENT_XML_RESOURCE, Thread.currentThread().getContextClassLoader());
+ XMLContext ctx = new XMLContext(newProject);
+ XMLUnmarshaller unmarshaller = ctx.createUnmarshaller();
+ InputStream instream = ClassLoader.getSystemResourceAsStream(XML_RESOURCE);
Employee emp = (Employee) unmarshaller.unmarshal(instream);
instream.close();
Object[] choices = emp.choice.toArray();
diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/platform/PlatformCreateDocumentTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/platform/PlatformCreateDocumentTestCases.java
index ea34ee8..7caa5f8 100644
--- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/platform/PlatformCreateDocumentTestCases.java
+++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/platform/PlatformCreateDocumentTestCases.java
@@ -1,8 +1,8 @@
-/*******************************************************************************
- * Copyright (c) 1998, 2012 Oracle and/or its affiliates. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
+/*******************************************************************************
+ * Copyright (c) 1998, 2014 Oracle and/or its affiliates. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
@@ -202,12 +202,15 @@ public class PlatformCreateDocumentTestCases extends OXTestCase {
fail("A platform exception should have been thrown but wasn't");
}
- public void testCreateNullXMLPlatform() throws Exception {
- Class originalClass = XMLPlatformFactory.getInstance().getXMLPlatformClass();
- String originalPlatform = System.getProperty("eclipselink.xml.platform");
- XMLPlatformFactory.getInstance().setXMLPlatformClass(null);
- try {
- System.getProperties().remove("eclipselink.xml.platform");
+ public void testCreateNullXMLPlatform() throws Exception {
+ Class originalClass = XMLPlatformFactory.getInstance().getXMLPlatformClass();
+ String originalPlatform = System.getProperty("eclipselink.xml.platform");
+ if (null == originalPlatform) {
+ originalPlatform = "org.eclipse.persistence.platform.xml.jaxp.JAXPPlatform";
+ }
+ XMLPlatformFactory.getInstance().setXMLPlatformClass(null);
+ try {
+ System.getProperties().remove("eclipselink.xml.platform");
XMLPlatform xmlPlatform = XMLPlatformFactory.getInstance().getXMLPlatform();
assertEquals("The platform class should have been the default JAXPPlatform", XMLPlatformFactory.getInstance().getXMLPlatformClass().getName(), XMLPlatformFactory.JAXP_PLATFORM_CLASS_NAME);
} catch (NoClassDefFoundError e) {
diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/readonly/DirectMappingTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/readonly/DirectMappingTestCases.java
index 8990b66..5945b88 100644
--- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/readonly/DirectMappingTestCases.java
+++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/readonly/DirectMappingTestCases.java
@@ -3,27 +3,30 @@
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
* which accompanies this distribution.
- * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
- * and the Eclipse Distribution License is available at
- * http://www.eclipse.org/org/documents/edl-v10.php.
+ * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
+ * and the Eclipse Distribution License is available at
+ * http://www.eclipse.org/org/documents/edl-v10.php.
*
* Contributors:
* Oracle - initial API and implementation from Oracle TopLink
******************************************************************************/
package org.eclipse.persistence.testing.oxm.readonly;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.transform.dom.DOMResult;
-import org.eclipse.persistence.exceptions.IntegrityException;
-import org.eclipse.persistence.oxm.platform.DOMPlatform;
-import org.eclipse.persistence.oxm.*;
-import org.eclipse.persistence.testing.oxm.*;
-import java.util.*;
-import java.io.*;
-import org.w3c.dom.Document;
-
-public class DirectMappingTestCases extends OXTestCase {
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.transform.dom.DOMResult;
+
+import org.eclipse.persistence.exceptions.IntegrityException;
+import org.eclipse.persistence.oxm.platform.DOMPlatform;
+import org.eclipse.persistence.oxm.*;
+import org.eclipse.persistence.testing.oxm.*;
+
+import java.util.*;
+import java.io.*;
+
+import org.w3c.dom.Document;
+
+public class DirectMappingTestCases extends OXTestCase {
private DocumentBuilder parser;
public DirectMappingTestCases() {
@@ -39,13 +42,13 @@ public class DirectMappingTestCases extends OXTestCase {
public void testOneAttributeNoDocumentPres() throws Exception {
OneDirectMappingProject project = new OneDirectMappingProject();
XMLContext context = getXMLContext(project);
- XMLMarshaller marshaller = context.createMarshaller();
- XMLUnmarshaller unmarshaller = context.createUnmarshaller();
-
- InputStream in = getClass().getClassLoader().getResourceAsStream("org/eclipse/persistence/testing/oxm/readonly/employee.xml");
- Employee emp = (Employee)unmarshaller.unmarshal(in);
- if (emp.firstName == null) {
- fail("read only attribute was not set on a read");
+ XMLMarshaller marshaller = context.createMarshaller();
+ XMLUnmarshaller unmarshaller = context.createUnmarshaller();
+
+ InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream("org/eclipse/persistence/testing/oxm/readonly/employee.xml");
+ Employee emp = (Employee)unmarshaller.unmarshal(in);
+ if (emp.firstName == null) {
+ fail("read only attribute was not set on a read");
}
emp.firstName = "Bill";
@@ -59,9 +62,9 @@ public class DirectMappingTestCases extends OXTestCase {
OneDirectMappingProject project = new OneDirectMappingProject();
XMLDescriptor desc = (XMLDescriptor)project.getDescriptor(Employee.class);
desc.setShouldPreserveDocument(true);
- DOMPlatform platform = new DOMPlatform();
- project.setLogin(new XMLLogin(platform));
- XMLContext context = getXMLContext(project);
+ DOMPlatform platform = new DOMPlatform();
+ project.setLogin(new XMLLogin(platform));
+ XMLContext context = getXMLContext(project);
XMLMarshaller marshaller = context.createMarshaller();
XMLUnmarshaller unmarshaller = context.createUnmarshaller();
@@ -69,9 +72,9 @@ public class DirectMappingTestCases extends OXTestCase {
Employee emp = (Employee)unmarshaller.unmarshal(in);
if (emp.firstName == null) {
fail("read only attribute was not set on a read");
- }
-
- emp.firstName = "Bill";
+ }
+
+ emp.firstName = "Bill";
Document controlDocument = parse("org/eclipse/persistence/testing/oxm/readonly/directemployee1.xml");
Document resultDocument = marshaller.objectToXML(emp);
@@ -80,9 +83,9 @@ public class DirectMappingTestCases extends OXTestCase {
this.assertXMLIdentical(controlDocument, resultDocument);
}
- public void testTwoAttributesOneReadOnly() throws Exception {
- TwoDirectMappingProject project = new TwoDirectMappingProject();
- XMLContext context = getXMLContext(project);
+ public void testTwoAttributesOneReadOnly() throws Exception {
+ TwoDirectMappingProject project = new TwoDirectMappingProject();
+ XMLContext context = getXMLContext(project);
XMLMarshaller marshaller = context.createMarshaller();
XMLUnmarshaller unmarshaller = context.createUnmarshaller();
@@ -90,9 +93,9 @@ public class DirectMappingTestCases extends OXTestCase {
Employee emp = (Employee)unmarshaller.unmarshal(in);
if (emp.firstName == null) {
fail("read only attribute was not set on a read");
- }
-
- emp.firstName = "Bill";
+ }
+
+ emp.firstName = "Bill";
emp.firstName2 = "Hank";
Document controlDocument = parse("org/eclipse/persistence/testing/oxm/readonly/directemployee2.xml");
@@ -110,9 +113,9 @@ public class DirectMappingTestCases extends OXTestCase {
mapping.readWrite();
XMLContext context = getXMLContext(project);
- fail("No Exception was thrown with 2 writeable mappings to the same field");
- } catch (IntegrityException ex) {
- }
+ fail("No Exception was thrown with 2 writeable mappings to the same field");
+ } catch (IntegrityException ex) {
+ }
}*/
private Document parse(String resource) throws Exception {
@@ -120,5 +123,5 @@ public class DirectMappingTestCases extends OXTestCase {
Document document = parser.parse(stream);
removeEmptyTextNodes(document);
return document;
- }
-}
+ }
+}
diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/schemamodelgenerator/GenerateSchemaTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/schemamodelgenerator/GenerateSchemaTestCases.java
index 8f10d54..7d72124 100644
--- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/schemamodelgenerator/GenerateSchemaTestCases.java
+++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/schemamodelgenerator/GenerateSchemaTestCases.java
@@ -1,8 +1,8 @@
-/*******************************************************************************
-* Copyright (c) 1998, 2012 Oracle and/or its affiliates. All rights reserved.
-* This program and the accompanying materials are made available under the
-* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
-* which accompanies this distribution.
+/*******************************************************************************
+* Copyright (c) 1998, 2014 Oracle and/or its affiliates. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+* which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
@@ -176,13 +176,13 @@ public class GenerateSchemaTestCases extends TestCase {
* @return
* @see Document
*/
- protected Document getDocument(String xsdResource) {
- Document document = null;
- try {
- InputStream inputStream = ClassLoader.getSystemResourceAsStream(xsdResource);
- document = parser.parse(inputStream);
- removeEmptyTextNodes(document);
- inputStream.close();
+ protected Document getDocument(String xsdResource) {
+ Document document = null;
+ try {
+ InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(xsdResource);
+ document = parser.parse(inputStream);
+ removeEmptyTextNodes(document);
+ inputStream.close();
} catch (Exception x) {
x.printStackTrace();
}
diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/schemamodelgenerator/mappings/pathbased/PathbasedMappingTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/schemamodelgenerator/mappings/pathbased/PathbasedMappingTestCases.java
index 7ece2ba..2a490d6 100644
--- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/schemamodelgenerator/mappings/pathbased/PathbasedMappingTestCases.java
+++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/schemamodelgenerator/mappings/pathbased/PathbasedMappingTestCases.java
@@ -1,8 +1,8 @@
-/*******************************************************************************
-* Copyright (c) 1998, 2012 Oracle and/or its affiliates. All rights reserved.
-* This program and the accompanying materials are made available under the
-* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
-* which accompanies this distribution.
+/*******************************************************************************
+* Copyright (c) 1998, 2014 Oracle and/or its affiliates. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+* which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
@@ -60,13 +60,13 @@ public class PathbasedMappingTestCases extends GenerateSchemaTestCases {
boolean exception = false;
String msg = null;
try {
- SchemaModelGeneratorProperties props = new SchemaModelGeneratorProperties();
- props.addProperty(MYNS, SchemaModelGeneratorProperties.ELEMENT_FORM_QUALIFIED_KEY, false);
-
- XMLContext xCtx = new XMLContext("org.eclipse.persistence.testing.oxm.schemamodelgenerator.mappings.pathbased");
- Project prj = xCtx.getSession(0).getProject();
- loginProject(prj);
-
+ SchemaModelGeneratorProperties props = new SchemaModelGeneratorProperties();
+ props.addProperty(MYNS, SchemaModelGeneratorProperties.ELEMENT_FORM_QUALIFIED_KEY, false);
+
+ XMLContext xCtx = new XMLContext("org.eclipse.persistence.testing.oxm.schemamodelgenerator.mappings.pathbased", Thread.currentThread().getContextClassLoader());
+ Project prj = xCtx.getSession(0).getProject();
+ loginProject(prj);
+
List<Descriptor> descriptorsToProcess = setupDescriptorList(prj);
Map<String, Schema> generatedSchemas = sg.generateSchemas(descriptorsToProcess, props);
@@ -80,15 +80,18 @@ public class PathbasedMappingTestCases extends GenerateSchemaTestCases {
assertNotNull("Schema to Document conversion failed", tDoc);
assertNotNull("A problem occurred loading the control schema", cDoc);
- assertTrue("Schema comparsion failed", comparer.isSchemaEqual(cDoc, tDoc));
-
- SchemaFactory sFact = SchemaFactory.newInstance(javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI);
- javax.xml.validation.Schema theSchema = sFact.newSchema(new File(TMP_DIR + "generatedSchema.xsd"));
- Validator validator = theSchema.newValidator();
- StreamSource ss = new StreamSource(new File(XML_RESOURCE));
- validator.validate(ss);
- } catch (Exception ex) {
- exception = true;
+ assertTrue("Schema comparsion failed", comparer.isSchemaEqual(cDoc, tDoc));
+
+ SchemaFactory sFact = SchemaFactory.newInstance(javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI);
+
+ File schemaFile = new File(TMP_DIR + "generatedSchema.xsd");
+
+ javax.xml.validation.Schema theSchema = sFact.newSchema(schemaFile);
+ Validator validator = theSchema.newValidator();
+ StreamSource ss = new StreamSource(new File(Thread.currentThread().getContextClassLoader().getResource(XML_RESOURCE).toURI()));
+ validator.validate(ss);
+ } catch (Exception ex) {
+ exception = true;
msg = ex.toString();
ex.printStackTrace();
}
diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/schemareference/XMLSchemaReferenceTestSuite.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/schemareference/XMLSchemaReferenceTestSuite.java
index e191950..85299de 100644
--- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/schemareference/XMLSchemaReferenceTestSuite.java
+++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/schemareference/XMLSchemaReferenceTestSuite.java
@@ -1,8 +1,8 @@
-/*******************************************************************************
- * Copyright (c) 1998, 2012 Oracle and/or its affiliates. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
+/*******************************************************************************
+ * Copyright (c) 1998, 2014 Oracle and/or its affiliates. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
@@ -27,12 +27,15 @@ public class XMLSchemaReferenceTestSuite extends TestCase {
junit.textui.TestRunner.main(new String[] { "-c", "org.eclipse.persistence.testing.oxm.schemareference.XMLSchemaReferenceTestSuite" });
}
- public static Test suite() {
- TestSuite suite = new TestSuite("XMLSchemaReference Test Suite");
- String platform = System.getProperty("eclipselink.xml.platform");
- boolean jaxpPlatform = platform.equalsIgnoreCase("org.eclipse.persistence.platform.xml.jaxp.JAXPPlatform");
-
- if (!jaxpPlatform) {
+ public static Test suite() {
+ TestSuite suite = new TestSuite("XMLSchemaReference Test Suite");
+ String platform = System.getProperty("eclipselink.xml.platform");
+ if (null == platform) {
+ platform = "org.eclipse.persistence.platform.xml.jaxp.JAXPPlatform";
+ }
+ boolean jaxpPlatform = platform.equalsIgnoreCase("org.eclipse.persistence.platform.xml.jaxp.JAXPPlatform");
+
+ if (!jaxpPlatform) {
suite.addTestSuite(XMLSchemaURLReferenceTests.class);
suite.addTestSuite(XMLSchemaFileReferenceTests.class);
suite.addTestSuite(XMLSchemaCPReferenceTests.class);
diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/xmlmarshaller/XMLMarshallerTestSuite.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/xmlmarshaller/XMLMarshallerTestSuite.java
index ec2e4cd..bd3ac72 100644
--- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/xmlmarshaller/XMLMarshallerTestSuite.java
+++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/xmlmarshaller/XMLMarshallerTestSuite.java
@@ -1,8 +1,8 @@
-/*******************************************************************************
- * Copyright (c) 1998, 2012 Oracle and/or its affiliates. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
+/*******************************************************************************
+ * Copyright (c) 1998, 2014 Oracle and/or its affiliates. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
@@ -26,12 +26,15 @@ public class XMLMarshallerTestSuite extends TestCase {
super(name);
}
- public static Test suite() {
- TestSuite suite = new TestSuite("XMLMarshaller Test Suite");
- String platform = System.getProperty("eclipselink.xml.platform");
- boolean jaxpPlatform = platform.equalsIgnoreCase("org.eclipse.persistence.platform.xml.jaxp.JAXPPlatform");
-
- suite.addTestSuite(XMLMarshallerCreateTestCases.class);
+ public static Test suite() {
+ TestSuite suite = new TestSuite("XMLMarshaller Test Suite");
+ String platform = System.getProperty("eclipselink.xml.platform");
+ if (null == platform) {
+ platform = "org.eclipse.persistence.platform.xml.jaxp.JAXPPlatform";
+ }
+ boolean jaxpPlatform = platform.equalsIgnoreCase("org.eclipse.persistence.platform.xml.jaxp.JAXPPlatform");
+
+ suite.addTestSuite(XMLMarshallerCreateTestCases.class);
suite.addTestSuite(XMLMarshalTestCases.class);
suite.addTestSuite(XMLMarshalNSTestCases.class);
suite.addTestSuite(XMLMarshalExceptionTestCases.class);
diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/xmlmarshaller/setschemas/SetXmlSchemaTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/xmlmarshaller/setschemas/SetXmlSchemaTestCases.java
index 987b1e2..a6b2553 100644
--- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/xmlmarshaller/setschemas/SetXmlSchemaTestCases.java
+++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/xmlmarshaller/setschemas/SetXmlSchemaTestCases.java
@@ -1,19 +1,20 @@
-/** Copyright (c) 1998, 2012 Oracle and/or its affiliates. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
+/** Copyright (c) 1998, 2014 Oracle and/or its affiliates. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* Contributors:
* Oracle - initial API and implementation from Oracle TopLink
- ******************************************************************************/
-package org.eclipse.persistence.testing.oxm.xmlmarshaller.setschemas;
-
-import java.net.URL;
-
-import javax.xml.validation.Schema;
+ ******************************************************************************/
+package org.eclipse.persistence.testing.oxm.xmlmarshaller.setschemas;
+
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import javax.xml.validation.Schema;
import javax.xml.validation.SchemaFactory;
import org.eclipse.persistence.exceptions.XMLMarshalException;
@@ -40,44 +41,46 @@ public class SetXmlSchemaTestCases extends OXTestCase {
xmlContext = getXMLContext(project);
xmlUnmarshaller = xmlContext.createUnmarshaller();
xmlUnmarshaller.setErrorHandler(new MyErrorHandler());
-
- SchemaFactory schemaFactory = SchemaFactory.newInstance(javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI);
- try {
- schema = schemaFactory.newSchema(new java.io.File(XML_SCHEMA_RESOURCE));
- } catch(SAXException ex) {
- throw new RuntimeException(ex);
- }
- }
-
- public void testInvalidFile() {
- URL url = ClassLoader.getSystemResource(INVALID_XML_RESOURCE);
- xmlUnmarshaller.unmarshal(url);
- }
-
+
+ SchemaFactory schemaFactory = SchemaFactory.newInstance(javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI);
+ try {
+ schema = schemaFactory.newSchema(new java.io.File(Thread.currentThread().getContextClassLoader().getResource(XML_SCHEMA_RESOURCE).toURI()));
+ } catch(SAXException ex) {
+ throw new RuntimeException(ex);
+ } catch (URISyntaxException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public void testInvalidFile() {
+ URL url = Thread.currentThread().getContextClassLoader().getResource(INVALID_XML_RESOURCE);
+ xmlUnmarshaller.unmarshal(url);
+ }
+
public void testValidateInvalidFile() {
- boolean wasExceptionCaught = false;
- try {
- xmlUnmarshaller.setSchema(schema);
- URL url = ClassLoader.getSystemResource(INVALID_XML_RESOURCE);
- xmlUnmarshaller.unmarshal(url);
- } catch (Exception e) {
- wasExceptionCaught = true;
+ boolean wasExceptionCaught = false;
+ try {
+ xmlUnmarshaller.setSchema(schema);
+ URL url = Thread.currentThread().getContextClassLoader().getResource(INVALID_XML_RESOURCE);
+ xmlUnmarshaller.unmarshal(url);
+ } catch (Exception e) {
+ wasExceptionCaught = true;
}
assertTrue("An exception should have been thrown.", wasExceptionCaught);
- }
-
- public void testValidFile() {
- URL url = ClassLoader.getSystemResource(VALID_XML_RESOURCE);
- xmlUnmarshaller.unmarshal(url);
- }
-
- public void testValidateValidFile() {
- try {
- xmlUnmarshaller.setSchema(schema);
- URL url = ClassLoader.getSystemResource(VALID_XML_RESOURCE);
- xmlUnmarshaller.unmarshal(url);
- } catch(UnsupportedOperationException uoe) {
- } catch(XMLMarshalException xme) {
+ }
+
+ public void testValidFile() {
+ URL url = Thread.currentThread().getContextClassLoader().getResource(VALID_XML_RESOURCE);
+ xmlUnmarshaller.unmarshal(url);
+ }
+
+ public void testValidateValidFile() {
+ try {
+ xmlUnmarshaller.setSchema(schema);
+ URL url = Thread.currentThread().getContextClassLoader().getResource(VALID_XML_RESOURCE);
+ xmlUnmarshaller.unmarshal(url);
+ } catch(UnsupportedOperationException uoe) {
+ } catch(XMLMarshalException xme) {
//if the parser doesn't support the setSchema API, this is a valid outcome
//for the test.
}
diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/xmlmarshaller/structureValidation/StructureValidationTestSuite.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/xmlmarshaller/structureValidation/StructureValidationTestSuite.java
index a739e6b..86fb09c 100644
--- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/xmlmarshaller/structureValidation/StructureValidationTestSuite.java
+++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/xmlmarshaller/structureValidation/StructureValidationTestSuite.java
@@ -1,8 +1,8 @@
-/*******************************************************************************
- * Copyright (c) 1998, 2012 Oracle and/or its affiliates. All rights reserved.
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
- * which accompanies this distribution.
+/*******************************************************************************
+ * Copyright (c) 1998, 2014 Oracle and/or its affiliates. All rights reserved.
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+ * which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
@@ -28,12 +28,15 @@ public class StructureValidationTestSuite extends TestCase {
super(name);
}
- public static Test suite() {
- TestSuite suite = new TestSuite("Structure Validation Test Suite");
- String platform = System.getProperty("eclipselink.xml.platform");
- boolean jaxpPlatform = platform.equalsIgnoreCase("org.eclipse.persistence.platform.xml.jaxp.JAXPPlatform");
- if (!jaxpPlatform) {
- suite.addTestSuite(ChoiceTestCases.class);
+ public static Test suite() {
+ TestSuite suite = new TestSuite("Structure Validation Test Suite");
+ String platform = System.getProperty("eclipselink.xml.platform");
+ if (null == platform) {
+ platform = "org.eclipse.persistence.platform.xml.jaxp.JAXPPlatform";
+ }
+ boolean jaxpPlatform = platform.equalsIgnoreCase("org.eclipse.persistence.platform.xml.jaxp.JAXPPlatform");
+ if (!jaxpPlatform) {
+ suite.addTestSuite(ChoiceTestCases.class);
suite.addTestSuite(GroupTestCases.class);
suite.addTestSuite(GroupWithNestedGroupTestCases.class);
suite.addTestSuite(GroupWithNestedSequenceTestCases.class);
diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/xmlroot/nil/XMLRootNilForceWrapTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/xmlroot/nil/XMLRootNilForceWrapTestCases.java
index 1e07a72..4bcb4bb 100644
--- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/xmlroot/nil/XMLRootNilForceWrapTestCases.java
+++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/xmlroot/nil/XMLRootNilForceWrapTestCases.java
@@ -1,8 +1,8 @@
-/*******************************************************************************
-* Copyright (c) 1998, 2012 Oracle and/or its affiliates. All rights reserved.
-* This program and the accompanying materials are made available under the
-* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
-* which accompanies this distribution.
+/*******************************************************************************
+* Copyright (c) 1998, 2014 Oracle and/or its affiliates. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+* which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
@@ -10,31 +10,35 @@
* Contributors:
* bdoughan - July 7/2009 - 2.0 - Initial implementation
******************************************************************************/
-package org.eclipse.persistence.testing.oxm.xmlroot.nil;
-
-import org.eclipse.persistence.oxm.XMLRoot;
-import org.eclipse.persistence.testing.oxm.mappings.XMLMappingTestCases;
-
-public class XMLRootNilForceWrapTestCases extends XMLMappingTestCases {
-
- private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/xmlroot/nil/nil.xml";
-
- public void setUp() throws Exception {
- super.setUp();
- this.xmlUnmarshaller.setResultAlwaysXMLRoot(true);
- }
-
- public XMLRootNilForceWrapTestCases(String name) throws Exception {
- super(name);
- setControlDocument(XML_RESOURCE);
- setProject(new NilProject());
+package org.eclipse.persistence.testing.oxm.xmlroot.nil;
+
+import org.eclipse.persistence.oxm.XMLRoot;
+import org.eclipse.persistence.testing.oxm.OXTestCase;
+import org.eclipse.persistence.testing.oxm.mappings.XMLMappingTestCases;
+
+public class XMLRootNilForceWrapTestCases extends XMLMappingTestCases {
+
+ private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/xmlroot/nil/nil.xml";
+
+ public void setUp() throws Exception {
+ super.setUp();
+ this.xmlUnmarshaller.setResultAlwaysXMLRoot(true);
}
+
+ public XMLRootNilForceWrapTestCases(String name) throws Exception {
+ super(name);
+ if (null == System.getProperty(OXTestCase.PLATFORM_KEY)) {
+ System.setProperty(OXTestCase.PLATFORM_KEY, OXTestCase.PLATFORM_DOM);
+ }
+ setControlDocument(XML_RESOURCE);
+ setProject(new NilProject());
+ }
public Object getControlObject() {
XMLRoot xmlRoot = new XMLRoot();
xmlRoot.setLocalName("bar");
- xmlRoot.setNamespaceURI("urn:foo");
- return xmlRoot;
- }
-
+ xmlRoot.setNamespaceURI("urn:foo");
+ return xmlRoot;
+ }
+
} \ No newline at end of file
diff --git a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/xmlroot/nil/XMLRootNilTestCases.java b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/xmlroot/nil/XMLRootNilTestCases.java
index 25fd540..311c594 100644
--- a/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/xmlroot/nil/XMLRootNilTestCases.java
+++ b/moxy/eclipselink.moxy.test/src/org/eclipse/persistence/testing/oxm/xmlroot/nil/XMLRootNilTestCases.java
@@ -1,8 +1,8 @@
-/*******************************************************************************
-* Copyright (c) 1998, 2012 Oracle and/or its affiliates. All rights reserved.
-* This program and the accompanying materials are made available under the
-* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
-* which accompanies this distribution.
+/*******************************************************************************
+* Copyright (c) 1998, 2014 Oracle and/or its affiliates. All rights reserved.
+* This program and the accompanying materials are made available under the
+* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
+* which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
@@ -10,31 +10,36 @@
* Contributors:
* bdoughan - July 7/2009 - 2.0 - Initial implementation
******************************************************************************/
-package org.eclipse.persistence.testing.oxm.xmlroot.nil;
-
-import org.eclipse.persistence.oxm.XMLRoot;
-import org.eclipse.persistence.testing.oxm.mappings.XMLMappingTestCases;
-
-public class XMLRootNilTestCases extends XMLMappingTestCases {
+package org.eclipse.persistence.testing.oxm.xmlroot.nil;
+
+import org.eclipse.persistence.oxm.XMLRoot;
+import org.eclipse.persistence.testing.oxm.OXTestCase;
+import org.eclipse.persistence.testing.oxm.mappings.XMLMappingTestCases;
+
+public class XMLRootNilTestCases extends XMLMappingTestCases {
private final static String XML_RESOURCE = "org/eclipse/persistence/testing/oxm/xmlroot/nil/nil.xml";
-
- public XMLRootNilTestCases(String name) throws Exception {
- super(name);
- setControlDocument(XML_RESOURCE);
- setProject(new NilProject());
- }
+
+ public XMLRootNilTestCases(String name) throws Exception {
+ super(name);
+ if (null == System.getProperty(OXTestCase.PLATFORM_KEY)) {
+ System.setProperty(OXTestCase.PLATFORM_KEY, OXTestCase.PLATFORM_DOM);
+ }
+ setControlDocument(XML_RESOURCE);
+ setProject(new NilProject());
+ }
@Override
public Object getReadControlObject() {
- return null;
- }
-
- public Object getControlObject() {
- XMLRoot xmlRoot = new XMLRoot();
- xmlRoot.setLocalName("bar");
+ return null;
+ }
+
+ @Override
+ public Object getControlObject() {
+ XMLRoot xmlRoot = new XMLRoot();
+ xmlRoot.setLocalName("bar");
xmlRoot.setNamespaceURI("urn:foo");
- return xmlRoot;
- }
-
-} \ No newline at end of file
+ return xmlRoot;
+ }
+
+}