Skip to content

Commit e600d33

Browse files
committed
format
1 parent f357d9a commit e600d33

File tree

7 files changed

+116
-116
lines changed

7 files changed

+116
-116
lines changed

google-http-client-xml/src/test/java/com/google/api/client/xml/AtomTest.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@
4646
public class AtomTest {
4747

4848
private static final String SAMPLE_FEED =
49-
"<?xml version=\"1.0\" encoding=\"utf-8\"?><feed "
50-
+ "xmlns=\"http://www.w3.org/2005/Atom\"> <title>Example Feed</title> <link href"
51-
+ "=\"http://example.org/\"/> <updated>2003-12-13T18:31:02Z</updated> <author> "
52-
+ "<name>John Doe</name> </author> <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6"
53-
+ "</id> <entry> <title>Atom-Powered Robots Run Amok</title> <link href=\"http"
54-
+ "://example.org/2003/12/13/atom03\"/> <id>urn:uuid:1225c695-cfb8-4ebb-aaaa"
55-
+ "-80da344efa6a</id> <updated>2003-12-13T18:30:02Z</updated> <summary>Some text"
56-
+ ".</summary> </entry><entry> <title>Atom-Powered Robots Run Amok!</title> <link"
57-
+ " href=\"http://example.org/2003/12/13/atom02\"/> <id>urn:uuid:1225c695-cfb8-4ebb"
58-
+ "-aaaa-80da344efa62</id> <updated>2003-12-13T18:32:02Z</updated> <summary>Some "
59-
+ "other text.</summary> </entry></feed>";
49+
"<?xml version=\"1.0\" encoding=\"utf-8\"?><feed "
50+
+ "xmlns=\"http://www.w3.org/2005/Atom\"> <title>Example Feed</title> <link href"
51+
+ "=\"http://example.org/\"/> <updated>2003-12-13T18:31:02Z</updated> <author> "
52+
+ "<name>John Doe</name> </author> <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6"
53+
+ "</id> <entry> <title>Atom-Powered Robots Run Amok</title> <link href=\"http"
54+
+ "://example.org/2003/12/13/atom03\"/> <id>urn:uuid:1225c695-cfb8-4ebb-aaaa"
55+
+ "-80da344efa6a</id> <updated>2003-12-13T18:30:02Z</updated> <summary>Some text"
56+
+ ".</summary> </entry><entry> <title>Atom-Powered Robots Run Amok!</title> <link"
57+
+ " href=\"http://example.org/2003/12/13/atom02\"/> <id>urn:uuid:1225c695-cfb8-4ebb"
58+
+ "-aaaa-80da344efa62</id> <updated>2003-12-13T18:32:02Z</updated> <summary>Some "
59+
+ "other text.</summary> </entry></feed>";
6060

6161
/** Test for checking the Slug Header */
6262
@Test

google-http-client-xml/src/test/java/com/google/api/client/xml/GenericXmlListTest.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,27 +41,27 @@
4141
public class GenericXmlListTest {
4242

4343
private static final String MULTI_TYPE_WITH_CLASS_TYPE =
44-
"<?xml version=\"1.0\"?><any "
45-
+ "xmlns=\"http://www.w3.org/2005/Atom\"><rep><elem>content1</elem><rep>rep10</rep><rep>"
46-
+ "rep11</rep><value>value1</value></rep><rep><elem>content2</elem><rep>rep20</rep><rep>rep21"
47-
+ "</rep><value>value2</value></rep><rep><elem>content3</elem><rep>rep30</rep><rep>rep31"
48-
+ "</rep><value>value3</value></rep></any>";
44+
"<?xml version=\"1.0\"?><any "
45+
+ "xmlns=\"http://www.w3.org/2005/Atom\"><rep><elem>content1</elem><rep>rep10</rep><rep>"
46+
+ "rep11</rep><value>value1</value></rep><rep><elem>content2</elem><rep>rep20</rep><rep>rep21"
47+
+ "</rep><value>value2</value></rep><rep><elem>content3</elem><rep>rep30</rep><rep>rep31"
48+
+ "</rep><value>value3</value></rep></any>";
4949
private static final String MULTIPLE_STRING_ELEMENT =
50-
"<?xml version=\"1.0\"?><any xmlns"
51-
+ "=\"http://www.w3.org/2005/Atom\"><rep>rep1</rep><rep>rep2</rep></any>";
50+
"<?xml version=\"1.0\"?><any xmlns"
51+
+ "=\"http://www.w3.org/2005/Atom\"><rep>rep1</rep><rep>rep2</rep></any>";
5252
private static final String MULTIPLE_INTEGER_ELEMENT =
53-
"<?xml version=\"1.0\"?><any xmlns"
54-
+ "=\"http://www.w3.org/2005/Atom\"><rep>1</rep><rep>2</rep></any>";
53+
"<?xml version=\"1.0\"?><any xmlns"
54+
+ "=\"http://www.w3.org/2005/Atom\"><rep>1</rep><rep>2</rep></any>";
5555
private static final String ARRAY_TYPE_WITH_PRIMITIVE_ADDED_NESTED =
5656
"<?xml version=\"1.0"
5757
+ "\"?><any xmlns=\"http://www.w3.org/2005/Atom\"><rep>1<nested>something</nested></rep"
5858
+ "><rep>2</rep></any>";
5959
private static final String MULTIPLE_ENUM_ELEMENT =
60-
"<?xml version=\"1.0\"?><any xmlns"
61-
+ "=\"http://www.w3.org/2005/Atom\"><rep>ENUM_1</rep><rep>ENUM_2</rep></any>";
60+
"<?xml version=\"1.0\"?><any xmlns"
61+
+ "=\"http://www.w3.org/2005/Atom\"><rep>ENUM_1</rep><rep>ENUM_2</rep></any>";
6262
private static final String COLLECTION_OF_ARRAY =
63-
"<?xml version=\"1.0\"?><any xmlns"
64-
+ "=\"http://www.w3.org/2005/Atom\"><rep><a>a</a><b>b</b></rep><rep><c>c</c><d>d</d></rep></any>";
63+
"<?xml version=\"1.0\"?><any xmlns"
64+
+ "=\"http://www.w3.org/2005/Atom\"><rep><a>a</a><b>b</b></rep><rep><c>c</c><d>d</d></rep></any>";
6565

6666
/** The purpose of this test is to map an XML with an Array of {@link XmlTest.AnyType} objects. */
6767
@SuppressWarnings("unchecked")

google-http-client-xml/src/test/java/com/google/api/client/xml/GenericXmlTest.java

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -47,36 +47,36 @@
4747
public class GenericXmlTest {
4848

4949
private static final String XML =
50-
"<?xml version=\"1.0\"?><feed xmlns=\"http://www.w3.org"
51-
+ "/2005/Atom\" xmlns:gd=\"http://schemas.google.com/g/2005\"><atom:entry xmlns=\"http"
52-
+ "://schemas.google.com/g/2005\" xmlns:atom=\"http://www.w3.org/2005/Atom\" gd:etag"
53-
+ "=\"abc\"><atom:title>One</atom:title></atom:entry><entry gd:etag=\"def\"><title "
54-
+ "attribute=\"someattribute\">Two</title></entry></feed>";
50+
"<?xml version=\"1.0\"?><feed xmlns=\"http://www.w3.org"
51+
+ "/2005/Atom\" xmlns:gd=\"http://schemas.google.com/g/2005\"><atom:entry xmlns=\"http"
52+
+ "://schemas.google.com/g/2005\" xmlns:atom=\"http://www.w3.org/2005/Atom\" gd:etag"
53+
+ "=\"abc\"><atom:title>One</atom:title></atom:entry><entry gd:etag=\"def\"><title "
54+
+ "attribute=\"someattribute\">Two</title></entry></feed>";
5555
private static final String ANY_GENERIC_TYPE_XML =
56-
"<?xml version=\"1.0\"?><any attr=\"value\" "
57-
+ "xmlns=\"http://www.w3.org/2005/Atom\"><elem><rep attr=\"param1\">rep1</rep><rep "
58-
+ "attr=\"param2\">rep2</rep><value>content</value></elem></any>";
56+
"<?xml version=\"1.0\"?><any attr=\"value\" "
57+
+ "xmlns=\"http://www.w3.org/2005/Atom\"><elem><rep attr=\"param1\">rep1</rep><rep "
58+
+ "attr=\"param2\">rep2</rep><value>content</value></elem></any>";
5959
private static final String SIMPLE_XML = "<any>test</any>";
6060
private static final String SIMPLE_XML_NUMERIC = "<any>1</any>";
6161
private static final String ANY_TYPE_XML =
62-
"<?xml version=\"1.0\"?><any attr=\"value\" "
63-
+ "xmlns=\"http://www.w3.org/2005/Atom\"><elem>content</elem><rep>rep1</rep><rep>rep2</rep"
64-
+ "><value>content</value></any>";
62+
"<?xml version=\"1.0\"?><any attr=\"value\" "
63+
+ "xmlns=\"http://www.w3.org/2005/Atom\"><elem>content</elem><rep>rep1</rep><rep>rep2</rep"
64+
+ "><value>content</value></any>";
6565
private static final String ANY_TYPE_XML_PRIMITIVE_INT =
66-
"<?xml version=\"1.0\"?><any attr"
67-
+ "=\"2\" xmlns=\"http://www.w3.org/2005/Atom\">1<intArray>1</intArray><intArray>2"
68-
+ "</intArray></any>";
66+
"<?xml version=\"1.0\"?><any attr"
67+
+ "=\"2\" xmlns=\"http://www.w3.org/2005/Atom\">1<intArray>1</intArray><intArray>2"
68+
+ "</intArray></any>";
6969
private static final String ANY_TYPE_XML_PRIMITIVE_STR =
70-
"<?xml version=\"1.0\"?><any attr"
71-
+ "=\"2+1\" xmlns=\"http://www.w3.org/2005/Atom\">1+1<strArray>1+1</strArray><strArray>2"
72-
+ "+1</strArray></any>";
70+
"<?xml version=\"1.0\"?><any attr"
71+
+ "=\"2+1\" xmlns=\"http://www.w3.org/2005/Atom\">1+1<strArray>1+1</strArray><strArray>2"
72+
+ "+1</strArray></any>";
7373
private static final String ALL_TYPE =
74-
"<?xml version=\"1.0\"?><any xmlns=\"\"><integer"
75-
+ "/><str/><genericXml/><anyEnum/><stringArray/><integerCollection/></any>";
74+
"<?xml version=\"1.0\"?><any xmlns=\"\"><integer"
75+
+ "/><str/><genericXml/><anyEnum/><stringArray/><integerCollection/></any>";
7676
private static final String ANY_TYPE_XML_NESTED_ARRAY =
77-
"<?xml version=\"1.0\"?><any attr"
78-
+ "=\"value\" xmlns=\"http://www.w3.org/2005/Atom\"><elem>content</elem><rep><p>rep1</p"
79-
+ "><p>rep2</p></rep><rep><p>rep3</p><p>rep4</p></rep><value>content</value></any>";
77+
"<?xml version=\"1.0\"?><any attr"
78+
+ "=\"value\" xmlns=\"http://www.w3.org/2005/Atom\"><elem>content</elem><rep><p>rep1</p"
79+
+ "><p>rep2</p></rep><rep><p>rep3</p><p>rep4</p></rep><value>content</value></any>";
8080

8181
public GenericXmlTest() {}
8282

google-http-client-xml/src/test/java/com/google/api/client/xml/XmlEnumTest.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,22 @@
3939
public class XmlEnumTest {
4040

4141
private static final String XML =
42-
"<?xml version=\"1.0\"?><any anyEnum=\"ENUM_1\" attr"
43-
+ "=\"value\" xmlns=\"http://www.w3.org/2005/Atom\"><anotherEnum>ENUM_2</anotherEnum"
44-
+ "><elem>content</elem><rep>rep1</rep><rep>rep2</rep><value>ENUM_1</value></any>";
42+
"<?xml version=\"1.0\"?><any anyEnum=\"ENUM_1\" attr"
43+
+ "=\"value\" xmlns=\"http://www.w3.org/2005/Atom\"><anotherEnum>ENUM_2</anotherEnum"
44+
+ "><elem>content</elem><rep>rep1</rep><rep>rep2</rep><value>ENUM_1</value></any>";
4545
private static final String XML_ENUM_ELEMENT_ONLY =
46-
"<?xml version=\"1.0\"?><any xmlns"
47-
+ "=\"http://www.w3.org/2005/Atom\"><elementEnum>ENUM_2</elementEnum></any>";
46+
"<?xml version=\"1.0\"?><any xmlns"
47+
+ "=\"http://www.w3.org/2005/Atom\"><elementEnum>ENUM_2</elementEnum></any>";
4848
private static final String XML_ENUM_ATTRIBUTE_ONLY =
49-
"<?xml version=\"1.0\"?><any "
50-
+ "attributeEnum=\"ENUM_1\" xmlns=\"http://www.w3.org/2005/Atom\" />";
49+
"<?xml version=\"1.0\"?><any "
50+
+ "attributeEnum=\"ENUM_1\" xmlns=\"http://www.w3.org/2005/Atom\" />";
5151
private static final String XML_ENUM_INCORRECT =
52-
"<?xml version=\"1.0\"?><any xmlns=\"http"
53-
+ "://www.w3.org/2005/Atom\"><elementEnum>ENUM_3</elementEnum></any>";
52+
"<?xml version=\"1.0\"?><any xmlns=\"http"
53+
+ "://www.w3.org/2005/Atom\"><elementEnum>ENUM_3</elementEnum></any>";
5454
private static final String XML_ENUM_ELEMENT_ONLY_NESTED =
55-
"<?xml version=\"1.0\"?><any "
56-
+ "xmlns=\"http://www.w3.org/2005/Atom\"><elementEnum>ENUM_2<nested>something</nested"
57-
+ "></elementEnum></any>";
55+
"<?xml version=\"1.0\"?><any "
56+
+ "xmlns=\"http://www.w3.org/2005/Atom\"><elementEnum>ENUM_2<nested>something</nested"
57+
+ "></elementEnum></any>";
5858

5959
@Test
6060
public void testParseAnyType() throws Exception {

google-http-client-xml/src/test/java/com/google/api/client/xml/XmlListTest.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,27 +38,27 @@
3838
public class XmlListTest {
3939

4040
private static final String MULTI_TYPE_WITH_CLASS_TYPE =
41-
"<?xml version=\"1.0\"?><any "
42-
+ "xmlns=\"http://www.w3.org/2005/Atom\"><rep><elem>content1</elem><rep>rep10</rep><rep"
43-
+ ">rep11</rep><value>value1</value></rep><rep><elem>content2</elem><rep>rep20</rep><rep"
44-
+ ">rep21</rep><value>value2</value></rep><rep><elem>content3</elem><rep>rep30</rep><rep"
45-
+ ">rep31</rep><value>value3</value></rep></any>";
41+
"<?xml version=\"1.0\"?><any "
42+
+ "xmlns=\"http://www.w3.org/2005/Atom\"><rep><elem>content1</elem><rep>rep10</rep><rep"
43+
+ ">rep11</rep><value>value1</value></rep><rep><elem>content2</elem><rep>rep20</rep><rep"
44+
+ ">rep21</rep><value>value2</value></rep><rep><elem>content3</elem><rep>rep30</rep><rep"
45+
+ ">rep31</rep><value>value3</value></rep></any>";
4646
private static final String MULTIPLE_STRING_ELEMENT =
47-
"<?xml version=\"1.0\"?><any xmlns"
48-
+ "=\"http://www.w3.org/2005/Atom\"><rep>rep1</rep><rep>rep2</rep></any>";
47+
"<?xml version=\"1.0\"?><any xmlns"
48+
+ "=\"http://www.w3.org/2005/Atom\"><rep>rep1</rep><rep>rep2</rep></any>";
4949
private static final String MULTIPLE_STRING_ELEMENT_IN_COLLECTION =
50-
"<?xml version=\"1.0"
51-
+ "\"?><any xmlns=\"http://www.w3.org/2005/Atom\"><coll><rep>rep1</rep><rep>rep2</rep"
52-
+ "></coll></any>";
50+
"<?xml version=\"1.0"
51+
+ "\"?><any xmlns=\"http://www.w3.org/2005/Atom\"><coll><rep>rep1</rep><rep>rep2</rep"
52+
+ "></coll></any>";
5353
private static final String MULTIPLE_INTEGER_ELEMENT =
54-
"<?xml version=\"1.0\"?><any xmlns"
55-
+ "=\"http://www.w3.org/2005/Atom\"><rep>1</rep><rep>2</rep></any>";
54+
"<?xml version=\"1.0\"?><any xmlns"
55+
+ "=\"http://www.w3.org/2005/Atom\"><rep>1</rep><rep>2</rep></any>";
5656
private static final String MULTIPLE_ENUM_ELEMENT =
57-
"<?xml version=\"1.0\"?><any xmlns"
58-
+ "=\"http://www.w3.org/2005/Atom\"><rep>ENUM_1</rep><rep>ENUM_2</rep></any>";
57+
"<?xml version=\"1.0\"?><any xmlns"
58+
+ "=\"http://www.w3.org/2005/Atom\"><rep>ENUM_1</rep><rep>ENUM_2</rep></any>";
5959
private static final String COLLECTION_OF_ARRAY =
60-
"<?xml version=\"1.0\"?><any xmlns"
61-
+ "=\"http://www.w3.org/2005/Atom\"><rep><a>a</a><b>b</b></rep><rep><c>c</c><d>d</d></rep></any>";
60+
"<?xml version=\"1.0\"?><any xmlns"
61+
+ "=\"http://www.w3.org/2005/Atom\"><rep><a>a</a><b>b</b></rep><rep><c>c</c><d>d</d></rep></any>";
6262

6363
/** The purpose of this test is to map an XML with an Array of {@link XmlTest.AnyType} objects. */
6464
@SuppressWarnings("unchecked")

google-http-client-xml/src/test/java/com/google/api/client/xml/XmlNamespaceDictionaryTest.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,19 @@
3939
public class XmlNamespaceDictionaryTest {
4040

4141
private static final String EXPECTED =
42-
"<?xml version=\"1.0\"?><feed xmlns=\"http://www.w3"
43-
+ ".org/2005/Atom\" xmlns:gd=\"http://schemas.google.com/g/2005\"><entry gd:etag=\"abc"
44-
+ "\"><title>One</title></entry><entry gd:etag=\"def\"><title>Two</title></entry></feed>";
42+
"<?xml version=\"1.0\"?><feed xmlns=\"http://www.w3"
43+
+ ".org/2005/Atom\" xmlns:gd=\"http://schemas.google.com/g/2005\"><entry gd:etag=\"abc"
44+
+ "\"><title>One</title></entry><entry gd:etag=\"def\"><title>Two</title></entry></feed>";
4545
private static final String EXPECTED_EMPTY_MAP =
46-
"<?xml version=\"1.0\"?><entry xmlns" + "=\"http://www.w3.org/2005/Atom\" />";
46+
"<?xml version=\"1.0\"?><entry xmlns" + "=\"http://www.w3.org/2005/Atom\" />";
4747
private static final String EXPECTED_EMPTY_MAP_NS_UNDECLARED =
48-
"<?xml version=\"1.0\"?><n1" + ":entry xmlns:n1=\"http://www.w3.org/2005/Atom\" />";
48+
"<?xml version=\"1.0\"?><n1" + ":entry xmlns:n1=\"http://www.w3.org/2005/Atom\" />";
4949
private static final String EXPECTED_EMPTY_MAP_ATOM_NS =
50-
"<?xml version=\"1.0\"?><atom" + ":entry xmlns:atom=\"http://www.w3.org/2005/Atom\" />";
50+
"<?xml version=\"1.0\"?><atom" + ":entry xmlns:atom=\"http://www.w3.org/2005/Atom\" />";
5151
private static final String EXPECTED_UNKNOWN_NS =
52-
"<?xml version=\"1.0\"?><feed xmlns"
53-
+ "=\"http://unknown/\" xmlns:gd=\"http://unknown/gd\"><entry gd:etag=\"abc\"><title>One"
54-
+ "</title></entry><entry gd:etag=\"def\"><title>Two</title></entry></feed>";
52+
"<?xml version=\"1.0\"?><feed xmlns"
53+
+ "=\"http://unknown/\" xmlns:gd=\"http://unknown/gd\"><entry gd:etag=\"abc\"><title>One"
54+
+ "</title></entry><entry gd:etag=\"def\"><title>Two</title></entry></feed>";
5555

5656
@Test
5757
public void testSet() {

0 commit comments

Comments
 (0)