http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/09d2d0a3/juneau-core/src/test/java/org/apache/juneau/urlencoding/Common_UrlEncodingTest.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/test/java/org/apache/juneau/urlencoding/Common_UrlEncodingTest.java b/juneau-core/src/test/java/org/apache/juneau/urlencoding/Common_UrlEncodingTest.java index 32fce84..fb7a1e8 100755 --- a/juneau-core/src/test/java/org/apache/juneau/urlencoding/Common_UrlEncodingTest.java +++ b/juneau-core/src/test/java/org/apache/juneau/urlencoding/Common_UrlEncodingTest.java @@ -258,18 +258,18 @@ public class Common_UrlEncodingTest { +"f0=f0/x0" +"&f1=f1/x1" +"&f2=/f2/x2" - +"&f3=http://www.ibm.com/f3/x3" + +"&f3=http://www.apache.org/f3/x3" +"&f4=f4/x4" +"&f5=/f5/x5" - +"&f6=http://www.ibm.com/f6/x6" - +"&f7=http://www.ibm.com/f7/x7" + +"&f6=http://www.apache.org/f6/x6" + +"&f7=http://www.apache.org/f7/x7" +"&f8=f8/x8" +"&f9=f9/x9" - +"&fa=http://www.ibm.com/fa/xa%23MY_LABEL" - +"&fb=http://www.ibm.com/fb/xb?label=MY_LABEL%26foo=bar" - +"&fc=http://www.ibm.com/fc/xc?foo=bar%26label=MY_LABEL" - +"&fd=http://www.ibm.com/fd/xd?label2=MY_LABEL%26foo=bar" - +"&fe=http://www.ibm.com/fe/xe?foo=bar%26label2=MY_LABEL"; + +"&fa=http://www.apache.org/fa/xa%23MY_LABEL" + +"&fb=http://www.apache.org/fb/xb?label=MY_LABEL%26foo=bar" + +"&fc=http://www.apache.org/fc/xc?foo=bar%26label=MY_LABEL" + +"&fd=http://www.apache.org/fd/xd?label2=MY_LABEL%26foo=bar" + +"&fe=http://www.apache.org/fe/xe?foo=bar%26label2=MY_LABEL"; assertEquals(expected, r); s.setProperty(SERIALIZER_relativeUriBase, ""); // Same as null. @@ -282,18 +282,18 @@ public class Common_UrlEncodingTest { +"f0=/cr/f0/x0" +"&f1=/cr/f1/x1" +"&f2=/f2/x2" - +"&f3=http://www.ibm.com/f3/x3" + +"&f3=http://www.apache.org/f3/x3" +"&f4=/cr/f4/x4" +"&f5=/f5/x5" - +"&f6=http://www.ibm.com/f6/x6" - +"&f7=http://www.ibm.com/f7/x7" + +"&f6=http://www.apache.org/f6/x6" + +"&f7=http://www.apache.org/f7/x7" +"&f8=/cr/f8/x8" +"&f9=/cr/f9/x9" - +"&fa=http://www.ibm.com/fa/xa%23MY_LABEL" - +"&fb=http://www.ibm.com/fb/xb?label=MY_LABEL%26foo=bar" - +"&fc=http://www.ibm.com/fc/xc?foo=bar%26label=MY_LABEL" - +"&fd=http://www.ibm.com/fd/xd?label2=MY_LABEL%26foo=bar" - +"&fe=http://www.ibm.com/fe/xe?foo=bar%26label2=MY_LABEL"; + +"&fa=http://www.apache.org/fa/xa%23MY_LABEL" + +"&fb=http://www.apache.org/fb/xb?label=MY_LABEL%26foo=bar" + +"&fc=http://www.apache.org/fc/xc?foo=bar%26label=MY_LABEL" + +"&fd=http://www.apache.org/fd/xd?label2=MY_LABEL%26foo=bar" + +"&fe=http://www.apache.org/fe/xe?foo=bar%26label2=MY_LABEL"; assertEquals(expected, r); s.setProperty(SERIALIZER_relativeUriBase, "/cr/"); // Same as above @@ -306,18 +306,18 @@ public class Common_UrlEncodingTest { +"f0=/f0/x0" +"&f1=/f1/x1" +"&f2=/f2/x2" - +"&f3=http://www.ibm.com/f3/x3" + +"&f3=http://www.apache.org/f3/x3" +"&f4=/f4/x4" +"&f5=/f5/x5" - +"&f6=http://www.ibm.com/f6/x6" - +"&f7=http://www.ibm.com/f7/x7" + +"&f6=http://www.apache.org/f6/x6" + +"&f7=http://www.apache.org/f7/x7" +"&f8=/f8/x8" +"&f9=/f9/x9" - +"&fa=http://www.ibm.com/fa/xa%23MY_LABEL" - +"&fb=http://www.ibm.com/fb/xb?label=MY_LABEL%26foo=bar" - +"&fc=http://www.ibm.com/fc/xc?foo=bar%26label=MY_LABEL" - +"&fd=http://www.ibm.com/fd/xd?label2=MY_LABEL%26foo=bar" - +"&fe=http://www.ibm.com/fe/xe?foo=bar%26label2=MY_LABEL"; + +"&fa=http://www.apache.org/fa/xa%23MY_LABEL" + +"&fb=http://www.apache.org/fb/xb?label=MY_LABEL%26foo=bar" + +"&fc=http://www.apache.org/fc/xc?foo=bar%26label=MY_LABEL" + +"&fd=http://www.apache.org/fd/xd?label2=MY_LABEL%26foo=bar" + +"&fe=http://www.apache.org/fe/xe?foo=bar%26label2=MY_LABEL"; assertEquals(expected, r); s.setProperty(SERIALIZER_relativeUriBase, null); @@ -328,18 +328,18 @@ public class Common_UrlEncodingTest { +"f0=f0/x0" +"&f1=f1/x1" +"&f2=http://foo/f2/x2" - +"&f3=http://www.ibm.com/f3/x3" + +"&f3=http://www.apache.org/f3/x3" +"&f4=f4/x4" +"&f5=http://foo/f5/x5" - +"&f6=http://www.ibm.com/f6/x6" - +"&f7=http://www.ibm.com/f7/x7" + +"&f6=http://www.apache.org/f6/x6" + +"&f7=http://www.apache.org/f7/x7" +"&f8=f8/x8" +"&f9=f9/x9" - +"&fa=http://www.ibm.com/fa/xa%23MY_LABEL" - +"&fb=http://www.ibm.com/fb/xb?label=MY_LABEL%26foo=bar" - +"&fc=http://www.ibm.com/fc/xc?foo=bar%26label=MY_LABEL" - +"&fd=http://www.ibm.com/fd/xd?label2=MY_LABEL%26foo=bar" - +"&fe=http://www.ibm.com/fe/xe?foo=bar%26label2=MY_LABEL"; + +"&fa=http://www.apache.org/fa/xa%23MY_LABEL" + +"&fb=http://www.apache.org/fb/xb?label=MY_LABEL%26foo=bar" + +"&fc=http://www.apache.org/fc/xc?foo=bar%26label=MY_LABEL" + +"&fd=http://www.apache.org/fd/xd?label2=MY_LABEL%26foo=bar" + +"&fe=http://www.apache.org/fe/xe?foo=bar%26label2=MY_LABEL"; assertEquals(expected, r); s.setProperty(SERIALIZER_absolutePathUriBase, "http://foo/"); @@ -352,18 +352,18 @@ public class Common_UrlEncodingTest { +"f0=f0/x0" +"&f1=f1/x1" +"&f2=/f2/x2" - +"&f3=http://www.ibm.com/f3/x3" + +"&f3=http://www.apache.org/f3/x3" +"&f4=f4/x4" +"&f5=/f5/x5" - +"&f6=http://www.ibm.com/f6/x6" - +"&f7=http://www.ibm.com/f7/x7" + +"&f6=http://www.apache.org/f6/x6" + +"&f7=http://www.apache.org/f7/x7" +"&f8=f8/x8" +"&f9=f9/x9" - +"&fa=http://www.ibm.com/fa/xa%23MY_LABEL" - +"&fb=http://www.ibm.com/fb/xb?label=MY_LABEL%26foo=bar" - +"&fc=http://www.ibm.com/fc/xc?foo=bar%26label=MY_LABEL" - +"&fd=http://www.ibm.com/fd/xd?label2=MY_LABEL%26foo=bar" - +"&fe=http://www.ibm.com/fe/xe?foo=bar%26label2=MY_LABEL"; + +"&fa=http://www.apache.org/fa/xa%23MY_LABEL" + +"&fb=http://www.apache.org/fb/xb?label=MY_LABEL%26foo=bar" + +"&fc=http://www.apache.org/fc/xc?foo=bar%26label=MY_LABEL" + +"&fd=http://www.apache.org/fd/xd?label2=MY_LABEL%26foo=bar" + +"&fe=http://www.apache.org/fe/xe?foo=bar%26label2=MY_LABEL"; assertEquals(expected, r); }
http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/09d2d0a3/juneau-core/src/test/java/org/apache/juneau/xml/CommonTest.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/test/java/org/apache/juneau/xml/CommonTest.java b/juneau-core/src/test/java/org/apache/juneau/xml/CommonTest.java index b427155..f6cb225 100755 --- a/juneau-core/src/test/java/org/apache/juneau/xml/CommonTest.java +++ b/juneau-core/src/test/java/org/apache/juneau/xml/CommonTest.java @@ -262,18 +262,18 @@ public class CommonTest { +"<object f0='f0/x0'>" +"<f1>f1/x1</f1>" +"<f2>/f2/x2</f2>" - +"<f3>http://www.ibm.com/f3/x3</f3>" + +"<f3>http://www.apache.org/f3/x3</f3>" +"<f4>f4/x4</f4>" +"<f5>/f5/x5</f5>" - +"<f6>http://www.ibm.com/f6/x6</f6>" - +"<f7>http://www.ibm.com/f7/x7</f7>" + +"<f6>http://www.apache.org/f6/x6</f6>" + +"<f7>http://www.apache.org/f7/x7</f7>" +"<f8>f8/x8</f8>" +"<f9>f9/x9</f9>" - +"<fa>http://www.ibm.com/fa/xa#MY_LABEL</fa>" - +"<fb>http://www.ibm.com/fb/xb?label=MY_LABEL&foo=bar</fb>" - +"<fc>http://www.ibm.com/fc/xc?foo=bar&label=MY_LABEL</fc>" - +"<fd>http://www.ibm.com/fd/xd?label2=MY_LABEL&foo=bar</fd>" - +"<fe>http://www.ibm.com/fe/xe?foo=bar&label2=MY_LABEL</fe>" + +"<fa>http://www.apache.org/fa/xa#MY_LABEL</fa>" + +"<fb>http://www.apache.org/fb/xb?label=MY_LABEL&foo=bar</fb>" + +"<fc>http://www.apache.org/fc/xc?foo=bar&label=MY_LABEL</fc>" + +"<fd>http://www.apache.org/fd/xd?label2=MY_LABEL&foo=bar</fd>" + +"<fe>http://www.apache.org/fe/xe?foo=bar&label2=MY_LABEL</fe>" +"</object>"; assertEquals(expected, r); @@ -287,18 +287,18 @@ public class CommonTest { +"<object f0='/cr/f0/x0'>" +"<f1>/cr/f1/x1</f1>" +"<f2>/f2/x2</f2>" - +"<f3>http://www.ibm.com/f3/x3</f3>" + +"<f3>http://www.apache.org/f3/x3</f3>" +"<f4>/cr/f4/x4</f4>" +"<f5>/f5/x5</f5>" - +"<f6>http://www.ibm.com/f6/x6</f6>" - +"<f7>http://www.ibm.com/f7/x7</f7>" + +"<f6>http://www.apache.org/f6/x6</f6>" + +"<f7>http://www.apache.org/f7/x7</f7>" +"<f8>/cr/f8/x8</f8>" +"<f9>/cr/f9/x9</f9>" - +"<fa>http://www.ibm.com/fa/xa#MY_LABEL</fa>" - +"<fb>http://www.ibm.com/fb/xb?label=MY_LABEL&foo=bar</fb>" - +"<fc>http://www.ibm.com/fc/xc?foo=bar&label=MY_LABEL</fc>" - +"<fd>http://www.ibm.com/fd/xd?label2=MY_LABEL&foo=bar</fd>" - +"<fe>http://www.ibm.com/fe/xe?foo=bar&label2=MY_LABEL</fe>" + +"<fa>http://www.apache.org/fa/xa#MY_LABEL</fa>" + +"<fb>http://www.apache.org/fb/xb?label=MY_LABEL&foo=bar</fb>" + +"<fc>http://www.apache.org/fc/xc?foo=bar&label=MY_LABEL</fc>" + +"<fd>http://www.apache.org/fd/xd?label2=MY_LABEL&foo=bar</fd>" + +"<fe>http://www.apache.org/fe/xe?foo=bar&label2=MY_LABEL</fe>" +"</object>"; assertEquals(expected, r); @@ -312,18 +312,18 @@ public class CommonTest { +"<object f0='/f0/x0'>" +"<f1>/f1/x1</f1>" +"<f2>/f2/x2</f2>" - +"<f3>http://www.ibm.com/f3/x3</f3>" + +"<f3>http://www.apache.org/f3/x3</f3>" +"<f4>/f4/x4</f4>" +"<f5>/f5/x5</f5>" - +"<f6>http://www.ibm.com/f6/x6</f6>" - +"<f7>http://www.ibm.com/f7/x7</f7>" + +"<f6>http://www.apache.org/f6/x6</f6>" + +"<f7>http://www.apache.org/f7/x7</f7>" +"<f8>/f8/x8</f8>" +"<f9>/f9/x9</f9>" - +"<fa>http://www.ibm.com/fa/xa#MY_LABEL</fa>" - +"<fb>http://www.ibm.com/fb/xb?label=MY_LABEL&foo=bar</fb>" - +"<fc>http://www.ibm.com/fc/xc?foo=bar&label=MY_LABEL</fc>" - +"<fd>http://www.ibm.com/fd/xd?label2=MY_LABEL&foo=bar</fd>" - +"<fe>http://www.ibm.com/fe/xe?foo=bar&label2=MY_LABEL</fe>" + +"<fa>http://www.apache.org/fa/xa#MY_LABEL</fa>" + +"<fb>http://www.apache.org/fb/xb?label=MY_LABEL&foo=bar</fb>" + +"<fc>http://www.apache.org/fc/xc?foo=bar&label=MY_LABEL</fc>" + +"<fd>http://www.apache.org/fd/xd?label2=MY_LABEL&foo=bar</fd>" + +"<fe>http://www.apache.org/fe/xe?foo=bar&label2=MY_LABEL</fe>" +"</object>"; assertEquals(expected, r); @@ -335,18 +335,18 @@ public class CommonTest { +"<object f0='f0/x0'>" +"<f1>f1/x1</f1>" +"<f2>http://foo/f2/x2</f2>" - +"<f3>http://www.ibm.com/f3/x3</f3>" + +"<f3>http://www.apache.org/f3/x3</f3>" +"<f4>f4/x4</f4>" +"<f5>http://foo/f5/x5</f5>" - +"<f6>http://www.ibm.com/f6/x6</f6>" - +"<f7>http://www.ibm.com/f7/x7</f7>" + +"<f6>http://www.apache.org/f6/x6</f6>" + +"<f7>http://www.apache.org/f7/x7</f7>" +"<f8>f8/x8</f8>" +"<f9>f9/x9</f9>" - +"<fa>http://www.ibm.com/fa/xa#MY_LABEL</fa>" - +"<fb>http://www.ibm.com/fb/xb?label=MY_LABEL&foo=bar</fb>" - +"<fc>http://www.ibm.com/fc/xc?foo=bar&label=MY_LABEL</fc>" - +"<fd>http://www.ibm.com/fd/xd?label2=MY_LABEL&foo=bar</fd>" - +"<fe>http://www.ibm.com/fe/xe?foo=bar&label2=MY_LABEL</fe>" + +"<fa>http://www.apache.org/fa/xa#MY_LABEL</fa>" + +"<fb>http://www.apache.org/fb/xb?label=MY_LABEL&foo=bar</fb>" + +"<fc>http://www.apache.org/fc/xc?foo=bar&label=MY_LABEL</fc>" + +"<fd>http://www.apache.org/fd/xd?label2=MY_LABEL&foo=bar</fd>" + +"<fe>http://www.apache.org/fe/xe?foo=bar&label2=MY_LABEL</fe>" +"</object>"; assertEquals(expected, r); @@ -360,18 +360,18 @@ public class CommonTest { +"<object f0='f0/x0'>" +"<f1>f1/x1</f1>" +"<f2>/f2/x2</f2>" - +"<f3>http://www.ibm.com/f3/x3</f3>" + +"<f3>http://www.apache.org/f3/x3</f3>" +"<f4>f4/x4</f4>" +"<f5>/f5/x5</f5>" - +"<f6>http://www.ibm.com/f6/x6</f6>" - +"<f7>http://www.ibm.com/f7/x7</f7>" + +"<f6>http://www.apache.org/f6/x6</f6>" + +"<f7>http://www.apache.org/f7/x7</f7>" +"<f8>f8/x8</f8>" +"<f9>f9/x9</f9>" - +"<fa>http://www.ibm.com/fa/xa#MY_LABEL</fa>" - +"<fb>http://www.ibm.com/fb/xb?label=MY_LABEL&foo=bar</fb>" - +"<fc>http://www.ibm.com/fc/xc?foo=bar&label=MY_LABEL</fc>" - +"<fd>http://www.ibm.com/fd/xd?label2=MY_LABEL&foo=bar</fd>" - +"<fe>http://www.ibm.com/fe/xe?foo=bar&label2=MY_LABEL</fe>" + +"<fa>http://www.apache.org/fa/xa#MY_LABEL</fa>" + +"<fb>http://www.apache.org/fb/xb?label=MY_LABEL&foo=bar</fb>" + +"<fc>http://www.apache.org/fc/xc?foo=bar&label=MY_LABEL</fc>" + +"<fd>http://www.apache.org/fd/xd?label2=MY_LABEL&foo=bar</fd>" + +"<fe>http://www.apache.org/fe/xe?foo=bar&label2=MY_LABEL</fe>" +"</object>"; assertEquals(expected, r); } http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/09d2d0a3/juneau-core/src/test/java/org/apache/juneau/xml/XmlTest.java ---------------------------------------------------------------------- diff --git a/juneau-core/src/test/java/org/apache/juneau/xml/XmlTest.java b/juneau-core/src/test/java/org/apache/juneau/xml/XmlTest.java index dbb0f97..06ec91f 100755 --- a/juneau-core/src/test/java/org/apache/juneau/xml/XmlTest.java +++ b/juneau-core/src/test/java/org/apache/juneau/xml/XmlTest.java @@ -60,7 +60,7 @@ public class XmlTest { ObjectMap m = (ObjectMap) JsonParser.DEFAULT.parse(readFile(getClass().getResource("/xml/testComparisonWithJson.json").getPath()), Object.class); String r = new XmlSerializer.XmlJsonSq() .setProperty(XML_addNamespaceUrisToRoot, true) - .setProperty(XML_defaultNamespaceUri, "http://www.ibm.com") + .setProperty(XML_defaultNamespaceUri, "http://www.apache.org") .setProperty(SERIALIZER_useIndentation, true) .setProperty(SERIALIZER_trimNullProperties, false) .serialize(m); @@ -287,7 +287,7 @@ public class XmlTest { s.setProperty(XML_enableNamespaces, true).setProperty(XML_addNamespaceUrisToRoot, true).setProperty(XML_autoDetectNamespaces, true).setProperty(SERIALIZER_trimNullProperties, false); t.f1 = 4; t.f2 = 5; t.f3 = 6; r = s.serialize(t); - assertEquals("<object xmlns='http://www.ibm.com/2013/Juneau' xmlns:bar='http://bar' xmlns:foo='http://foo' xmlns:baz='http://baz' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' bar:f1='4' foo:f2='5' baz:f3='6'/>", r); + assertEquals("<object xmlns='http://www.apache.org/2013/Juneau' xmlns:bar='http://bar' xmlns:foo='http://foo' xmlns:baz='http://baz' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' bar:f1='4' foo:f2='5' baz:f3='6'/>", r); t = p.parse(r, M.class); assertEquals(4, t.f1); assertEquals(5, t.f2); @@ -462,7 +462,7 @@ public class XmlTest { // Only xsi should be added to root. s.setProperty(XML_addNamespaceUrisToRoot, true); r = s.serialize(t); - assertEquals("<object xmlns='http://www.ibm.com/2013/Juneau' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><foo:f1>1</foo:f1><bar:f2>2</bar:f2><foo:f3>3</foo:f3><baz:f4>4</baz:f4></object>", r); + assertEquals("<object xmlns='http://www.apache.org/2013/Juneau' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><foo:f1>1</foo:f1><bar:f2>2</bar:f2><foo:f3>3</foo:f3><baz:f4>4</baz:f4></object>", r); // Manually set namespaces s.setProperty(XML_namespaces, @@ -473,7 +473,7 @@ public class XmlTest { } ); r = s.serialize(t); - assertEquals("<object xmlns='http://www.ibm.com/2013/Juneau' xmlns:foo='http://foo' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><foo:f1>1</foo:f1><bar:f2>2</bar:f2><foo:f3>3</foo:f3><baz:f4>4</baz:f4></object>", r); + assertEquals("<object xmlns='http://www.apache.org/2013/Juneau' xmlns:foo='http://foo' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><foo:f1>1</foo:f1><bar:f2>2</bar:f2><foo:f3>3</foo:f3><baz:f4>4</baz:f4></object>", r); assertTrue(t.equals(p.parse(r, T1.class))); validateXml(t, s); @@ -490,7 +490,7 @@ public class XmlTest { s.setProperty(XML_enableNamespaces, true); r = s.serialize(t); - assertEquals("<object xmlns='http://www.ibm.com/2013/Juneau' xmlns:foo='http://foo' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><foo:f1>1</foo:f1><bar:f2>2</bar:f2><foo:f3>3</foo:f3><baz:f4>4</baz:f4></object>", r); + assertEquals("<object xmlns='http://www.apache.org/2013/Juneau' xmlns:foo='http://foo' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><foo:f1>1</foo:f1><bar:f2>2</bar:f2><foo:f3>3</foo:f3><baz:f4>4</baz:f4></object>", r); assertTrue(t.equals(p.parse(r, T1.class))); validateXml(t, s); } @@ -516,7 +516,7 @@ public class XmlTest { // Only xsi should be added to root. s.setProperty(XML_addNamespaceUrisToRoot, true); r = s.serialize(t); - assertEquals("<foo:T2 xmlns='http://www.ibm.com/2013/Juneau' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><foo:f1>1</foo:f1><bar:f2>2</bar:f2><foo:f3>3</foo:f3><baz:f4>4</baz:f4></foo:T2>", r); + assertEquals("<foo:T2 xmlns='http://www.apache.org/2013/Juneau' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><foo:f1>1</foo:f1><bar:f2>2</bar:f2><foo:f3>3</foo:f3><baz:f4>4</baz:f4></foo:T2>", r); // Manually set namespaces s.setProperty(XML_namespaces, @@ -527,7 +527,7 @@ public class XmlTest { } ); r = s.serialize(t); - assertEquals("<foo:T2 xmlns='http://www.ibm.com/2013/Juneau' xmlns:foo='http://foo' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><foo:f1>1</foo:f1><bar:f2>2</bar:f2><foo:f3>3</foo:f3><baz:f4>4</baz:f4></foo:T2>", r); + assertEquals("<foo:T2 xmlns='http://www.apache.org/2013/Juneau' xmlns:foo='http://foo' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><foo:f1>1</foo:f1><bar:f2>2</bar:f2><foo:f3>3</foo:f3><baz:f4>4</baz:f4></foo:T2>", r); assertTrue(t.equals(p.parse(r, T2.class))); validateXml(t, s); @@ -542,7 +542,7 @@ public class XmlTest { s.setProperty(XML_enableNamespaces, true); r = s.serialize(t); - assertEquals("<foo:T2 xmlns='http://www.ibm.com/2013/Juneau' xmlns:foo='http://foo' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><foo:f1>1</foo:f1><bar:f2>2</bar:f2><foo:f3>3</foo:f3><baz:f4>4</baz:f4></foo:T2>", r); + assertEquals("<foo:T2 xmlns='http://www.apache.org/2013/Juneau' xmlns:foo='http://foo' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><foo:f1>1</foo:f1><bar:f2>2</bar:f2><foo:f3>3</foo:f3><baz:f4>4</baz:f4></foo:T2>", r); assertTrue(t.equals(p.parse(r, T2.class))); validateXml(t, s); } @@ -570,7 +570,7 @@ public class XmlTest { // Only xsi should be added to root. s.setProperty(XML_addNamespaceUrisToRoot, true).setProperty(XML_autoDetectNamespaces, false); r = s.serialize(t); - assertEquals("<object xmlns='http://www.ibm.com/2013/Juneau' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><p1:f1>1</p1:f1><bar:f2>2</bar:f2><p1:f3>3</p1:f3><baz:f4>4</baz:f4></object>", r); + assertEquals("<object xmlns='http://www.apache.org/2013/Juneau' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><p1:f1>1</p1:f1><bar:f2>2</bar:f2><p1:f3>3</p1:f3><baz:f4>4</baz:f4></object>", r); // Manually set namespaces s.setProperty(XML_autoDetectNamespaces, false); @@ -582,7 +582,7 @@ public class XmlTest { } ); r = s.serialize(t); - assertEquals("<object xmlns='http://www.ibm.com/2013/Juneau' xmlns:p1='http://p1' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><p1:f1>1</p1:f1><bar:f2>2</bar:f2><p1:f3>3</p1:f3><baz:f4>4</baz:f4></object>", r); + assertEquals("<object xmlns='http://www.apache.org/2013/Juneau' xmlns:p1='http://p1' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><p1:f1>1</p1:f1><bar:f2>2</bar:f2><p1:f3>3</p1:f3><baz:f4>4</baz:f4></object>", r); assertTrue(t.equals(p.parse(r, T3.class))); validateXml(t, s); @@ -597,7 +597,7 @@ public class XmlTest { s.setProperty(XML_enableNamespaces, true); r = s.serialize(t); - assertEquals("<object xmlns='http://www.ibm.com/2013/Juneau' xmlns:p1='http://p1' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><p1:f1>1</p1:f1><bar:f2>2</bar:f2><p1:f3>3</p1:f3><baz:f4>4</baz:f4></object>", r); + assertEquals("<object xmlns='http://www.apache.org/2013/Juneau' xmlns:p1='http://p1' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><p1:f1>1</p1:f1><bar:f2>2</bar:f2><p1:f3>3</p1:f3><baz:f4>4</baz:f4></object>", r); assertTrue(t.equals(p.parse(r, T3.class))); validateXml(t, s); } @@ -623,7 +623,7 @@ public class XmlTest { // Only xsi should be added to root. s.setProperty(XML_addNamespaceUrisToRoot, true); r = s.serialize(t); - assertEquals("<p1:T4 xmlns='http://www.ibm.com/2013/Juneau' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><p1:f1>1</p1:f1><bar:f2>2</bar:f2><p1:f3>3</p1:f3><baz:f4>4</baz:f4></p1:T4>", r); + assertEquals("<p1:T4 xmlns='http://www.apache.org/2013/Juneau' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><p1:f1>1</p1:f1><bar:f2>2</bar:f2><p1:f3>3</p1:f3><baz:f4>4</baz:f4></p1:T4>", r); // Manually set namespaces s.setProperty(XML_namespaces, @@ -635,7 +635,7 @@ public class XmlTest { } ); r = s.serialize(t); - assertEquals("<p1:T4 xmlns='http://www.ibm.com/2013/Juneau' xmlns:foo='http://foo' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:p1='http://p1' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><p1:f1>1</p1:f1><bar:f2>2</bar:f2><p1:f3>3</p1:f3><baz:f4>4</baz:f4></p1:T4>", r); + assertEquals("<p1:T4 xmlns='http://www.apache.org/2013/Juneau' xmlns:foo='http://foo' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:p1='http://p1' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><p1:f1>1</p1:f1><bar:f2>2</bar:f2><p1:f3>3</p1:f3><baz:f4>4</baz:f4></p1:T4>", r); assertTrue(t.equals(p.parse(r, T4.class))); validateXml(t, s); @@ -650,7 +650,7 @@ public class XmlTest { s.setProperty(XML_enableNamespaces, true); r = s.serialize(t); - assertEquals("<p1:T4 xmlns='http://www.ibm.com/2013/Juneau' xmlns:p1='http://p1' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><p1:f1>1</p1:f1><bar:f2>2</bar:f2><p1:f3>3</p1:f3><baz:f4>4</baz:f4></p1:T4>", r); + assertEquals("<p1:T4 xmlns='http://www.apache.org/2013/Juneau' xmlns:p1='http://p1' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><p1:f1>1</p1:f1><bar:f2>2</bar:f2><p1:f3>3</p1:f3><baz:f4>4</baz:f4></p1:T4>", r); assertTrue(t.equals(p.parse(r, T4.class))); validateXml(t, s); } @@ -677,7 +677,7 @@ public class XmlTest { // Only xsi should be added to root. s.setProperty(XML_addNamespaceUrisToRoot, true); r = s.serialize(t); - assertEquals("<foo:T5 xmlns='http://www.ibm.com/2013/Juneau' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><foo:f1>1</foo:f1><bar:f2>2</bar:f2><foo:f3>3</foo:f3><baz:f4>4</baz:f4></foo:T5>", r); + assertEquals("<foo:T5 xmlns='http://www.apache.org/2013/Juneau' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><foo:f1>1</foo:f1><bar:f2>2</bar:f2><foo:f3>3</foo:f3><baz:f4>4</baz:f4></foo:T5>", r); // Manually set namespaces s.setProperty(XML_namespaces, @@ -688,7 +688,7 @@ public class XmlTest { } ); r = s.serialize(t); - assertEquals("<foo:T5 xmlns='http://www.ibm.com/2013/Juneau' xmlns:foo='http://foo' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><foo:f1>1</foo:f1><bar:f2>2</bar:f2><foo:f3>3</foo:f3><baz:f4>4</baz:f4></foo:T5>", r); + assertEquals("<foo:T5 xmlns='http://www.apache.org/2013/Juneau' xmlns:foo='http://foo' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><foo:f1>1</foo:f1><bar:f2>2</bar:f2><foo:f3>3</foo:f3><baz:f4>4</baz:f4></foo:T5>", r); assertTrue(t.equals(p.parse(r, T5.class))); validateXml(t, s); @@ -705,7 +705,7 @@ public class XmlTest { s.setProperty(XML_enableNamespaces, true); r = s.serialize(t); - assertEquals("<foo:T5 xmlns='http://www.ibm.com/2013/Juneau' xmlns:foo='http://foo' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><foo:f1>1</foo:f1><bar:f2>2</bar:f2><foo:f3>3</foo:f3><baz:f4>4</baz:f4></foo:T5>", r); + assertEquals("<foo:T5 xmlns='http://www.apache.org/2013/Juneau' xmlns:foo='http://foo' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><foo:f1>1</foo:f1><bar:f2>2</bar:f2><foo:f3>3</foo:f3><baz:f4>4</baz:f4></foo:T5>", r); assertTrue(t.equals(p.parse(r, T5.class))); validateXml(t, s); } @@ -731,7 +731,7 @@ public class XmlTest { // Only xsi should be added to root. s.setProperty(XML_addNamespaceUrisToRoot, true).setProperty(XML_autoDetectNamespaces, false); r = s.serialize(t); - assertEquals("<object xmlns='http://www.ibm.com/2013/Juneau' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><foo:f1>1</foo:f1><bar:f2>2</bar:f2><foo:f3>3</foo:f3><baz:f4>4</baz:f4></object>", r); + assertEquals("<object xmlns='http://www.apache.org/2013/Juneau' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><foo:f1>1</foo:f1><bar:f2>2</bar:f2><foo:f3>3</foo:f3><baz:f4>4</baz:f4></object>", r); // Manually set namespaces s.setProperty(XML_namespaces, @@ -742,7 +742,7 @@ public class XmlTest { } ); r = s.serialize(t); - assertEquals("<object xmlns='http://www.ibm.com/2013/Juneau' xmlns:foo='http://foo' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><foo:f1>1</foo:f1><bar:f2>2</bar:f2><foo:f3>3</foo:f3><baz:f4>4</baz:f4></object>", r); + assertEquals("<object xmlns='http://www.apache.org/2013/Juneau' xmlns:foo='http://foo' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><foo:f1>1</foo:f1><bar:f2>2</bar:f2><foo:f3>3</foo:f3><baz:f4>4</baz:f4></object>", r); assertTrue(t.equals(p.parse(r, T6.class))); validateXml(t, s); @@ -759,7 +759,7 @@ public class XmlTest { s.setProperty(XML_enableNamespaces, true); r = s.serialize(t); - assertEquals("<object xmlns='http://www.ibm.com/2013/Juneau' xmlns:foo='http://foo' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><foo:f1>1</foo:f1><bar:f2>2</bar:f2><foo:f3>3</foo:f3><baz:f4>4</baz:f4></object>", r); + assertEquals("<object xmlns='http://www.apache.org/2013/Juneau' xmlns:foo='http://foo' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><foo:f1>1</foo:f1><bar:f2>2</bar:f2><foo:f3>3</foo:f3><baz:f4>4</baz:f4></object>", r); assertTrue(t.equals(p.parse(r, T6.class))); validateXml(t, s); } @@ -785,7 +785,7 @@ public class XmlTest { // Only xsi should be added to root. s.setProperty(XML_addNamespaceUrisToRoot, true).setProperty(XML_autoDetectNamespaces, false); r = s.serialize(t); - assertEquals("<object xmlns='http://www.ibm.com/2013/Juneau' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><p1:g1>1</p1:g1><bar:g2>2</bar:g2><p1:g3>3</p1:g3><baz:g4>4</baz:g4></object>", r); + assertEquals("<object xmlns='http://www.apache.org/2013/Juneau' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><p1:g1>1</p1:g1><bar:g2>2</bar:g2><p1:g3>3</p1:g3><baz:g4>4</baz:g4></object>", r); // Manually set namespaces s.setProperty(XML_namespaces, @@ -797,7 +797,7 @@ public class XmlTest { } ); r = s.serialize(t); - assertEquals("<object xmlns='http://www.ibm.com/2013/Juneau' xmlns:foo='http://foo' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:p1='http://p1' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><p1:g1>1</p1:g1><bar:g2>2</bar:g2><p1:g3>3</p1:g3><baz:g4>4</baz:g4></object>", r); + assertEquals("<object xmlns='http://www.apache.org/2013/Juneau' xmlns:foo='http://foo' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:p1='http://p1' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><p1:g1>1</p1:g1><bar:g2>2</bar:g2><p1:g3>3</p1:g3><baz:g4>4</baz:g4></object>", r); assertTrue(t.equals(p.parse(r, T7.class))); // Auto-detect namespaces. @@ -811,7 +811,7 @@ public class XmlTest { s.setProperty(XML_enableNamespaces, true); r = s.serialize(t); - assertEquals("<object xmlns='http://www.ibm.com/2013/Juneau' xmlns:p1='http://p1' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><p1:g1>1</p1:g1><bar:g2>2</bar:g2><p1:g3>3</p1:g3><baz:g4>4</baz:g4></object>", r); + assertEquals("<object xmlns='http://www.apache.org/2013/Juneau' xmlns:p1='http://p1' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><p1:g1>1</p1:g1><bar:g2>2</bar:g2><p1:g3>3</p1:g3><baz:g4>4</baz:g4></object>", r); assertTrue(t.equals(p.parse(r, T7.class))); validateXml(t, s); } @@ -837,7 +837,7 @@ public class XmlTest { // Only xsi should be added to root. s.setProperty(XML_addNamespaceUrisToRoot, true); r = s.serialize(t); - assertEquals("<object xmlns='http://www.ibm.com/2013/Juneau' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><p2:f1>1</p2:f1><p1:f2>2</p1:f2><c1:f3>3</c1:f3><f1:f4>4</f1:f4></object>", r); + assertEquals("<object xmlns='http://www.apache.org/2013/Juneau' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><p2:f1>1</p2:f1><p1:f2>2</p1:f2><c1:f3>3</c1:f3><f1:f4>4</f1:f4></object>", r); // Manually set namespaces s.setProperty(XML_namespaces, @@ -848,7 +848,7 @@ public class XmlTest { } ); r = s.serialize(t); - assertEquals("<object xmlns='http://www.ibm.com/2013/Juneau' xmlns:foo='http://foo' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><p2:f1>1</p2:f1><p1:f2>2</p1:f2><c1:f3>3</c1:f3><f1:f4>4</f1:f4></object>", r); + assertEquals("<object xmlns='http://www.apache.org/2013/Juneau' xmlns:foo='http://foo' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><p2:f1>1</p2:f1><p1:f2>2</p1:f2><c1:f3>3</c1:f3><f1:f4>4</f1:f4></object>", r); // Auto-detect namespaces. s = new XmlSerializer.SimpleSq().setProperty(XML_autoDetectNamespaces, true); @@ -864,7 +864,7 @@ public class XmlTest { s.setProperty(XML_enableNamespaces, true); r = s.serialize(t); - assertEquals("<object xmlns='http://www.ibm.com/2013/Juneau' xmlns:p2='http://p2' xmlns:p1='http://p1' xmlns:c1='http://c1' xmlns:f1='http://f1' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><p2:f1>1</p2:f1><p1:f2>2</p1:f2><c1:f3>3</c1:f3><f1:f4>4</f1:f4></object>", r); + assertEquals("<object xmlns='http://www.apache.org/2013/Juneau' xmlns:p2='http://p2' xmlns:p1='http://p1' xmlns:c1='http://c1' xmlns:f1='http://f1' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><p2:f1>1</p2:f1><p1:f2>2</p1:f2><c1:f3>3</c1:f3><f1:f4>4</f1:f4></object>", r); assertTrue(t.equals(p.parse(r, T8.class))); validateXml(t, s); } @@ -890,7 +890,7 @@ public class XmlTest { // Only xsi should be added to root. s.setProperty(XML_addNamespaceUrisToRoot, true); r = s.serialize(t); - assertEquals("<object xmlns='http://www.ibm.com/2013/Juneau' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><p1:f1>1</p1:f1></object>", r); + assertEquals("<object xmlns='http://www.apache.org/2013/Juneau' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><p1:f1>1</p1:f1></object>", r); // Manually set namespaces s.setProperty(XML_namespaces, @@ -901,7 +901,7 @@ public class XmlTest { } ); r = s.serialize(t); - assertEquals("<object xmlns='http://www.ibm.com/2013/Juneau' xmlns:foo='http://foo' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><p1:f1>1</p1:f1></object>", r); + assertEquals("<object xmlns='http://www.apache.org/2013/Juneau' xmlns:foo='http://foo' xmlns:bar='http://bar' xmlns:baz='http://baz' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><p1:f1>1</p1:f1></object>", r); // Auto-detect namespaces. s = new XmlSerializer.SimpleSq().setProperty(XML_autoDetectNamespaces, true); @@ -917,7 +917,7 @@ public class XmlTest { s.setProperty(XML_enableNamespaces, true); r = s.serialize(t); - assertEquals("<object xmlns='http://www.ibm.com/2013/Juneau' xmlns:p1='http://p1' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><p1:f1>1</p1:f1></object>", r); + assertEquals("<object xmlns='http://www.apache.org/2013/Juneau' xmlns:p1='http://p1' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'><p1:f1>1</p1:f1></object>", r); assertTrue(t.equals(p.parse(r, T9.class))); validateXml(t, s); } @@ -944,7 +944,7 @@ public class XmlTest { s.setProperty(XML_enableNamespaces, true).setProperty(XML_addNamespaceUrisToRoot, true).setProperty(XML_autoDetectNamespaces, true); r = s.serialize(t); - assertEquals("<object xmlns='http://www.ibm.com/2013/Juneau' xmlns:ns='http://ns' xmlns:nsf1='http://nsf1' xmlns:nsf3='http://nsf3' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' nsf1:f1='http://xf1' ns:f2='xf2' nsf3:x3='xf3'/>", r); + assertEquals("<object xmlns='http://www.apache.org/2013/Juneau' xmlns:ns='http://ns' xmlns:nsf1='http://nsf1' xmlns:nsf3='http://nsf3' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' nsf1:f1='http://xf1' ns:f2='xf2' nsf3:x3='xf3'/>", r); validateXml(t, s); t = p.parse(r, Q.class); http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/09d2d0a3/juneau-core/src/test/resources/dto/atom/test1.xml ---------------------------------------------------------------------- diff --git a/juneau-core/src/test/resources/dto/atom/test1.xml b/juneau-core/src/test/resources/dto/atom/test1.xml index 0cdde1f..112dccf 100755 --- a/juneau-core/src/test/resources/dto/atom/test1.xml +++ b/juneau-core/src/test/resources/dto/atom/test1.xml @@ -16,46 +16,46 @@ <feed> <entry> <author> - <email>f...@example.com</email> - <name>Mark Pilgrim</name> - <uri>http://example.org/</uri> + <email>f...@foo.org</email> + <name>John Smith</name> + <uri>http://foo.org/</uri> </author> - <content base='http://diveintomark.org/' lang='en' type='xhtml'> - <div xmlns="http://www.w3.org/1999/xhtml"><p><i>[Update: The Atom draft is finished.]</i></p></div> + <content base='http://foo.org/' lang='en' type='xhtml'> + <div xmlns="http://www.w3.org/1999/xhtml"><p><i>[Sample content]</i></p></div> </content> <contributor> - <name>Sam Ruby</name> + <name>John Smith</name> </contributor> <contributor> - <name>Joe Gregorio</name> + <name>Jane Smith</name> </contributor> <id> - tag:example.org,2003:3.2397 + tag:foo.org </id> - <link href='http://example.org/2005/04/02/atom' rel='alternate' type='text/html'/> - <link href='http://example.org/audio/ph34r_my_podcast.mp3' length='1337' rel='enclosure' type='audio/mpeg'/> - <published>2003-12-13T08:29:29-04:00</published> + <link href='http://foo.org/2005/04/02/atom' rel='alternate' type='text/html'/> + <link href='http://foo.org/audio/foobar.mp3' length='1337' rel='enclosure' type='audio/mpeg'/> + <published>2016-12-31T01:02:03-04:00</published> <title> - Atom draft-07 snapshot + Title </title> - <updated>2005-07-31T12:29:29Z</updated> + <updated>2016-12-31T01:02:03-04:00</updated> </entry> - <generator uri='http://www.example.com/' version='1.0'> + <generator uri='http://www.foo.org/' version='1.0'> Example Toolkit </generator> <id> - tag:example.org,2003:3 + tag:foo.org </id> - <link href='http://example.org/' hreflang='en' rel='alternate' type='text/html'/> - <link href='http://example.org/feed.atom' rel='self' type='application/atom+xml'/> + <link href='http://foo.org/' hreflang='en' rel='alternate' type='text/html'/> + <link href='http://foo.org/feed.atom' rel='self' type='application/atom+xml'/> <rights> Copyright (c) 2016, Apache Foundation </rights> <subtitle type='html'> - A <em>lot</em> of effort went into making this effortless + Subtitle </subtitle> <title type='text'> - dive into mark + Title </title> - <updated>2005-07-31T12:29:29Z</updated> + <updated>2016-12-31T01:02:03-04:00</updated> </feed> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/09d2d0a3/juneau-core/src/test/resources/dto/atom/test2.xml ---------------------------------------------------------------------- diff --git a/juneau-core/src/test/resources/dto/atom/test2.xml b/juneau-core/src/test/resources/dto/atom/test2.xml index 4ac8577..b1a1a29 100755 --- a/juneau-core/src/test/resources/dto/atom/test2.xml +++ b/juneau-core/src/test/resources/dto/atom/test2.xml @@ -13,49 +13,49 @@ * specific language governing permissions and limitations under the License. * *************************************************************************************************************************** --> -<atom:feed xmlns='http://www.ibm.com/2013/Juneau' xmlns:atom='http://www.w3.org/2005/Atom/' xmlns:xml='http://www.w3.org/XML/1998/namespace' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'> +<atom:feed xmlns='http://www.apache.org/2013/Juneau' xmlns:atom='http://www.w3.org/2005/Atom/' xmlns:xml='http://www.w3.org/XML/1998/namespace' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'> <atom:entry> <atom:author> - <atom:email>f...@example.com</atom:email> - <atom:name>Mark Pilgrim</atom:name> - <atom:uri>http://example.org/</atom:uri> + <atom:email>f...@foo.org</atom:email> + <atom:name>John Smith</atom:name> + <atom:uri>http://foo.org/</atom:uri> </atom:author> - <atom:content xml:base='http://diveintomark.org/' xml:lang='en' type='xhtml'> - <div xmlns="http://www.w3.org/1999/xhtml"><p><i>[Update: The Atom draft is finished.]</i></p></div> + <atom:content xml:base='http://foo.org/' xml:lang='en' type='xhtml'> + <div xmlns="http://www.w3.org/1999/xhtml"><p><i>[Sample content]</i></p></div> </atom:content> <atom:contributor> - <atom:name>Sam Ruby</atom:name> + <atom:name>John Smith</atom:name> </atom:contributor> <atom:contributor> - <atom:name>Joe Gregorio</atom:name> + <atom:name>Jane Smith</atom:name> </atom:contributor> <atom:id> - tag:example.org,2003:3.2397 + tag:foo.org </atom:id> - <atom:link href='http://example.org/2005/04/02/atom' rel='alternate' type='text/html'/> - <atom:link href='http://example.org/audio/ph34r_my_podcast.mp3' length='1337' rel='enclosure' type='audio/mpeg'/> - <atom:published>2003-12-13T08:29:29-04:00</atom:published> + <atom:link href='http://foo.org/2005/04/02/atom' rel='alternate' type='text/html'/> + <atom:link href='http://foo.org/audio/foobar.mp3' length='1337' rel='enclosure' type='audio/mpeg'/> + <atom:published>2016-12-31T01:02:03-04:00</atom:published> <atom:title> - Atom draft-07 snapshot + Title </atom:title> - <atom:updated>2005-07-31T12:29:29Z</atom:updated> + <atom:updated>2016-12-31T01:02:03-04:00</atom:updated> </atom:entry> - <atom:generator uri='http://www.example.com/' version='1.0'> + <atom:generator uri='http://www.foo.org/' version='1.0'> Example Toolkit </atom:generator> <atom:id> - tag:example.org,2003:3 + tag:foo.org </atom:id> - <atom:link href='http://example.org/' hreflang='en' rel='alternate' type='text/html'/> - <atom:link href='http://example.org/feed.atom' rel='self' type='application/atom+xml'/> + <atom:link href='http://foo.org/' hreflang='en' rel='alternate' type='text/html'/> + <atom:link href='http://foo.org/feed.atom' rel='self' type='application/atom+xml'/> <atom:rights> Copyright (c) 2016, Apache Foundation </atom:rights> <atom:subtitle type='html'> - A <em>lot</em> of effort went into making this effortless + Subtitle </atom:subtitle> <atom:title type='text'> - dive into mark + Title </atom:title> - <atom:updated>2005-07-31T12:29:29Z</atom:updated> + <atom:updated>2016-12-31T01:02:03-04:00</atom:updated> </atom:feed> http://git-wip-us.apache.org/repos/asf/incubator-juneau/blob/09d2d0a3/juneau-core/src/test/resources/dto/atom/test3.xml ---------------------------------------------------------------------- diff --git a/juneau-core/src/test/resources/dto/atom/test3.xml b/juneau-core/src/test/resources/dto/atom/test3.xml index 9731b08..470f917 100755 --- a/juneau-core/src/test/resources/dto/atom/test3.xml +++ b/juneau-core/src/test/resources/dto/atom/test3.xml @@ -16,46 +16,46 @@ <feed xmlns='http://www.w3.org/2005/Atom/' xmlns:xml='http://www.w3.org/XML/1998/namespace' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'> <entry> <author> - <email>f...@example.com</email> - <name>Mark Pilgrim</name> - <uri>http://example.org/</uri> + <email>f...@foo.org</email> + <name>John Smith</name> + <uri>http://foo.org/</uri> </author> - <content xml:base='http://diveintomark.org/' xml:lang='en' type='xhtml'> - <div xmlns="http://www.w3.org/1999/xhtml"><p><i>[Update: The Atom draft is finished.]</i></p></div> + <content xml:base='http://foo.org/' xml:lang='en' type='xhtml'> + <div xmlns="http://www.w3.org/1999/xhtml"><p><i>[Sample content]</i></p></div> </content> <contributor> - <name>Sam Ruby</name> + <name>John Smith</name> </contributor> <contributor> - <name>Joe Gregorio</name> + <name>Jane Smith</name> </contributor> <id> - tag:example.org,2003:3.2397 + tag:foo.org </id> - <link href='http://example.org/2005/04/02/atom' rel='alternate' type='text/html'/> - <link href='http://example.org/audio/ph34r_my_podcast.mp3' length='1337' rel='enclosure' type='audio/mpeg'/> - <published>2003-12-13T08:29:29-04:00</published> + <link href='http://foo.org/2005/04/02/atom' rel='alternate' type='text/html'/> + <link href='http://foo.org/audio/foobar.mp3' length='1337' rel='enclosure' type='audio/mpeg'/> + <published>2016-12-31T01:02:03-04:00</published> <title> - Atom draft-07 snapshot + Title </title> - <updated>2005-07-31T12:29:29Z</updated> + <updated>2016-12-31T01:02:03-04:00</updated> </entry> - <generator uri='http://www.example.com/' version='1.0'> + <generator uri='http://www.foo.org/' version='1.0'> Example Toolkit </generator> <id> - tag:example.org,2003:3 + tag:foo.org </id> - <link href='http://example.org/' hreflang='en' rel='alternate' type='text/html'/> - <link href='http://example.org/feed.atom' rel='self' type='application/atom+xml'/> + <link href='http://foo.org/' hreflang='en' rel='alternate' type='text/html'/> + <link href='http://foo.org/feed.atom' rel='self' type='application/atom+xml'/> <rights> Copyright (c) 2016, Apache Foundation </rights> <subtitle type='html'> - A <em>lot</em> of effort went into making this effortless + Subtitle </subtitle> <title type='text'> - dive into mark + Title </title> - <updated>2005-07-31T12:29:29Z</updated> + <updated>2016-12-31T01:02:03-04:00</updated> </feed>