You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by he...@apache.org on 2014/01/13 20:48:37 UTC

git commit: [XMLJSON] KISSed test data loading code.

Updated Branches:
  refs/heads/master 126ae0088 -> 735595e54


[XMLJSON] KISSed test data loading code.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/735595e5
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/735595e5
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/735595e5

Branch: refs/heads/master
Commit: 735595e54e63d2ea2e00ef1450dd05bf8dc77e4e
Parents: 126ae00
Author: Henryk Konsek <he...@gmail.com>
Authored: Mon Jan 13 20:48:18 2014 +0100
Committer: Henryk Konsek <he...@gmail.com>
Committed: Mon Jan 13 20:48:18 2014 +0100

----------------------------------------------------------------------
 .../xmljson/SpringXmlJsonDataFormatTest.java        |  4 ++--
 .../dataformat/xmljson/XmlJsonDataFormatTest.java   | 16 ++++++++--------
 2 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/735595e5/components/camel-xmljson/src/test/java/org/apache/camel/dataformat/xmljson/SpringXmlJsonDataFormatTest.java
----------------------------------------------------------------------
diff --git a/components/camel-xmljson/src/test/java/org/apache/camel/dataformat/xmljson/SpringXmlJsonDataFormatTest.java b/components/camel-xmljson/src/test/java/org/apache/camel/dataformat/xmljson/SpringXmlJsonDataFormatTest.java
index 0110d33..6aaecb3 100644
--- a/components/camel-xmljson/src/test/java/org/apache/camel/dataformat/xmljson/SpringXmlJsonDataFormatTest.java
+++ b/components/camel-xmljson/src/test/java/org/apache/camel/dataformat/xmljson/SpringXmlJsonDataFormatTest.java
@@ -35,7 +35,7 @@ public class SpringXmlJsonDataFormatTest extends CamelSpringTestSupport {
 
     @Test
     public void testMarshalAndUnmarshal() throws Exception {
-        InputStream inStream = getClass().getClassLoader().getResourceAsStream("org/apache/camel/dataformat/xmljson/testMessage1.xml");
+        InputStream inStream = getClass().getResourceAsStream("testMessage1.xml");
         String in = context.getTypeConverter().convertTo(String.class, inStream);
 
         MockEndpoint mockJSON = getMockEndpoint("mock:json");
@@ -59,7 +59,7 @@ public class SpringXmlJsonDataFormatTest extends CamelSpringTestSupport {
 
     @Test
     public void testSomeOptionsToXML() throws Exception {
-        InputStream inStream = getClass().getClassLoader().getResourceAsStream("org/apache/camel/dataformat/xmljson/testMessage1.json");
+        InputStream inStream = getClass().getResourceAsStream("testMessage1.json");
         String in = context.getTypeConverter().convertTo(String.class, inStream);
 
         MockEndpoint mockXML = getMockEndpoint("mock:xmlWithOptions");

http://git-wip-us.apache.org/repos/asf/camel/blob/735595e5/components/camel-xmljson/src/test/java/org/apache/camel/dataformat/xmljson/XmlJsonDataFormatTest.java
----------------------------------------------------------------------
diff --git a/components/camel-xmljson/src/test/java/org/apache/camel/dataformat/xmljson/XmlJsonDataFormatTest.java b/components/camel-xmljson/src/test/java/org/apache/camel/dataformat/xmljson/XmlJsonDataFormatTest.java
index 369376e..6c4b19f 100644
--- a/components/camel-xmljson/src/test/java/org/apache/camel/dataformat/xmljson/XmlJsonDataFormatTest.java
+++ b/components/camel-xmljson/src/test/java/org/apache/camel/dataformat/xmljson/XmlJsonDataFormatTest.java
@@ -41,7 +41,7 @@ public class XmlJsonDataFormatTest extends CamelTestSupport {
 
     @Test
     public void testMarshalAndUnmarshal() throws Exception {
-        InputStream inStream = getClass().getClassLoader().getResourceAsStream("org/apache/camel/dataformat/xmljson/testMessage1.xml");
+        InputStream inStream = getClass().getResourceAsStream("testMessage1.xml");
         String in = context.getTypeConverter().convertTo(String.class, inStream);
 
         MockEndpoint mockJSON = getMockEndpoint("mock:json");
@@ -65,7 +65,7 @@ public class XmlJsonDataFormatTest extends CamelTestSupport {
 
     @Test
     public void testUnmarshalJSONObject() throws Exception {
-        InputStream inStream = getClass().getClassLoader().getResourceAsStream("org/apache/camel/dataformat/xmljson/testMessage1.json");
+        InputStream inStream = getClass().getResourceAsStream("testMessage1.json");
         String in = context.getTypeConverter().convertTo(String.class, inStream);
         JSON json = JSONSerializer.toJSON(in);
 
@@ -82,11 +82,11 @@ public class XmlJsonDataFormatTest extends CamelTestSupport {
 
     @Test
     public void testMarshalXMLSources() throws Exception {
-        InputStream inStream = getClass().getClassLoader().getResourceAsStream("org/apache/camel/dataformat/xmljson/testMessage1.xml");
+        InputStream inStream = getClass().getResourceAsStream("testMessage1.xml");
         DOMSource inDOM = context.getTypeConverter().convertTo(DOMSource.class, inStream);
-        inStream = getClass().getClassLoader().getResourceAsStream("org/apache/camel/dataformat/xmljson/testMessage1.xml");
+        inStream = getClass().getResourceAsStream("testMessage1.xml");
         SAXSource inSAX = context.getTypeConverter().convertTo(SAXSource.class, inStream);
-        inStream = getClass().getClassLoader().getResourceAsStream("org/apache/camel/dataformat/xmljson/testMessage1.xml");
+        inStream = getClass().getResourceAsStream("testMessage1.xml");
         Document inDocument = context.getTypeConverter().convertTo(Document.class, inStream);
 
         // save the expected body of the message to set it later
@@ -114,7 +114,7 @@ public class XmlJsonDataFormatTest extends CamelTestSupport {
     
     @Test
     public void testMarshalAndUnmarshalInline() throws Exception {
-        InputStream inStream = getClass().getClassLoader().getResourceAsStream("org/apache/camel/dataformat/xmljson/testMessage1.xml");
+        InputStream inStream = getClass().getResourceAsStream("testMessage1.xml");
         String in = context.getTypeConverter().convertTo(String.class, inStream);
 
         MockEndpoint mockJSON = getMockEndpoint("mock:jsonInline");
@@ -138,7 +138,7 @@ public class XmlJsonDataFormatTest extends CamelTestSupport {
     
     @Test
     public void testNamespacesDroppedInlineWithOptions() throws Exception {
-        InputStream inStream = getClass().getClassLoader().getResourceAsStream("org/apache/camel/dataformat/xmljson/testMessage2-namespaces.xml");
+        InputStream inStream = getClass().getResourceAsStream("testMessage2-namespaces.xml");
         String in = context.getTypeConverter().convertTo(String.class, inStream);
 
         MockEndpoint mockJSON = getMockEndpoint("mock:jsonInlineOptions");
@@ -162,7 +162,7 @@ public class XmlJsonDataFormatTest extends CamelTestSupport {
     
     @Test
     public void testUnmarshalToXMLInlineOptions() throws Exception {
-        InputStream inStream = getClass().getClassLoader().getResourceAsStream("org/apache/camel/dataformat/xmljson/testMessage1.json");
+        InputStream inStream = getClass().getResourceAsStream("testMessage1.json");
         String in = context.getTypeConverter().convertTo(String.class, inStream);
 
         MockEndpoint mockXML = getMockEndpoint("mock:xmlInlineOptions");