My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes  
Changes to /trunk/Source/Tests/GDataFeedTest.m
r716 vs. r726 Compare: vs.  Format:
Revision r726
Go to: 
Project members, sign in to write a code review
/trunk/Source/Tests/GDataFeedTest.m   r716 /trunk/Source/Tests/GDataFeedTest.m   r726
1 /* Copyright (c) 2007 Google Inc. 1 /* Copyright (c) 2007 Google Inc.
2 * 2 *
3 * Licensed under the Apache License, Version 2.0 (the "License"); 3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License. 4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at 5 * You may obtain a copy of the License at
6 * 6 *
7 * http://www.apache.org/licenses/LICENSE-2.0 7 * http://www.apache.org/licenses/LICENSE-2.0
8 * 8 *
9 * Unless required by applicable law or agreed to in writing, software 9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS, 10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and 12 * See the License for the specific language governing permissions and
13 * limitations under the License. 13 * limitations under the License.
14 */ 14 */
15 15
16 // 16 //
17 // GDataFeedTest.m 17 // GDataFeedTest.m
18 // 18 //
19 19
20 #import "GData.h" 20 #import "GData.h"
21 21
22 #import "GDataFeedTest.h" 22 #import "GDataFeedTest.h"
23 #import "GDataElementsTest.h" 23 #import "GDataElementsTest.h"
24 24
25 #import "GDataEntryCalendarEvent.h" 25 #import "GDataEntryCalendarEvent.h"
26 #import "GDataEntryYouTubeVideo.h" 26 #import "GDataEntryYouTubeVideo.h"
27 #import "GDataMapConstants.h" 27 #import "GDataMapConstants.h"
28 28
29 29
30 @implementation GDataFeedTest 30 @implementation GDataFeedTest
31 31
32 - (void)runTests:(TestKeyPathValues *)tests { 32 - (void)runTests:(TestKeyPathValues *)tests {
33 33
34 // step through each feed test 34 // step through each feed test
35 for (int testIndex = 0; 35 for (int testIndex = 0;
36 tests[testIndex].str1 != nil; 36 tests[testIndex].str1 != nil;
37 testIndex++) { 37 testIndex++) {
38 38
39 // get the class of this feed and the path to the test file of xml data 39 // get the class of this feed and the path to the test file of xml data
40 // 40 //
41 // The class name may specify a service version, like GDataFeedCalendar/2.0, 41 // The class name may specify a service version, like GDataFeedCalendar/2.0,
42 // and may have a "-ignoreUnknown" suffix indicating unknown elements should be 42 // and may have a "-ignoreUnknown" suffix indicating unknown elements should be
43 // ignored, like GDataFeedCalendar-ignore/2.0 43 // ignored, like GDataFeedCalendar-ignore/2.0
44 44
45 NSString *className = tests[testIndex].str1; 45 NSString *className = tests[testIndex].str1;
46 NSString *serviceVersion = nil; 46 NSString *serviceVersion = nil;
47 BOOL shouldIgnoreUnknowns = NO; 47 BOOL shouldIgnoreUnknowns = NO;
48 48
49 NSArray *components = [className componentsSeparatedByString:@"/"]; 49 NSArray *components = [className componentsSeparatedByString:@"/"];
50 if ([components count] == 2) { 50 if ([components count] == 2) {
51 className = [components objectAtIndex:0]; 51 className = [components objectAtIndex:0];
52 serviceVersion = [components objectAtIndex:1]; 52 serviceVersion = [components objectAtIndex:1];
53 } 53 }
54 54
55 if ([className hasSuffix:@"-ignoreUnknown"]) { 55 if ([className hasSuffix:@"-ignoreUnknown"]) {
56 shouldIgnoreUnknowns = YES; 56 shouldIgnoreUnknowns = YES;
57 57
58 NSUInteger nameLen = [className length] - [@"-ignoreUnknown" length]; 58 NSUInteger nameLen = [className length] - [@"-ignoreUnknown" length];
59 className = [className substringToIndex:nameLen]; 59 className = [className substringToIndex:nameLen];
60 } 60 }
61 61
62 #ifdef GDATA_TARGET_NAMESPACE 62 #ifdef GDATA_TARGET_NAMESPACE
63 className = [NSString stringWithFormat:@"%s_%@", 63 className = [NSString stringWithFormat:@"%s_%@",
64 GDATA_TARGET_NAMESPACE_STRING, className]; 64 GDATA_TARGET_NAMESPACE_STRING, className];
65 #endif 65 #endif
66 66
67 Class gdataClass = NSClassFromString(className); 67 Class gdataClass = NSClassFromString(className);
68 STAssertNotNil(gdataClass, @"Cannot make class for class name: %@", className); 68 STAssertNotNil(gdataClass, @"Cannot make class for class name: %@", className);
69 69
70 NSString *feedPath = tests[testIndex].str2; 70 NSString *feedPath = tests[testIndex].str2;
71 NSData *data = [NSData dataWithContentsOfFile:feedPath]; 71 NSData *data = [NSData dataWithContentsOfFile:feedPath];
72 STAssertNotNil(data, @"Cannot read feed from %@", feedPath); 72 STAssertNotNil(data, @"Cannot read feed from %@", feedPath);
73 73
74 // create the feed object 74 // create the feed object
75 GDataFeedBase *feed1 = nil; 75 GDataFeedBase *feed1 = nil;
76 if ([gdataClass instancesRespondToSelector:@selector(initWithData:serviceVersion:)]) { 76 if ([gdataClass instancesRespondToSelector:@selector(initWithData:serviceVersion:)]) {
77 feed1 = [[[gdataClass alloc] initWithData:data 77 feed1 = [[[gdataClass alloc] initWithData:data
78 serviceVersion:serviceVersion 78 serviceVersion:serviceVersion
79 shouldIgnoreUnknowns:shouldIgnoreUnknowns] autorelease]; 79 shouldIgnoreUnknowns:shouldIgnoreUnknowns] autorelease];
80 } else { 80 } else {
81 // this "feed" isn't a proper feed, and might be an entry 81 // this "feed" isn't a proper feed, and might be an entry
82 NSError *error = nil; 82 NSError *error = nil;
83 NSXMLDocument *doc = [[[NSXMLDocument alloc] initWithData:data 83 NSXMLDocument *doc = [[[NSXMLDocument alloc] initWithData:data
84 options:0 84 options:0
85 error:&error] autorelease]; 85 error:&error] autorelease];
86 STAssertNotNil(doc, @"Cannot allocate XML document for %@, error %@", 86 STAssertNotNil(doc, @"Cannot allocate XML document for %@, error %@",
87 feedPath, error); 87 feedPath, error);
88 88
89 NSXMLElement* root = [doc rootElement]; 89 NSXMLElement* root = [doc rootElement];
90 feed1 = [[[gdataClass alloc] initWithXMLElement:root 90 feed1 = [[[gdataClass alloc] initWithXMLElement:root
91 parent:nil 91 parent:nil
92 serviceVersion:serviceVersion 92 serviceVersion:serviceVersion
93 surrogates:nil 93 surrogates:nil
94 shouldIgnoreUnknowns:shouldIgnoreUnknowns] autorelease]; 94 shouldIgnoreUnknowns:shouldIgnoreUnknowns] autorelease];
95 } 95 }
96 96
97 // copy the feed object 97 // copy the feed object
98 GDataObject *feed1copy = [[feed1 copy] autorelease]; 98 GDataObject *feed1copy = [[feed1 copy] autorelease];
99 99
100 STAssertTrue([feed1 isEqual:feed1copy], @"Failed copy feed (%@) from %@ to %@", 100 STAssertTrue([feed1 isEqual:feed1copy], @"Failed copy feed (%@) from %@ to %@",
101 feedPath, feed1, feed1copy); 101 feedPath, feed1, feed1copy);
102 102
103 // make a new feed object we'll test against from XML generated by the copy 103 // make a new feed object we'll test against from XML generated by the copy
104 NSXMLElement *outputXML = [feed1copy XMLElement]; 104 NSXMLElement *outputXML = [feed1copy XMLElement];
105 105
106 GDataFeedBase *feed2 = [[[gdataClass alloc] initWithXMLElement:outputXML 106 GDataFeedBase *feed2 = [[[gdataClass alloc] initWithXMLElement:outputXML
107 parent:nil 107 parent:nil
108 serviceVersion:serviceVersion 108 serviceVersion:serviceVersion
109 surrogates:nil 109 surrogates:nil
110 shouldIgnoreUnknowns:shouldIgnoreUnknowns] autorelease]; 110 shouldIgnoreUnknowns:shouldIgnoreUnknowns] autorelease];
111 111
112 STAssertTrue([feed2 isEqual:feed1copy], @"Failed for %@ using XML \n %@\n\nto convert\n %@ \nto\n %@", 112 STAssertTrue([feed2 isEqual:feed1copy], @"Failed for %@ using XML \n %@\n\nto convert\n %@ \nto\n %@",
113 feedPath, outputXML, feed1copy, feed2); 113 feedPath, outputXML, feed1copy, feed2);
114 114
115 // generate a description; this can fire an exception for an invalid keyPath 115 // generate a description; this can fire an exception for an invalid keyPath
116 // in the description record list 116 // in the description record list
117 STAssertNotNil([feed2 description], @"Could not generate description for %@", 117 STAssertNotNil([feed2 description], @"Could not generate description for %@",
118 feedPath); 118 feedPath);
119 119
120 // step through all the key-value path tests 120 // step through all the key-value path tests
121 while (1) { 121 while (1) {
122 122
123 ++testIndex; 123 ++testIndex;
124 124
125 NSString *keyPath = tests[testIndex].str1; 125 NSString *keyPath = tests[testIndex].str1;
126 NSString *expectedValue = tests[testIndex].str2; 126 NSString *expectedValue = tests[testIndex].str2;
127 127
128 if (keyPath == nil || [keyPath length] == 0) break; 128 if (keyPath == nil || [keyPath length] == 0) break;
129 129
130 #if GDATA_USES_LIBXML 130 #if GDATA_USES_LIBXML
131 // skip the XMLStrings until we can normalize whitespace and closing 131 // skip the XMLStrings until we can normalize whitespace and closing
132 // brackets and other minor differences 132 // brackets and other minor differences
133 if ([keyPath hasSuffix:@".XMLString"]) continue; 133 if ([keyPath hasSuffix:@".XMLString"]) continue;
134 #endif 134 #endif
135 135
136 NSString *result = [GDataElementsTest valueInObject:feed2 136 NSString *result = [GDataElementsTest valueInObject:feed2
137 forKeyPathIncludingArrays:keyPath]; 137 forKeyPathIncludingArrays:keyPath];
138 138
139 // if the result wasn't a string but responds to stringValue, then 139 // if the result wasn't a string but responds to stringValue, then
140 // invoke that to get a string 140 // invoke that to get a string
141 if ([expectedValue isKindOfClass:[NSString class]] 141 if ([expectedValue isKindOfClass:[NSString class]]
142 && ![result isKindOfClass:[NSString class]] 142 && ![result isKindOfClass:[NSString class]]
143 && [result respondsToSelector:@selector(stringValue)]) { 143 && [result respondsToSelector:@selector(stringValue)]) {
144 144
145 result = [(id)result stringValue]; 145 result = [(id)result stringValue];
146 } 146 }
147 147
148 // we'll test for equality unless the expected result begins "hasPrefix:" 148 // we'll test for equality unless the expected result begins "hasPrefix:"
149 // or "contains:" 149 // or "contains:"
150 if ([expectedValue hasPrefix:@"hasPrefix:"]) { 150 if ([expectedValue hasPrefix:@"hasPrefix:"]) {
151 NSString *prefix = [expectedValue substringFromIndex:[@"hasPrefix:" length]]; 151 NSString *prefix = [expectedValue substringFromIndex:[@"hasPrefix:" length]];
152 STAssertTrue([result hasPrefix:prefix], @"failed object %@ \n testing key path '%@' for prefix:\n %@ \n!= prefix:\n %@", 152 STAssertTrue([result hasPrefix:prefix], @"failed object %@ \n testing key path '%@' for prefix:\n %@ \n!= prefix:\n %@",
153 feed2, keyPath, result, prefix); 153 feed2, keyPath, result, prefix);
154 154
155 } else if ([expectedValue hasPrefix:@"contains:"]) { 155 } else if ([expectedValue hasPrefix:@"contains:"]) {
156 156
157 NSString *substring = [expectedValue substringFromIndex:[@"contains:" length]]; 157 NSString *substring = [expectedValue substringFromIndex:[@"contains:" length]];
158 NSRange range = [result rangeOfString:substring]; 158 NSRange range = [result rangeOfString:substring];
159 STAssertTrue(result != nil && range.location != NSNotFound, 159 STAssertTrue(result != nil && range.location != NSNotFound,
160 @"failed object %@ \n testing key path '%@' for substring:\n %@ \n!= contains:\n %@", 160 @"failed object %@ \n testing key path '%@' for substring:\n %@ \n!= contains:\n %@",
161 feed2, keyPath, result, substring); 161 feed2, keyPath, result, substring);
162 } else { 162 } else {
163 163
164 #ifdef GDATA_TARGET_NAMESPACE 164 #ifdef GDATA_TARGET_NAMESPACE
165 // tests for class name need the prefix added 165 // tests for class name need the prefix added
166 if ([keyPath hasSuffix:@"className"] 166 if ([keyPath hasSuffix:@"className"]
167 && [expectedValue hasPrefix:@"GData"]) { 167 && [expectedValue hasPrefix:@"GData"]) {
168 168
169 expectedValue = [NSString stringWithFormat:@"%s_%@", 169 expectedValue = [NSString stringWithFormat:@"%s_%@",
170 GDATA_TARGET_NAMESPACE_STRING, expectedValue]; 170 GDATA_TARGET_NAMESPACE_STRING, expectedValue];
171 } 171 }
172 #endif 172 #endif
173 173
174 STAssertTrue(AreEqualOrBothNil(result, expectedValue), @"failed object %@ \n testing key path '%@'\n %@ \n!= \n %@", 174 STAssertTrue(AreEqualOrBothNil(result, expectedValue), @"failed object %@ \n testing key path '%@'\n %@ \n!= \n %@",
175 feed2, keyPath, result, expectedValue); 175 feed2, keyPath, result, expectedValue);
176 } 176 }
177 } 177 }
178 } 178 }
179 } 179 }
180 180
181 - (void)testBooksFeed { 181 - (void)testBooksFeed {
182 182
183 // 183 //
184 // Volumes Feed 184 // Volumes Feed
185 // 185 //
186 TestKeyPathValues tests[] = 186 TestKeyPathValues tests[] =
187 { 187 {
188 { @"GDataFeedVolume", @"Tests/FeedBooksVolumesTest1.xml" }, 188 { @"GDataFeedVolume", @"Tests/FeedBooksVolumesTest1.xml" },
189 189
190 // GDataFeedVolume paths 190 // GDataFeedVolume paths
191 { @"identifier", @"http://www.google.com/books/feeds/users/1728172424007912469/volumes" }, 191 { @"identifier", @"http://www.google.com/books/feeds/users/1728172424007912469/volumes" },
192 { @"authors.0.name", @"1728172424007912469" }, 192 { @"authors.0.name", @"1728172424007912469" },
193 193
194 // GDataEntryVolume paths 194 // GDataEntryVolume paths
195 { @"entries.0.creators.0", @"Jim Davis" }, 195 { @"entries.0.creators.0", @"Jim Davis" },
196 { @"entries.0.dates.0", @"2006-01-31" }, 196 { @"entries.0.dates.0", @"2006-01-31" },
197 { @"entries.0.volumeDescriptions.0", @"contains:Pig Out" }, 197 { @"entries.0.volumeDescriptions.0", @"contains:Pig Out" },
198 { @"entries.0.embeddability", kGDataBooksNotEmbeddable }, 198 { @"entries.0.embeddability", kGDataBooksNotEmbeddable },
199 { @"entries.0.openAccess", kGDataBooksEnabled }, 199 { @"entries.0.openAccess", kGDataBooksEnabled },
200 { @"entries.0.formats.0", @"93 pages" }, 200 { @"entries.0.formats.0", @"93 pages" },
201 { @"entries.0.volumeIdentifiers.0", @"_PRJAAAACAAJ" }, 201 { @"entries.0.volumeIdentifiers.0", @"_PRJAAAACAAJ" },
202 { @"entries.0.volumeIdentifiers.1", @"ISBN:0345464664" }, 202 { @"entries.0.volumeIdentifiers.1", @"ISBN:0345464664" },
203 { @"entries.0.publishers.0", @"Ballantine Books" }, 203 { @"entries.0.publishers.0", @"Ballantine Books" },
204 { @"entries.0.subjects.0", @"Humor" }, 204 { @"entries.0.subjects.0", @"Humor" },
205 { @"entries.0.volumeTitles.0", @"Garfield Pigs Out" }, 205 { @"entries.0.volumeTitles.0", @"Garfield Pigs Out" },
206 { @"entries.0.viewability", kGDataBooksViewNoPages }, 206 { @"entries.0.viewability", kGDataBooksViewNoPages },
207 { @"entries.0.thumbnailLink.href", @"hasPrefix:http://bks2.books.google.com/books?id=_PRJAAAACAAJ" }, 207 { @"entries.0.thumbnailLink.href", @"hasPrefix:http://bks2.books.google.com/books?id=_PRJAAAACAAJ" },
208 { @"entries.0.previewLink.href", @"contains:id=_PRJAAAACAAJ&ie=ISO-8859-1" }, 208 { @"entries.0.previewLink.href", @"contains:id=_PRJAAAACAAJ&ie=ISO-8859-1" },
209 { @"entries.0.infoLink.href", @"contains:id=_PRJAAAACAAJ&ie=ISO-8859-1" }, 209 { @"entries.0.infoLink.href", @"contains:id=_PRJAAAACAAJ&ie=ISO-8859-1" },
210 { @"entries.0.rating.value", @"3" }, 210 { @"entries.0.rating.value", @"3" },
211 { @"entries.0.rating.average", @"2" }, 211 { @"entries.0.rating.average", @"2" },
212 { @"entries.0.review", @"Ageless? No way." }, 212 { @"entries.0.review", @"Ageless? No way." },
213 { @"entries.0.contentVersion", @"1.2beta5" }, 213 { @"entries.0.contentVersion", @"1.2beta5" },
214 { @"", @"" }, 214 { @"", @"" },
215 215
216 { nil, nil } 216 { nil, nil }
217 }; 217 };
218 218
219 [self runTests:tests]; 219 [self runTests:tests];
220 } 220 }
221 221
222 - (void)testCalendarFeed { 222 - (void)testCalendarFeed {
223 223
224 TestKeyPathValues tests[] = 224 TestKeyPathValues tests[] =
225 { 225 {
226 // 226 //
227 // Calendar Feed 227 // Calendar Feed
228 // 228 //
229 { @"GDataFeedCalendar/2.0", @"Tests/FeedCalendarTest1.xml" }, 229 { @"GDataFeedCalendar/2.0", @"Tests/FeedCalendarTest1.xml" },
230 230
231 // GDataFeedCalendar paths 231 // GDataFeedCalendar paths
232 { @"title", @"Fred Flintstone's Calendar List" }, 232 { @"title", @"Fred Flintstone's Calendar List" },
233 { @"links.1.rel", kGDataLinkRelPost }, 233 { @"links.1.rel", kGDataLinkRelPost },
234 { @"links.2.rel", @"self" }, 234 { @"links.2.rel", @"self" },
235 { @"authors.0.name", @"Fred Flintstone" }, 235 { @"authors.0.name", @"Fred Flintstone" },
236 { @"authors.0.email", @"fred@gmail.com" }, 236 { @"authors.0.email", @"fred@gmail.com" },
237 { @"generator.URI", @"http://www.google.com/calendar" }, 237 { @"generator.URI", @"http://www.google.com/calendar" },
238 { @"generator.name", @"Google Calendar" }, 238 { @"generator.name", @"Google Calendar" },
239 { @"generator.version", @"1.0" }, 239 { @"generator.version", @"1.0" },
240 { @"startIndex", @"1" }, 240 { @"startIndex", @"1" },
241 { @"itemsPerPage", @"3" }, 241 { @"itemsPerPage", @"3" },
242 { @"ETag", @"Nofzeigeritznum" }, 242 { @"ETag", @"Nofzeigeritznum" },
243 { @"fieldSelection", @"@gd:*,link" }, 243 { @"fieldSelection", @"@gd:*,link" },
244 244
245 { @"unknownAttributes.@count", @"0" }, 245 { @"unknownAttributes.@count", @"0" },
246 { @"unknownChildren.@count", @"0" }, 246 { @"unknownChildren.@count", @"0" },
247 247
248 // GDataEntryCalendar paths 248 // GDataEntryCalendar paths
249 { @"entries.0.identifier", @"http://www.google.com/calendar/feeds/test%40domain.net/test%40domain.net" }, 249 { @"entries.0.identifier", @"http://www.google.com/calendar/feeds/test%40domain.net/test%40domain.net" },
250 { @"entries.0.publishedDate.RFC3339String", @"2006-11-14T00:03:38Z" }, 250 { @"entries.0.publishedDate.RFC3339String", @"2006-11-14T00:03:38Z" },
251 { @"entries.0.updatedDate.RFC3339String", @"2006-11-09T00:16:10Z" }, 251 { @"entries.0.updatedDate.RFC3339String", @"2006-11-09T00:16:10Z" },
252 { @"entries.0.editedDate.RFC3339String", @"2006-11-09T00:16:15Z" }, 252 { @"entries.0.editedDate.RFC3339String", @"2006-11-09T00:16:15Z" },
253 { @"entries.0.title", @"Fred Flintstone" }, 253 { @"entries.0.title", @"Fred Flintstone" },
254 { @"entries.0.links.0.rel", @"alternate" }, 254 { @"entries.0.links.0.rel", @"alternate" },
255 { @"entries.0.links.1.href", @"http://www.google.com/calendar/feeds/test%40domain.net/test%40domain.net" }, 255 { @"entries.0.links.1.href", @"http://www.google.com/calendar/feeds/test%40domain.net/test%40domain.net" },
256 { @"entries.0.authors.0.name", @"Fred Flintstone" }, 256 { @"entries.0.authors.0.name", @"Fred Flintstone" },
257 { @"entries.0.authors.0.email", @"fred@gmail.com" }, 257 { @"entries.0.authors.0.email", @"fred@gmail.com" },
258 { @"entries.0.isHidden", @"0" }, 258 { @"entries.0.isHidden", @"0" },
259 { @"entries.0.timeZoneName", @"America/Los_Angeles" }, 259 { @"entries.0.timeZoneName", @"America/Los_Angeles" },
260 { @"entries.0.timesCleaned", @"31" }, 260 { @"entries.0.timesCleaned", @"31" },
261 { @"entries.0.color", @"#B1365F" }, 261 { @"entries.0.color", @"#B1365F" },
262 { @"entries.0.accessLevel", kGDataCalendarAccessOwner}, 262 { @"entries.0.accessLevel", kGDataCalendarAccessOwner},
263 { @"entries.0.overrideName", @"over-ride-name" }, 263 { @"entries.0.overrideName", @"over-ride-name" },
264 { @"entries.0.ETag", @"W/C04EQXc6fCp7ImA9WxZbGUU." }, 264 { @"entries.0.ETag", @"W/C04EQXc6fCp7ImA9WxZbGUU." },
265 { @"entries.0.fieldSelection", @"@gd:*,title,gd:when" }, 265 { @"entries.0.fieldSelection", @"@gd:*,title,gd:when" },
266 { @"entries.1.locations.0", @"Joes Pub" }, 266 { @"entries.1.locations.0", @"Joes Pub" },
267 { @"entries.1.fieldSelection", nil }, 267 { @"entries.1.fieldSelection", nil },
268 { @"entries.2.isSelected", @"0" }, 268 { @"entries.2.isSelected", @"0" },
269 { @"entries.2.isHidden", @"1" }, 269 { @"entries.2.isHidden", @"1" },
270 270
271 { @"entries.0.unknownAttributes.@count", @"0" }, 271 { @"entries.0.unknownAttributes.@count", @"0" },
272 { @"entries.0.unknownChildren.@count", @"0" }, 272 { @"entries.0.unknownChildren.@count", @"0" },
273 273
274 { @"", @"" }, // end of feed 274 { @"", @"" }, // end of feed
275 275
276 276
277 // 277 //
278 // CalendarEvent Feed 278 // CalendarEvent Feed
279 // 279 //
280 { @"GDataFeedCalendarEvent", @"Tests/FeedCalendarEventTest1.xml" }, 280 { @"GDataFeedCalendarEvent", @"Tests/FeedCalendarEventTest1.xml" },
281 281
282 // GDataFeedCalendarEvent paths 282 // GDataFeedCalendarEvent paths
283 { @"title", @"Fred Flintstone" }, 283 { @"title", @"Fred Flintstone" },
284 { @"subtitle", @"Fred Flintstone" }, 284 { @"subtitle", @"Fred Flintstone" },
285 { @"links.0.rel", kGDataLinkRelFeed }, 285 { @"links.0.rel", kGDataLinkRelFeed },
286 { @"links.2.rel", @"self" }, 286 { @"links.2.rel", @"self" },
287 { @"authors.0.name", @"Fred Flintstone" }, 287 { @"authors.0.name", @"Fred Flintstone" },
288 { @"authors.0.email", @"fred@gmail.com" }, 288 { @"authors.0.email", @"fred@gmail.com" },
289 { @"identifier", @"http://www.google.com/calendar/feeds/test%40gmail.com/private/full" }, 289 { @"identifier", @"http://www.google.com/calendar/feeds/test%40gmail.com/private/full" },
290 { @"namespaces.gCal", kGDataNamespaceGCal }, 290 { @"namespaces.gCal", kGDataNamespaceGCal },
291 291
292 { @"generator.URI", @"http://www.google.com/calendar" }, 292 { @"generator.URI", @"http://www.google.com/calendar" },
293 { @"generator.name", @"Google Calendar" }, 293 { @"generator.name", @"Google Calendar" },
294 { @"generator.version", @"1.0" }, 294 { @"generator.version", @"1.0" },
295 { @"startIndex", @"1" }, 295 { @"startIndex", @"1" },
296 { @"itemsPerPage", @"100000" }, 296 { @"itemsPerPage", @"100000" },
297 { @"timeZoneName", @"America/Los_Angeles" }, 297 { @"timeZoneName", @"America/Los_Angeles" },
298 { @"timesCleaned", @"7" }, 298 { @"timesCleaned", @"7" },
299 299
300 { @"unknownAttributes.@count", @"0" }, 300 { @"unknownAttributes.@count", @"0" },
301 { @"unknownChildren.@count", @"0" }, 301 { @"unknownChildren.@count", @"0" },
302 302
303 // GDataEntryCalendarEvent paths 303 // GDataEntryCalendarEvent paths
304 { @"entries.0.identifier", @"contains:i12d4avieju0vogcga72aj3908" }, 304 { @"entries.0.identifier", @"contains:i12d4avieju0vogcga72aj3908" },
305 305
306 { @"entries.0.publishedDate.RFC3339String", @"2006-10-27T22:48:14Z" }, 306 { @"entries.0.publishedDate.RFC3339String", @"2006-10-27T22:48:14Z" },
307 { @"entries.0.updatedDate.RFC3339String", @"2006-11-03T21:17:40Z" }, 307 { @"entries.0.updatedDate.RFC3339String", @"2006-11-03T21:17:40Z" },
308 { @"entries.0.title", @"3 days" }, 308 { @"entries.0.title", @"3 days" },
309 { @"entries.0.content", @"The description field" }, 309 { @"entries.0.content", @"The description field" },
310 310
311 { @"entries.0.links.0.title", @"alternate" }, 311 { @"entries.0.links.0.title", @"alternate" },
312 { @"entries.0.links.1.rel", @"self" }, 312 { @"entries.0.links.1.rel", @"self" },
313 { @"entries.0.authors.0.name", @"Fred Flintstone" }, 313 { @"entries.0.authors.0.name", @"Fred Flintstone" },
314 { @"entries.0.authors.0.email", @"fred@gmail.com" }, 314 { @"entries.0.authors.0.email", @"fred@gmail.com" },
315 { @"entries.0.visibility", kGDataEventVisibilityDefault }, 315 { @"entries.0.visibility", kGDataEventVisibilityDefault },
316 { @"entries.0.comment.feedLink.href", @"contains:i12d4avieju0vogcga72aj3908/comments" }, 316 { @"entries.0.comment.feedLink.href", @"contains:i12d4avieju0vogcga72aj3908/comments" },
317 { @"entries.0.shouldSendEventNotifications", @"0" }, 317 { @"entries.0.shouldSendEventNotifications", @"0" },
318 { @"entries.0.isQuickAdd", @"0" }, 318 { @"entries.0.isQuickAdd", @"0" },
319 { @"entries.0.transparency", kGDataEventTransparencyOpaque }, 319 { @"entries.0.transparency", kGDataEventTransparencyOpaque },
320 { @"entries.0.eventStatus", kGDataEventStatusConfirmed }, 320 { @"entries.0.eventStatus", kGDataEventStatusConfirmed },
321 { @"entries.0.participants.0.email", @"FredFlintstone@gmail.com" }, 321 { @"entries.0.participants.0.email", @"FredFlintstone@gmail.com" },
322 { @"entries.0.participants.0.rel", kGDataWhoEventAttendee }, 322 { @"entries.0.participants.0.rel", kGDataWhoEventAttendee },
323 { @"entries.0.participants.0.attendeeStatus", kGDataWhoAttendeeStatusDeclined }, 323 { @"entries.0.participants.0.attendeeStatus", kGDataWhoAttendeeStatusDeclined },
324 { @"entries.0.participants.1.numberOfAdditionalGuests", @"5" }, 324 { @"entries.0.participants.1.numberOfAdditionalGuests", @"5" },
325 { @"entries.0.participants.1.email", @"FredFlintstone@google.com" }, 325 { @"entries.0.participants.1.email", @"FredFlintstone@google.com" },
326 { @"entries.0.participants.2.email", @"freg@gmail.com" }, 326 { @"entries.0.participants.2.email", @"freg@gmail.com" },
327 { @"entries.0.times.0.endTime.RFC3339String", @"2006-11-16" }, 327 { @"entries.0.times.0.endTime.RFC3339String", @"2006-11-16" },
328 { @"entries.0.times.0.reminders.0.minutes", @"10" }, 328 { @"entries.0.times.0.reminders.0.minutes", @"10" },
329 { @"entries.0.locations.0", @"The-where-field" }, 329 { @"entries.0.locations.0", @"The-where-field" },
330 { @"entries.0.locations.0.rel", nil }, 330 { @"entries.0.locations.0.rel", nil },
331 { @"entries.0.sequenceNumber", @"2" }, 331 { @"entries.0.sequenceNumber", @"2" },
332 { @"entries.0.iCalUID", @"4A24A0FF-EA3A-4839-AA09-F4283CB6D345" }, 332 { @"entries.0.iCalUID", @"4A24A0FF-EA3A-4839-AA09-F4283CB6D345" },
333 { @"entries.0.canGuestsModify", @"0" }, 333 { @"entries.0.canGuestsModify", @"0" },
334 { @"entries.0.canGuestsInviteOthers", @"0" }, 334 { @"entries.0.canGuestsInviteOthers", @"0" },
335 { @"entries.0.canGuestsSeeGuests", @"0" }, 335 { @"entries.0.canGuestsSeeGuests", @"0" },
336 { @"entries.0.canAnyoneAddSelf", @"0" }, 336 { @"entries.0.canAnyoneAddSelf", @"0" },
337 { @"entries.1.recurrence", @"hasPrefix:DTSTART;VALUE=DATE:20061120" }, 337 { @"entries.1.recurrence", @"hasPrefix:DTSTART;VALUE=DATE:20061120" },
338 { @"entries.1.reminders.0.minutes", @"10" }, 338 { @"entries.1.reminders.0.minutes", @"10" },
339 { @"entries.1.isDeleted", @"0" }, 339 { @"entries.1.isDeleted", @"0" },
340 { @"entries.3.locations.0", @"Seattle" }, 340 { @"entries.3.locations.0", @"Seattle" },
341 { @"entries.3.isDeleted", @"1" }, 341 { @"entries.3.isDeleted", @"1" },
342 { @"entries.3.canGuestsModify", @"1" }, 342 { @"entries.3.canGuestsModify", @"1" },
343 { @"entries.3.canGuestsInviteOthers", @"1" }, 343 { @"entries.3.canGuestsInviteOthers", @"1" },
344 { @"entries.3.canGuestsSeeGuests", @"1" }, 344 { @"entries.3.canGuestsSeeGuests", @"1" },
345 { @"entries.3.canAnyoneAddSelf", @"1" }, 345 { @"entries.3.canAnyoneAddSelf", @"1" },
346 346
347 { @"entries.0.unknownAttributes.@count", @"0" }, 347 { @"entries.0.unknownAttributes.@count", @"0" },
348 { @"entries.0.unknownChildren.@count", @"0" }, 348 { @"entries.0.unknownChildren.@count", @"0" },
349 349
350 { @"", @"" }, // end of feed 350 { @"", @"" }, // end of feed
351 351
352 // 352 //
353 // CalendarEvent Feed with no entries 353 // CalendarEvent Feed with no entries
354 // 354 //
355 { @"GDataFeedCalendarEvent", @"Tests/FeedCalendarEventTest0.xml" }, 355 { @"GDataFeedCalendarEvent", @"Tests/FeedCalendarEventTest0.xml" },
356 356
357 // GDataFeedCalendarEvent paths 357 // GDataFeedCalendarEvent paths
358 { @"title", @"Fred Flintstone" }, 358 { @"title", @"Fred Flintstone" },
359 { @"subtitle", @"Fred Flintstone" }, 359 { @"subtitle", @"Fred Flintstone" },
360 { @"links.0.rel", kGDataLinkRelFeed }, 360 { @"links.0.rel", kGDataLinkRelFeed },
361 { @"links.2.rel", @"self" }, 361 { @"links.2.rel", @"self" },
362 { @"authors.0.name", @"Fred Flintstone" }, 362 { @"authors.0.name", @"Fred Flintstone" },
363 { @"authors.0.email", @"fred@gmail.com" }, 363 { @"authors.0.email", @"fred@gmail.com" },
364 { @"identifier", @"http://www.google.com/calendar/feeds/test%40gmail.com/private/full" }, 364 { @"identifier", @"http://www.google.com/calendar/feeds/test%40gmail.com/private/full" },
365 { @"namespaces.gCal", kGDataNamespaceGCal }, 365 { @"namespaces.gCal", kGDataNamespaceGCal },
366 366
367 { @"generator.URI", @"http://www.google.com/calendar" }, 367 { @"generator.URI", @"http://www.google.com/calendar" },
368 { @"generator.name", @"Google Calendar" }, 368 { @"generator.name", @"Google Calendar" },
369 { @"generator.version", @"1.0" }, 369 { @"generator.version", @"1.0" },
370 { @"startIndex", @"1" }, 370 { @"startIndex", @"1" },
371 { @"itemsPerPage", @"100000" }, 371 { @"itemsPerPage", @"100000" },
372 { @"timeZoneName", @"America/Los_Angeles" }, 372 { @"timeZoneName", @"America/Los_Angeles" },
373 { @"timesCleaned", @"7" }, 373 { @"timesCleaned", @"7" },
374 374
375 { @"unknownAttributes.@count", @"0" }, 375 { @"unknownAttributes.@count", @"0" },
376 { @"unknownChildren.@count", @"0" }, 376 { @"unknownChildren.@count", @"0" },
377 377
378 // GDataEntryCalendarEvent paths 378 // GDataEntryCalendarEvent paths
379 { @"entries.@count", @"0" }, 379 { @"entries.@count", @"0" },
380 380
381 { @"", @"" }, // end of feed 381 { @"", @"" }, // end of feed
382 382
383 { nil, nil } // end of test array 383 { nil, nil } // end of test array
384 }; 384 };
385 385
386 [self runTests:tests]; 386 [self runTests:tests];
387 } 387 }
388 388
389 - (void)testContactsFeed { 389 - (void)testContactsFeed {
390 390
391 TestKeyPathValues tests[] = 391 TestKeyPathValues tests[] =
392 { 392 {
393 // 393 //
394 // Contact Feed 394 // Contact Feed
395 // 395 //
396 { @"GDataFeedContact/2.0", @"Tests/FeedContactTest1.xml" }, 396 { @"GDataFeedContact/2.0", @"Tests/FeedContactTest1.xml" },
397 397
398 // GDataFeedContact paths 398 // GDataFeedContact paths
399 { @"title", @"Contacts" }, 399 { @"title", @"Contacts" },
400 { @"categories.0.term", kGDataCategoryContact }, 400 { @"categories.0.term", kGDataCategoryContact },
401 { @"links.1.rel", kGDataLinkRelPost }, 401 { @"links.1.rel", kGDataLinkRelPost },
402 402
403 { @"unknownAttributes.@count.stringValue", @"0" }, 403 { @"unknownAttributes.@count.stringValue", @"0" },
404 { @"unknownChildren.@count.stringValue", @"0" }, 404 { @"unknownChildren.@count.stringValue", @"0" },
405 405
406 // GDataEntryContact paths 406 // GDataEntryContact paths
407 // First entry is real; second entry is deleted 407 // First entry is real; second entry is deleted
408 { @"entries.0.identifier", @"contains:9cfaae9" }, 408 { @"entries.0.identifier", @"contains:9cfaae9" },
409 { @"entries.0.categories.0.term", kGDataCategoryContact }, 409 { @"entries.0.categories.0.term", kGDataCategoryContact },
410 { @"entries.0.isDeleted", @"0" }, 410 { @"entries.0.isDeleted", @"0" },
411 411
412 { @"entries.0.primaryOrganization.orgName", @"Le Company" }, 412 { @"entries.0.primaryOrganization.orgName", @"Le Company" },
413 413
414 { @"entries.0.organizations.0.orgName", @"Le Company" }, 414 { @"entries.0.organizations.0.orgName", @"Le Company" },
415 { @"entries.0.organizations.0.orgTitle", @"Titularstuff" }, 415 { @"entries.0.organizations.0.orgTitle", @"Titularstuff" },
416 { @"entries.0.organizations.0.label", nil }, 416 { @"entries.0.organizations.0.label", nil },
417 { @"entries.0.organizations.0.rel", kGDataContactOther }, 417 { @"entries.0.organizations.0.rel", kGDataContactOther },
418 { @"entries.0.organizations.0.isPrimary", @"1" }, 418 { @"entries.0.organizations.0.isPrimary", @"1" },
419 419
420 { @"entries.0.organizations.1.orgName", @"Deadhead Associates" }, 420 { @"entries.0.organizations.1.orgName", @"Deadhead Associates" },
421 { @"entries.0.organizations.1.orgTitle", @"Groupie" }, 421 { @"entries.0.organizations.1.orgTitle", @"Groupie" },
422 { @"entries.0.organizations.1.label", @"DAz" }, 422 { @"entries.0.organizations.1.label", @"DAz" },
423 { @"entries.0.organizations.1.rel", nil }, 423 { @"entries.0.organizations.1.rel", nil },
424 { @"entries.0.organizations.1.isPrimary", @"0" }, 424 { @"entries.0.organizations.1.isPrimary", @"0" },
425 425
426 { @"entries.0.primaryIMAddress.address", @"fooaimz" }, 426 { @"entries.0.primaryIMAddress.address", @"fooaimz" },
427 427
428 { @"entries.0.IMAddresses.0.protocol", kGDataIMProtocolAIM }, 428 { @"entries.0.IMAddresses.0.protocol", kGDataIMProtocolAIM },
429 { @"entries.0.IMAddresses.0.address", @"fooaimz" }, 429 { @"entries.0.IMAddresses.0.address", @"fooaimz" },
430 { @"entries.0.IMAddresses.0.label", @"werkz" }, 430 { @"entries.0.IMAddresses.0.label", @"werkz" },
431 { @"entries.0.IMAddresses.0.isPrimary", @"1" }, 431 { @"entries.0.IMAddresses.0.isPrimary", @"1" },
432 432
433 { @"entries.0.IMAddresses.1.protocol", kGDataIMProtocolMSN }, 433 { @"entries.0.IMAddresses.1.protocol", kGDataIMProtocolMSN },
434 { @"entries.0.IMAddresses.1.address", @"foomsn" }, 434 { @"entries.0.IMAddresses.1.address", @"foomsn" },
435 { @"entries.0.IMAddresses.1.label", nil }, 435 { @"entries.0.IMAddresses.1.label", nil },
436 { @"entries.0.IMAddresses.1.rel", kGDataContactHome }, 436 { @"entries.0.IMAddresses.1.rel", kGDataContactHome },
437 { @"entries.0.IMAddresses.1.isPrimary", @"0" }, 437 { @"entries.0.IMAddresses.1.isPrimary", @"0" },
438 438
439 { @"entries.0.IMAddresses.2.protocol", kGDataIMProtocolGoogleTalk }, 439 { @"entries.0.IMAddresses.2.protocol", kGDataIMProtocolGoogleTalk },
440 { @"entries.0.IMAddresses.2.address", @"foo@gmail.com" }, 440 { @"entries.0.IMAddresses.2.address", @"foo@gmail.com" },
441 { @"entries.0.IMAddresses.2.label", nil }, 441 { @"entries.0.IMAddresses.2.label", nil },
442 { @"entries.0.IMAddresses.2.rel", kGDataContactOther }, 442 { @"entries.0.IMAddresses.2.rel", kGDataContactOther },
443 { @"entries.0.IMAddresses.2.isPrimary", @"0" }, 443 { @"entries.0.IMAddresses.2.isPrimary", @"0" },
444 444
445 { @"entries.0.IMAddresses.3.protocol", kGDataIMProtocolJabber }, 445 { @"entries.0.IMAddresses.3.protocol", kGDataIMProtocolJabber },
446 { @"entries.0.IMAddresses.3.address", @"foo@jabber.org" }, 446 { @"entries.0.IMAddresses.3.address", @"foo@jabber.org" },
447 { @"entries.0.IMAddresses.3.label", @"jabz" }, 447 { @"entries.0.IMAddresses.3.label", @"jabz" },
448 { @"entries.0.IMAddresses.3.rel", nil }, 448 { @"entries.0.IMAddresses.3.rel", nil },
449 { @"entries.0.IMAddresses.3.isPrimary", @"0" }, 449 { @"entries.0.IMAddresses.3.isPrimary", @"0" },
450 450
451 { @"entries.0.primaryPhoneNumber.stringValue", @"123-4567" }, 451 { @"entries.0.primaryPhoneNumber.stringValue", @"123-4567" },
452 452
453 { @"entries.0.phoneNumbers.0.stringValue", @"123-4567" }, 453 { @"entries.0.phoneNumbers.0.stringValue", @"123-4567" },
454 { @"entries.0.phoneNumbers.0.label", nil }, 454 { @"entries.0.phoneNumbers.0.label", nil },
455 { @"entries.0.phoneNumbers.0.rel", kGDataPhoneNumberMobile }, 455 { @"entries.0.phoneNumbers.0.rel", kGDataPhoneNumberMobile },
456 { @"entries.0.phoneNumbers.0.isPrimary", @"1" }, 456 { @"entries.0.phoneNumbers.0.isPrimary", @"1" },
457 457
458 { @"entries.0.phoneNumbers.1.stringValue", @"333-1414" }, 458 { @"entries.0.phoneNumbers.1.stringValue", @"333-1414" },
459 { @"entries.0.phoneNumbers.1.label", @"shoefone" }, 459 { @"entries.0.phoneNumbers.1.label", @"shoefone" },
460 { @"entries.0.phoneNumbers.1.rel", nil }, 460 { @"entries.0.phoneNumbers.1.rel", nil },
461 { @"entries.0.phoneNumbers.1.isPrimary", @"0" }, 461 { @"entries.0.phoneNumbers.1.isPrimary", @"0" },
462 462
463 { @"entries.0.primaryPostalAddress.stringValue", @"123 Lane St" }, 463 { @"entries.0.primaryPostalAddress.stringValue", @"123 Lane St" },
464 464
465 { @"entries.0.postalAddresses.0.stringValue", @"123 Lane St" }, 465 { @"entries.0.postalAddresses.0.stringValue", @"123 Lane St" },
466 { @"entries.0.postalAddresses.0.label", nil }, 466 { @"entries.0.postalAddresses.0.label", nil },
467 { @"entries.0.postalAddresses.0.rel", kGDataContactHome }, 467 { @"entries.0.postalAddresses.0.rel", kGDataContactHome },
468 { @"entries.0.postalAddresses.0.isPrimary", @"1" }, 468 { @"entries.0.postalAddresses.0.isPrimary", @"1" },
469 469
470 { @"entries.0.primaryEmailAddress.address", @"foo@bar.com" }, 470 { @"entries.0.primaryEmailAddress.address", @"foo@bar.com" },
471 471
472 { @"entries.0.emailAddresses.0.address", @"foo@bar.com" }, 472 { @"entries.0.emailAddresses.0.address", @"foo@bar.com" },
473 { @"entries.0.emailAddresses.0.label", nil }, 473 { @"entries.0.emailAddresses.0.label", nil },
474 { @"entries.0.emailAddresses.0.rel", kGDataContactHome }, 474 { @"entries.0.emailAddresses.0.rel", kGDataContactHome },
475 { @"entries.0.emailAddresses.0.isPrimary", @"1" }, 475 { @"entries.0.emailAddresses.0.isPrimary", @"1" },
476 476
477 { @"entries.0.emailAddresses.1.address", @"2@bar.com" }, 477 { @"entries.0.emailAddresses.1.address", @"2@bar.com" },
478 { @"entries.0.emailAddresses.1.label", @"norzglie" }, 478 { @"entries.0.emailAddresses.1.label", @"norzglie" },
479 { @"entries.0.emailAddresses.1.rel", nil }, 479 { @"entries.0.emailAddresses.1.rel", nil },
480 { @"entries.0.emailAddresses.1.isPrimary", @"0" }, 480 { @"entries.0.emailAddresses.1.isPrimary", @"0" },
481 481
482 { @"entries.0.groupMembershipInfos.0.href", @"http://www.google.com/m8/feeds/contactGroups/user@gmail.com/full/2" }, 482 { @"entries.0.groupMembershipInfos.0.href", @"http://www.google.com/m8/feeds/contactGroups/user@gmail.com/full/2" },
483 { @"entries.0.groupMembershipInfos.0.isDeleted", @"1" }, 483 { @"entries.0.groupMembershipInfos.0.isDeleted", @"1" },
484 484
485 { @"entries.0.extendedProperties.0.name", @"com.mycompany.myprop" }, 485 { @"entries.0.extendedProperties.0.name", @"com.mycompany.myprop" },
486 { @"entries.0.extendedProperties.0.value", @"zoop" }, 486 { @"entries.0.extendedProperties.0.value", @"zoop" },
487 { @"entries.0.extendedProperties.0.XMLValues", nil }, 487 { @"entries.0.extendedProperties.0.XMLValues", nil },
488 488
489 { @"entries.0.extendedProperties.1.name", @"com.mycompany.myprop2" }, 489 { @"entries.0.extendedProperties.1.name", @"com.mycompany.myprop2" },
490 { @"entries.0.extendedProperties.1.value", nil }, 490 { @"entries.0.extendedProperties.1.value", nil },
491 { @"entries.0.extendedProperties.1.XMLValues.0.XMLString", @"<myXML><myChild attr=\"nerf\"></myChild></myXML>" }, 491 { @"entries.0.extendedProperties.1.XMLValues.0.XMLString", @"<myXML><myChild attr=\"nerf\"></myChild></myXML>" },
492 { @"entries.0.extendedProperties.1.unknownChildren.@count.stringValue", @"0" }, 492 { @"entries.0.extendedProperties.1.unknownChildren.@count.stringValue", @"0" },
493 493
494 { @"entries.1.identifier", @"contains:b001135" }, 494 { @"entries.1.identifier", @"contains:b001135" },
495 { @"entries.1.categories.0.term", kGDataCategoryContact }, 495 { @"entries.1.categories.0.term", kGDataCategoryContact },
496 { @"entries.1.isDeleted", @"1" }, 496 { @"entries.1.isDeleted", @"1" },
497 497
498 { @"entries.0.unknownAttributes.@count.stringValue", @"0" }, 498 { @"entries.0.unknownAttributes.@count.stringValue", @"0" },
499 { @"entries.0.unknownChildren.@count.stringValue", @"0" }, 499 { @"entries.0.unknownChildren.@count.stringValue", @"0" },
500 500
501 { @"", @"" }, // end of feed 501 { @"", @"" }, // end of feed
502 502
503 // 503 //
504 // Contact Feed with V3 elements 504 // Contact Feed with V3 elements
505 // 505 //
506 { @"GDataFeedContact/3.0", @"Tests/FeedContactTest2.xml" }, 506 { @"GDataFeedContact/3.0", @"Tests/FeedContactTest2.xml" },
507 507
508 // GDataFeedContact paths 508 // GDataFeedContact paths
509 { @"title", @"Fred Flintstone's Contacts" }, 509 { @"title", @"Fred Flintstone's Contacts" },
510 { @"categories.0.term", kGDataCategoryContact }, 510 { @"categories.0.term", kGDataCategoryContact },
511 { @"ETag", @"W/\"DkYHQHgzfCt7ImA9WxJREEU.\"" }, 511 { @"ETag", @"W/\"DkYHQHgzfCt7ImA9WxJREEU.\"" },
512 512
513 { @"unknownAttributes.@count.stringValue", @"0" }, 513 { @"unknownAttributes.@count.stringValue", @"0" },
514 { @"unknownChildren.@count.stringValue", @"0" }, 514 { @"unknownChildren.@count.stringValue", @"0" },
515 515
516 // GDataEntryContact paths 516 // GDataEntryContact paths
517 { @"entries.0.identifier", @"contains:754fdf0c0db53ab3" }, 517 { @"entries.0.identifier", @"contains:754fdf0c0db53ab3" },
518 { @"entries.0.categories.0.term", kGDataCategoryContact }, 518 { @"entries.0.categories.0.term", kGDataCategoryContact },
519 { @"entries.0.isDeleted", @"0" }, 519 { @"entries.0.isDeleted", @"0" },
520 { @"entries.0.ETag", @"\"Rno_eTVSLyt7ImA9WxJREEUORwc.\"" }, 520 { @"entries.0.ETag", @"\"Rno_eTVSLyt7ImA9WxJREEUORwc.\"" },
521 { @"entries.0.editedDate.RFC3339String", @"2009-05-11T23:20:37Z" }, 521 { @"entries.0.editedDate.RFC3339String", @"2009-05-11T23:20:37Z" },
522 522
523 { @"entries.0.primaryOrganization.orgName", @"Acme Corp." }, 523 { @"entries.0.primaryOrganization.orgName", @"Acme Corp." },
524 524
525 { @"entries.0.organizations.0.orgName", @"Acme Corp." }, 525 { @"entries.0.organizations.0.orgName", @"Acme Corp." },
526 { @"entries.0.organizations.0.orgTitle", nil }, 526 { @"entries.0.organizations.0.orgTitle", nil },
527 { @"entries.0.organizations.0.label", nil }, 527 { @"entries.0.organizations.0.label", nil },
528 { @"entries.0.organizations.0.rel", kGDataContactWork }, 528 { @"entries.0.organizations.0.rel", kGDataContactWork },
529 { @"entries.0.organizations.0.isPrimary", @"1" }, 529 { @"entries.0.organizations.0.isPrimary", @"1" },
530 530
531 { @"entries.0.primaryIMAddress.address", nil }, 531 { @"entries.0.primaryIMAddress.address", nil },
532 532
533 { @"entries.0.IMAddresses.0.protocol", kGDataIMProtocolGoogleTalk }, 533 { @"entries.0.IMAddresses.0.protocol", kGDataIMProtocolGoogleTalk },
534 { @"entries.0.IMAddresses.0.address", @"fredsim@example.com" }, 534 { @"entries.0.IMAddresses.0.address", @"fredsim@example.com" },
535 { @"entries.0.IMAddresses.0.label", @"main messaging addr" }, 535 { @"entries.0.IMAddresses.0.label", @"main messaging addr" },
536 { @"entries.0.IMAddresses.0.rel", nil }, 536 { @"entries.0.IMAddresses.0.rel", nil },
537 { @"entries.0.IMAddresses.0.isPrimary", @"0" }, 537 { @"entries.0.IMAddresses.0.isPrimary", @"0" },
538 538
539 { @"entries.0.primaryPhoneNumber.stringValue", @"425-555-1234" }, 539 { @"entries.0.primaryPhoneNumber.stringValue", @"425-555-1234" },
540 540
541 { @"entries.0.phoneNumbers.0.stringValue", @"425-555-1234" }, 541 { @"entries.0.phoneNumbers.0.stringValue", @"425-555-1234" },
542 { @"entries.0.phoneNumbers.0.label", @"Grand Central" }, 542 { @"entries.0.phoneNumbers.0.label", @"Grand Central" },
543 { @"entries.0.phoneNumbers.0.rel", nil }, 543 { @"entries.0.phoneNumbers.0.rel", nil },
544 { @"entries.0.phoneNumbers.0.isPrimary", @"1" }, 544 { @"entries.0.phoneNumbers.0.isPrimary", @"1" },
545 545
546 { @"entries.0.phoneNumbers.1.stringValue", @"425-555-0000" }, 546 { @"entries.0.phoneNumbers.1.stringValue", @"425-555-0000" },
547 { @"entries.0.phoneNumbers.1.label", nil }, 547 { @"entries.0.phoneNumbers.1.label", nil },
548 { @"entries.0.phoneNumbers.1.rel", kGDataPhoneNumberCar }, 548 { @"entries.0.phoneNumbers.1.rel", kGDataPhoneNumberCar },
549 { @"entries.0.phoneNumbers.1.isPrimary", @"0" }, 549 { @"entries.0.phoneNumbers.1.isPrimary", @"0" },
550 550
551 { @"entries.0.primaryStructuredPostalAddress.street", @"301 Cobblestone Way" }, 551 { @"entries.0.primaryStructuredPostalAddress.street", @"301 Cobblestone Way" },
552 552
553 { @"entries.0.structuredPostalAddresses.0.street", @"301 Cobblestone Way" }, 553 { @"entries.0.structuredPostalAddresses.0.street", @"301 Cobblestone Way" },
554 { @"entries.0.structuredPostalAddresses.0.postCode", @"12345" }, 554 { @"entries.0.structuredPostalAddresses.0.postCode", @"12345" },
555 { @"entries.0.structuredPostalAddresses.0.formattedAddress", @"301 Cobblestone Way\nBedrock, CA 12345\nUnited States" }, 555 { @"entries.0.structuredPostalAddresses.0.formattedAddress", @"301 Cobblestone Way\nBedrock, CA 12345\nUnited States" },
556 { @"entries.0.structuredPostalAddresses.0.region", @"CA" }, 556 { @"entries.0.structuredPostalAddresses.0.region", @"CA" },
557 { @"entries.0.structuredPostalAddresses.0.countryName", @"United States" }, 557 { @"entries.0.structuredPostalAddresses.0.countryName", @"United States" },
558 { @"entries.0.structuredPostalAddresses.0.label", nil }, 558 { @"entries.0.structuredPostalAddresses.0.label", nil },
559 { @"entries.0.structuredPostalAddresses.0.rel", kGDataContactHome }, 559 { @"entries.0.structuredPostalAddresses.0.rel", kGDataContactHome },
560 { @"entries.0.structuredPostalAddresses.0.isPrimary", @"1" }, 560 { @"entries.0.structuredPostalAddresses.0.isPrimary", @"1" },
561 561
562 { @"entries.0.primaryEmailAddress.address", @"fred@example.com" }, 562 { @"entries.0.primaryEmailAddress.address", @"fred@example.com" },
563 563
564 { @"entries.0.emailAddresses.0.address", @"fred@example.com" }, 564 { @"entries.0.emailAddresses.0.address", @"fred@example.com" },
565 { @"entries.0.emailAddresses.0.label", nil }, 565 { @"entries.0.emailAddresses.0.label", nil },
566 { @"entries.0.emailAddresses.0.rel", kGDataContactHome }, 566 { @"entries.0.emailAddresses.0.rel", kGDataContactHome },
567 { @"entries.0.emailAddresses.0.isPrimary", @"1" }, 567 { @"entries.0.emailAddresses.0.isPrimary", @"1" },
568 568
569 { @"entries.0.groupMembershipInfos.0.href", @"http://www.google.com/m8/feeds/groups/fredflintstone%40example.com/base/6" }, 569 { @"entries.0.groupMembershipInfos.0.href", @"http://www.google.com/m8/feeds/groups/fredflintstone%40example.com/base/6" },
570 { @"entries.0.groupMembershipInfos.0.isDeleted", @"0" }, 570 { @"entries.0.groupMembershipInfos.0.isDeleted", @"0" },
571 571
572 { @"entries.0.extendedProperties.0.name", @"fredprop" }, 572 { @"entries.0.extendedProperties.0.name", @"fredprop" },
573 { @"entries.0.extendedProperties.0.value", @"12345" }, 573 { @"entries.0.extendedProperties.0.value", @"12345" },
574 { @"entries.0.extendedProperties.0.XMLValues", nil }, 574 { @"entries.0.extendedProperties.0.XMLValues", nil },
575 575
576 { @"entries.0.billingInformation", @"account overdue" }, 576 { @"entries.0.billingInformation", @"account overdue" },
577 577
578 { @"entries.0.birthday", @"1990-12-01" }, 578 { @"entries.0.birthday", @"1990-12-01" },
579 { @"entries.0.birthdayDate.timeIntervalSince1970", @"660052800" }, 579 { @"entries.0.birthdayDate.timeIntervalSince1970", @"660052800" },
580 580
581 { @"entries.0.calendarLinks.0.rel", nil }, 581 { @"entries.0.calendarLinks.0.rel", nil },
582 { @"entries.0.calendarLinks.0.label", @"full calendar" }, 582 { @"entries.0.calendarLinks.0.label", @"full calendar" },
583 { @"entries.0.calendarLinks.0.href", @"http://www.google.com/calendar/render" }, 583 { @"entries.0.calendarLinks.0.href", @"http://www.google.com/calendar/render" },
584 { @"entries.0.primaryCalendarLink.label", @"full calendar" }, 584 { @"entries.0.primaryCalendarLink.label", @"full calendar" },
585 585
586 { @"entries.0.directoryServer", @"dir server" }, 586 { @"entries.0.directoryServer", @"dir server" },
587 587
588 // { @"entries.0.events.0", @"" }, 588 // { @"entries.0.events.0", @"" },
589 589
590 { @"entries.0.externalIDs.0.label", @"ext id" }, 590 { @"entries.0.externalIDs.0.label", @"ext id" },
591 { @"entries.0.externalIDs.0.rel", nil }, 591 { @"entries.0.externalIDs.0.rel", nil },
592 { @"entries.0.externalIDs.0.stringValue", @"54321" }, 592 { @"entries.0.externalIDs.0.stringValue", @"54321" },
593 593
594 { @"entries.0.gender", @"male" }, 594 { @"entries.0.gender", @"male" },
595 595
596 { @"entries.0.hobbies.0.stringValue", @"gurgling" }, 596 { @"entries.0.hobbies.0.stringValue", @"gurgling" },
597 597
598 { @"entries.0.initials", @"F.F." }, 598 { @"entries.0.initials", @"F.F." },
599 599
600 { @"entries.0.jots.0.rel", kGDataContactJotHome }, 600 { @"entries.0.jots.0.rel", kGDataContactJotHome },
601 { @"entries.0.jots.0.stringValue", @"1248" }, 601 { @"entries.0.jots.0.stringValue", @"1248" },
602 602
603 // { @"entries.0.languages.0", @"" }, 603 // { @"entries.0.languages.0", @"" },
604 604
605 { @"entries.0.maidenName", @"Marshovitzky" }, 605 { @"entries.0.maidenName", @"Marshovitzky" },
606 606
607 { @"entries.0.mileage", @"42 miles" }, 607 { @"entries.0.mileage", @"42 miles" },
608 608
609 { @"entries.0.name.fullName", @"Fred Flintstone" }, 609 { @"entries.0.name.fullName", @"Fred Flintstone" },
610 { @"entries.0.name.givenName", @"Fred" }, 610 { @"entries.0.name.givenName", @"Fred" },
611 { @"entries.0.name.familyName", @"Flintstone" }, 611 { @"entries.0.name.familyName", @"Flintstone" },
612 612
613 { @"entries.0.nickname", @"Rocks" }, 613 { @"entries.0.nickname", @"Rocks" },
614 614
615 { @"entries.0.occupation", @"TV Personality" }, 615 { @"entries.0.occupation", @"TV Personality" },
616 616
617 { @"entries.0.priority", kGDataContactPriorityLow }, 617 { @"entries.0.priority", kGDataContactPriorityLow },
618 618
619 { @"entries.0.relations.0.rel", kGDataContactRelationPartner }, 619 { @"entries.0.relations.0.rel", kGDataContactRelationPartner },
620 { @"entries.0.relations.0.label", nil }, 620 { @"entries.0.relations.0.label", nil },
621 { @"entries.0.relations.0.stringValue", @"Wilma" }, 621 { @"entries.0.relations.0.stringValue", @"Wilma" },
622 622
623 { @"entries.0.sensitivity", kGDataContactSensitivityNormal }, 623 { @"entries.0.sensitivity", kGDataContactSensitivityNormal },
624 624
625 { @"entries.0.shortName", @"Freddy" }, 625 { @"entries.0.shortName", @"Freddy" },
626 626
627 { @"entries.0.subject", @"subject val" }, 627 { @"entries.0.subject", @"subject val" },
628 628
629 { @"entries.0.userDefinedFields.0.key", @"Cat" }, 629 { @"entries.0.userDefinedFields.0.key", @"Cat" },
630 { @"entries.0.userDefinedFields.0.stringValue", @"Cheezeburger" }, 630 { @"entries.0.userDefinedFields.0.stringValue", @"Cheezeburger" },
631 631
632 { @"entries.0.websiteLinks.0.href", @"http://example.com/site.html" }, 632 { @"entries.0.websiteLinks.0.href", @"http://example.com/site.html" },
633 { @"entries.0.websiteLinks.0.rel", kGDataContactWebsiteLinkHomePage }, 633 { @"entries.0.websiteLinks.0.rel", kGDataContactWebsiteLinkHomePage },
634 { @"entries.0.websiteLinks.0.label", nil }, 634 { @"entries.0.websiteLinks.0.label", nil },
635 { @"entries.0.websiteLinks.0.isPrimary", @"0" }, 635 { @"entries.0.websiteLinks.0.isPrimary", @"0" },
636 636
637 { @"entries.0.where", @"The Quarry" }, 637 { @"entries.0.where", @"The Quarry" },
638 638
639 { @"entries.0.unknownAttributes.@count.stringValue", @"0" }, 639 { @"entries.0.unknownAttributes.@count.stringValue", @"0" },
640 { @"entries.0.unknownChildren.@count.stringValue", @"0" }, 640 { @"entries.0.unknownChildren.@count.stringValue", @"0" },
641 641
642 { @"", @"" }, // end of feed 642 { @"", @"" }, // end of feed
643 643
644 { nil, nil } // end of test array 644 { nil, nil } // end of test array
645 }; 645 };
646 646
647 [self runTests:tests]; 647 [self runTests:tests];
648 } 648 }
649 649
650 - (void)testSpreadsheetFeeds { 650 - (void)testSpreadsheetFeeds {
651 651
652 TestKeyPathValues tests[] = 652 TestKeyPathValues tests[] =
653 { 653 {
654 // 654 //
655 // Spreadsheet feed (list of user's spreadsheets) 655 // Spreadsheet feed (list of user's spreadsheets)
656 // 656 //
657 { @"GDataFeedSpreadsheet", @"Tests/FeedSpreadsheetTest1.xml" }, 657 { @"GDataFeedSpreadsheet", @"Tests/FeedSpreadsheetTest1.xml" },
658 658
659 // feed paths 659 // feed paths
660 { @"identifier", @"http://spreadsheets.google.com/feeds/spreadsheets/private/full" }, 660 { @"identifier", @"http://spreadsheets.google.com/feeds/spreadsheets/private/full" },
661 { @"links.2.href", @"http://spreadsheets.google.com/feeds/spreadsheets/private/full?tfe=" }, 661 { @"links.2.href", @"http://spreadsheets.google.com/feeds/spreadsheets/private/full?tfe=" },
662 { @"title", @"Available Spreadsheets - test@foo.net" }, 662 { @"title", @"Available Spreadsheets - test@foo.net" },
663 663
664 { @"unknownAttributes.@count", @"0" }, 664 { @"unknownAttributes.@count", @"0" },
665 { @"unknownChildren.@count", @"0" }, 665 { @"unknownChildren.@count", @"0" },
666 666
667 // entry paths 667 // entry paths
668 // There is one entry 668 // There is one entry
669 { @"entries.0.identifier", @"http://spreadsheets.google.com/feeds/spreadsheets/private/full/o04181601172097104111.497668944883620000" }, 669 { @"entries.0.identifier", @"http://spreadsheets.google.com/feeds/spreadsheets/private/full/o04181601172097104111.497668944883620000" },
670 { @"entries.0.updatedDate.RFC3339String", @"2007-03-22T23:25:53Z" }, 670 { @"entries.0.updatedDate.RFC3339String", @"2007-03-22T23:25:53Z" },
671 { @"entries.0.categories.2.scheme", kGDataCategorySchemeSpreadsheet }, 671 { @"entries.0.categories.2.scheme", kGDataCategorySchemeSpreadsheet },
672 { @"entries.0.categories.2.term", kGDataCategorySpreadsheet }, 672 { @"entries.0.categories.2.term", kGDataCategorySpreadsheet },
673 { @"entries.0.title", @"My Test Spreadsheet" }, 673 { @"entries.0.title", @"My Test Spreadsheet" },
674 674
675 { @"entries.0.unknownAttributes.@count", @"0" }, 675 { @"entries.0.unknownAttributes.@count", @"0" },
676 { @"entries.0.unknownChildren.@count", @"1" }, 676 { @"entries.0.unknownChildren.@count", @"1" },
677 677
678 { @"", @"" }, // end of feed 678 { @"", @"" }, // end of feed
679 679
680 // repeat the test, with unknown children turned off 680 // repeat the test, with unknown children turned off
681 { @"GDataFeedSpreadsheet-ignoreUnknown", @"Tests/FeedSpreadsheetTest1.xml" }, 681 { @"GDataFeedSpreadsheet-ignoreUnknown", @"Tests/FeedSpreadsheetTest1.xml" },
682 682
683 // feed paths 683 // feed paths
684 { @"identifier", @"http://spreadsheets.google.com/feeds/spreadsheets/private/full" }, 684 { @"identifier", @"http://spreadsheets.google.com/feeds/spreadsheets/private/full" },
685 685
686 { @"unknownAttributes.@count", @"0" }, 686 { @"unknownAttributes.@count", @"0" },
687 { @"unknownChildren.@count", @"0" }, 687 { @"unknownChildren.@count", @"0" },
688 688
689 // entry paths 689 // entry paths
690 // There is one entry 690 // There is one entry
691 { @"entries.0.identifier", @"http://spreadsheets.google.com/feeds/spreadsheets/private/full/o04181601172097104111.497668944883620000" }, 691 { @"entries.0.identifier", @"http://spreadsheets.google.com/feeds/spreadsheets/private/full/o04181601172097104111.497668944883620000" },
692 { @"entries.0.updatedDate.RFC3339String", @"2007-03-22T23:25:53Z" }, 692 { @"entries.0.updatedDate.RFC3339String", @"2007-03-22T23:25:53Z" },
693 693
694 { @"entries.0.unknownAttributes.@count", @"0" }, 694 { @"entries.0.unknownAttributes.@count", @"0" },
695 { @"entries.0.unknownChildren.@count", @"0" }, 695 { @"entries.0.unknownChildren.@count", @"0" },
696 696
697 { @"", @"" }, // end of feed 697 { @"", @"" }, // end of feed
698 698
699 // 699 //
700 // Worksheet feed (list of a spreadsheet's worksheets) 700 // Worksheet feed (list of a spreadsheet's worksheets)
701 // 701 //
702 { @"GDataFeedWorksheet", @"Tests/FeedSpreadsheetWorksheetTest1.xml" }, 702 { @"GDataFeedWorksheet", @"Tests/FeedSpreadsheetWorksheetTest1.xml" },
703 703
704 // feed paths 704 // feed paths
705 { @"identifier", @"http://spreadsheets.google.com/feeds/worksheets/o04181601172097104111.497668944883620000/private/full" }, 705 { @"identifier", @"http://spreadsheets.google.com/feeds/worksheets/o04181601172097104111.497668944883620000/private/full" },
706 { @"links.2.href", @"http://spreadsheets.google.com/feeds/worksheets/o04181601172097104111.497668944883620000/private/full?tfe=" }, 706 { @"links.2.href", @"http://spreadsheets.google.com/feeds/worksheets/o04181601172097104111.497668944883620000/private/full?tfe=" },
707 { @"title", @"My Test Spreadsheet" }, 707 { @"title", @"My Test Spreadsheet" },
708 { @"authors.0.email", @"test@foo.net" }, 708 { @"authors.0.email", @"test@foo.net" },
709 709
710 { @"unknownAttributes.@count", @"0" }, 710 { @"unknownAttributes.@count", @"0" },
711 { @"unknownChildren.@count", @"0" }, 711 { @"unknownChildren.@count", @"0" },
712 712
713 // entry paths 713 // entry paths
714 // There is one entry 714 // There is one entry
715 { @"entries.0.identifier", @"http://spreadsheets.google.com/feeds/worksheets/o04181601172097104111.497668944883620000/private/full/od6" }, 715 { @"entries.0.identifier", @"http://spreadsheets.google.com/feeds/worksheets/o04181601172097104111.497668944883620000/private/full/od6" },
716 { @"entries.0.updatedDate.RFC3339String", @"2007-03-22T23:28:50Z" }, 716 { @"entries.0.updatedDate.RFC3339String", @"2007-03-22T23:28:50Z" },
717 { @"entries.0.categories.0.scheme", kGDataCategorySchemeSpreadsheet }, 717 { @"entries.0.categories.0.scheme", kGDataCategorySchemeSpreadsheet },
718 { @"entries.0.categories.0.term", kGDataCategoryWorksheet }, 718 { @"entries.0.categories.0.term", kGDataCategoryWorksheet },
719 { @"entries.0.title", @"Sheet1" }, 719 { @"entries.0.title", @"Sheet1" },
720 { @"entries.0.rowCount", @"100" }, 720 { @"entries.0.rowCount", @"100" },
721 { @"entries.0.columnCount", @"20" }, 721 { @"entries.0.columnCount", @"20" },
722 722
723 { @"entries.0.unknownAttributes.@count", @"0" }, 723 { @"entries.0.unknownAttributes.@count", @"0" },
724 { @"entries.0.unknownChildren.@count", @"0" }, 724 { @"entries.0.unknownChildren.@count", @"0" },
725 725
726 { @"", @"" }, // end of feed 726 { @"", @"" }, // end of feed
727 727
728 // 728 //
729 // Cells feed (all of a worksheet's cells) 729 // Cells feed (all of a worksheet's cells)
730 // 730 //
731 { @"GDataFeedSpreadsheetCell", @"Tests/FeedSpreadsheetCellsTest1.xml" }, 731 { @"GDataFeedSpreadsheetCell", @"Tests/FeedSpreadsheetCellsTest1.xml" },
732 732
733 // feed paths 733 // feed paths
734 { @"identifier", @"http://spreadsheets.google.com/feeds/cells/o04181601172097104111.497668944883620000/od6/private/full" }, 734 { @"identifier", @"http://spreadsheets.google.com/feeds/cells/o04181601172097104111.497668944883620000/od6/private/full" },
735 { @"links.0.href", @"http://spreadsheets.google.com/ccc?key=o04181601172097104111.497668944883620000" }, 735 { @"links.0.href", @"http://spreadsheets.google.com/ccc?key=o04181601172097104111.497668944883620000" },
736 { @"categories.0.scheme", kGDataCategorySchemeSpreadsheet }, 736 { @"categories.0.scheme", kGDataCategorySchemeSpreadsheet },
737 { @"categories.0.term", kGDataCategorySpreadsheetCell }, 737 { @"categories.0.term", kGDataCategorySpreadsheetCell },
738 { @"title", @"Sheet1" }, 738 { @"title", @"Sheet1" },
739 { @"authors.0.email", @"test@foo.net" }, 739 { @"authors.0.email", @"test@foo.net" },
740 { @"rowCount", @"100" }, 740 { @"rowCount", @"100" },
741 { @"columnCount", @"20" }, 741 { @"columnCount", @"20" },
742 742
743 { @"unknownAttributes.@count", @"0" }, 743 { @"unknownAttributes.@count", @"0" },
744 { @"unknownChildren.@count", @"0" }, 744 { @"unknownChildren.@count", @"0" },
745 745
746 // entry paths 746 // entry paths
747 // The sheet looks like this (2 cols x 4 rows) 747 // The sheet looks like this (2 cols x 4 rows)
748 // Fred Martha 748 // Fred Martha
749 // =pi() =sin(A2) 749 // =pi() =sin(A2)
750 // =1.5*pi() =sin(A3) 750 // =1.5*pi() =sin(A3)
751 // =2.0*pi() =sin(A4) 751 // =2.0*pi() =sin(A4)
752 752
753 { @"entries.1.identifier", @"http://spreadsheets.google.com/feeds/cells/o04181601172097104111.497668944883620000/od6/private/full/R1C2" }, 753 { @"entries.1.identifier", @"http://spreadsheets.google.com/feeds/cells/o04181601172097104111.497668944883620000/od6/private/full/R1C2" },
754 { @"entries.1.updatedDate.RFC3339String", @"2007-03-22T23:28:50Z" }, 754 { @"entries.1.updatedDate.RFC3339String", @"2007-03-22T23:28:50Z" },
755 { @"entries.1.categories.0.scheme", kGDataCategorySchemeSpreadsheet }, 755 { @"entries.1.categories.0.scheme", kGDataCategorySchemeSpreadsheet },
756 { @"entries.1.categories.0.term", kGDataCategorySpreadsheetCell }, 756 { @"entries.1.categories.0.term", kGDataCategorySpreadsheetCell },
757 { @"entries.1.title", @"B1" }, 757 { @"entries.1.title", @"B1" },
758 { @"entries.1.cell.column", @"2" }, 758 { @"entries.1.cell.column", @"2" },
759 { @"entries.1.cell.row", @"1" }, 759 { @"entries.1.cell.row", @"1" },
760 { @"entries.1.cell.inputString", @"Martha" }, 760 { @"entries.1.cell.inputString", @"Martha" },
761 { @"entries.1.cell.numericValue", nil }, 761 { @"entries.1.cell.numericValue", nil },
762 { @"entries.1.cell.resultString", @"Martha" }, 762 { @"entries.1.cell.resultString", @"Martha" },
763 763
764 { @"entries.0.unknownAttributes.@count", @"0" }, 764 { @"entries.0.unknownAttributes.@count", @"0" },
765 { @"entries.0.unknownChildren.@count", @"0" }, 765 { @"entries.0.unknownChildren.@count", @"0" },
766 766
767 { @"", @"" }, // end of feed 767 { @"", @"" }, // end of feed
768 768
769 // 769 //
770 // List feed (all of a worksheet as a list) which contains customElements 770 // List feed (all of a worksheet as a list) which contains customElements
771 // 771 //
772 772
773 // feed paths 773 // feed paths
774 { @"GDataFeedSpreadsheetList", @"Tests/FeedSpreadsheetListTest1.xml" }, 774 { @"GDataFeedSpreadsheetList", @"Tests/FeedSpreadsheetListTest1.xml" },
775 { @"identifier", @"http://spreadsheets.google.com/feeds/list/o04181601172097104111.497668944883620000/od6/private/full" }, 775 { @"identifier", @"http://spreadsheets.google.com/feeds/list/o04181601172097104111.497668944883620000/od6/private/full" },
776 { @"links.0.href", @"http://spreadsheets.google.com/ccc?key=o04181601172097104111.497668944883620000" }, 776 { @"links.0.href", @"http://spreadsheets.google.com/ccc?key=o04181601172097104111.497668944883620000" },
777 { @"categories.0.scheme", kGDataCategorySchemeSpreadsheet }, 777 { @"categories.0.scheme", kGDataCategorySchemeSpreadsheet },
778 { @"categories.0.term", kGDataCategorySpreadsheetList }, 778 { @"categories.0.term", kGDataCategorySpreadsheetList },
779 { @"title", @"Sheet1" }, 779 { @"title", @"Sheet1" },
780 { @"authors.0.email", @"test@foo.net" }, 780 { @"authors.0.email", @"test@foo.net" },
781 781
782 { @"unknownAttributes.@count", @"0" }, 782 { @"unknownAttributes.@count", @"0" },
783 { @"unknownChildren.@count", @"0" }, 783 { @"unknownChildren.@count", @"0" },
784 784
785 // entry paths 785 // entry paths
786 { @"entries.1.customElementDictionary.fred", @"4.71238898038469" }, 786 { @"entries.1.customElementDictionary.fred", @"4.71238898038469" },
787 { @"entries.1.customElementDictionary.martha", @"-1" }, 787 { @"entries.1.customElementDictionary.martha", @"-1" },
788 788
789 { @"entries.0.unknownAttributes.@count", @"0" }, 789 { @"entries.0.unknownAttributes.@count", @"0" },
790 { @"entries.0.unknownChildren.@count", @"0" }, 790 { @"entries.0.unknownChildren.@count", @"0" },
791 791
792 { @"", @"" }, // end of feed 792 { @"", @"" }, // end of feed
793 793
794 // 794 //
795 // Table feed 795 // Table feed
796 // 796 //
797 797
798 // feed paths 798 // feed paths
799 { @"GDataFeedSpreadsheetTable", @"Tests/FeedSpreadsheetTableTest1.xml" }, 799 { @"GDataFeedSpreadsheetTable", @"Tests/FeedSpreadsheetTableTest1.xml" },
800 { @"identifier", @"http://spreadsheets.google.com/feeds/RRHuSwAKiaEGw526z3DVYw/tables" }, 800 { @"identifier", @"http://spreadsheets.google.com/feeds/RRHuSwAKiaEGw526z3DVYw/tables" },
801 { @"categories.0.scheme", kGDataCategoryScheme }, 801 { @"categories.0.scheme", kGDataCategoryScheme },
802 { @"categories.0.term", kGDataCategorySpreadsheetTable }, 802 { @"categories.0.term", kGDataCategorySpreadsheetTable },
803 { @"title", @"Table of Doom" }, 803 { @"title", @"Table of Doom" },
804 { @"authors.0.email", @"fredflintstone@example.com" }, 804 { @"authors.0.email", @"fredflintstone@example.com" },
805 805
806 { @"unknownAttributes.@count", @"0" }, 806 { @"unknownAttributes.@count", @"0" },
807 { @"unknownChildren.@count", @"0" }, 807 { @"unknownChildren.@count", @"0" },
808 808
809 // entry paths 809 // entry paths
810 { @"entries.0.content.sourceURI", @"http://spreadsheets.google.com/feeds/RRHuSwAKiaEGw526z3DVYw/records/1" }, 810 { @"entries.0.content.sourceURI", @"http://spreadsheets.google.com/feeds/RRHuSwAKiaEGw526z3DVYw/records/1" },
811 { @"entries.0.spreadsheetData.startIndex", @"4" }, 811 { @"entries.0.spreadsheetData.startIndex", @"4" },
812 { @"entries.0.spreadsheetData.numberOfRows", @"3" }, 812 { @"entries.0.spreadsheetData.numberOfRows", @"3" },
813 { @"entries.0.spreadsheetData.insertionMode", kGDataSpreadsheetModeInsert }, 813 { @"entries.0.spreadsheetData.insertionMode", kGDataSpreadsheetModeInsert },
814 { @"entries.0.spreadsheetData.columns.0.name", @"Column Beta" }, 814 { @"entries.0.spreadsheetData.columns.0.name", @"Column Beta" },
815 { @"entries.0.spreadsheetData.columns.0.indexString", @"B" }, 815 { @"entries.0.spreadsheetData.columns.0.indexString", @"B" },
816 { @"entries.0.spreadsheetHeader.row", @"3" }, 816 { @"entries.0.spreadsheetHeader.row", @"3" },
817 { @"entries.0.worksheetName", @"Sheet 1" }, 817 { @"entries.0.worksheetName", @"Sheet 1" },
818 818
819 { @"entries.0.unknownAttributes.@count", @"0" }, 819 { @"entries.0.unknownAttributes.@count", @"0" },
820 { @"entries.0.unknownChildren.@count", @"0" }, 820 { @"entries.0.unknownChildren.@count", @"0" },
821 821
822 { @"", @"" }, // end of feed 822 { @"", @"" }, // end of feed
823 823
824 // 824 //
825 // Record feed 825 // Record feed
826 // 826 //
827 827
828 // feed paths 828 // feed paths
829 { @"GDataFeedSpreadsheetRecord", @"Tests/FeedSpreadsheetRecordTest1.xml" }, 829 { @"GDataFeedSpreadsheetRecord", @"Tests/FeedSpreadsheetRecordTest1.xml" },
830 { @"identifier", @"http://spreadsheets.google.com/feeds/RRHuSwAKiaEGw526z3DVYw/records/1" }, 830 { @"identifier", @"http://spreadsheets.google.com/feeds/RRHuSwAKiaEGw526z3DVYw/records/1" },
831 { @"categories.0.scheme", kGDataCategoryScheme }, 831 { @"categories.0.scheme", kGDataCategoryScheme },
832 { @"categories.0.term", kGDataCategorySpreadsheetRecord }, 832 { @"categories.0.term", kGDataCategorySpreadsheetRecord },
833 { @"title", @"Records of Doom" }, 833 { @"title", @"Records of Doom" },
834 { @"authors.0.email", @"fredflintstone@example.com" }, 834 { @"authors.0.email", @"fredflintstone@example.com" },
835 835
836 { @"unknownAttributes.@count", @"0" }, 836 { @"unknownAttributes.@count", @"0" },
837 { @"unknownChildren.@count", @"0" }, 837 { @"unknownChildren.@count", @"0" },
838 838
839 // entry paths 839 // entry paths
840 { @"entries.0.content", @"Column Beta: clouds, Column Alpha: mars" }, 840 { @"entries.0.content", @"Column Beta: clouds, Column Alpha: mars" },
841 { @"entries.0.editLink.href", @"http://spreadsheets.google.com/feeds/RRHuSwAKiaEGw526z3DVYw/records/1/cn6ca" }, 841 { @"entries.0.editLink.href", @"http://spreadsheets.google.com/feeds/RRHuSwAKiaEGw526z3DVYw/records/1/cn6ca" },
842 { @"entries.0.fields.0.name", @"Column Beta" }, 842 { @"entries.0.fields.0.name", @"Column Beta" },
843 { @"entries.0.fields.0.indexString", @"B" }, 843 { @"entries.0.fields.0.indexString", @"B" },
844 { @"entries.0.fields.0.value", @"clouds" }, 844 { @"entries.0.fields.0.value", @"clouds" },
845 { @"entries.0.fields.0.formula", @"3+something" }, 845 { @"entries.0.fields.0.formula", @"3+something" },
846 846
847 { @"entries.0.unknownAttributes.@count", @"0" }, 847 { @"entries.0.unknownAttributes.@count", @"0" },
848 { @"entries.0.unknownChildren.@count", @"0" }, 848 { @"entries.0.unknownChildren.@count", @"0" },
849 849
850 { @"", @"" }, // end of feed 850 { @"", @"" }, // end of feed
851 851
852 { nil, nil } // end of test array 852 { nil, nil } // end of test array
853 }; 853 };
854 854
855 [self runTests:tests]; 855 [self runTests:tests];
856 } 856 }
857 857
858 - (void)testAnalyticsFeeds { 858 - (void)testAnalyticsFeeds {
859 859
860 TestKeyPathValues tests[] = 860 TestKeyPathValues tests[] =
861 { 861 {
862 // 862 //
863 // Account feed 863 // Account feed
864 // 864 //
865 { @"GDataFeedAnalyticsAccount/2.0", @"Tests/FeedAnalyticsAccountTest1.xml" }, 865 { @"GDataFeedAnalyticsAccount/2.0", @"Tests/FeedAnalyticsAccountTest1.xml" },
866 866
867 // GDataFeedAnalyticsAccount paths 867 // GDataFeedAnalyticsAccount paths
868 { @"authors.0.name", @"Google Analytics" }, 868 { @"authors.0.name", @"Google Analytics" },
869 { @"title", @"Profile list for fredflintstone@example.com" }, 869 { @"title", @"Profile list for fredflintstone@example.com" },
870 { @"segments.0.name", @"All Visits" }, 870 { @"segments.0.name", @"All Visits" },
871 { @"segments.0.analyticsID", @"gaid::-1" }, 871 { @"segments.0.analyticsID", @"gaid::-1" },
872 { @"segments.0.definition", @"" }, 872 { @"segments.0.definition", @"" },
873 { @"segments.1.definition", @"ga:visitorType==New Visitor" }, 873 { @"segments.1.definition", @"ga:visitorType==New Visitor" },
874 874
875 // GDataEntryAnalyticsAccount paths 875 // GDataEntryAnalyticsAccount paths
876 { @"entries.0.tableID", @"ga:7966084" }, 876 { @"entries.0.tableID", @"ga:7966084" },
877 { @"entries.0.analyticsProperties.0.name", @"ga:accountId" }, 877 { @"entries.0.analyticsProperties.0.name", @"ga:accountId" },
878 { @"entries.0.analyticsProperties.0.stringValue", @"8925159" }, 878 { @"entries.0.analyticsProperties.0.stringValue", @"8925159" },
879 { @"entries.0.analyticsProperties.1.name", @"ga:accountName" }, 879 { @"entries.0.analyticsProperties.1.name", @"ga:accountName" },
880 { @"entries.0.analyticsProperties.1.stringValue", @"example" }, 880 { @"entries.0.analyticsProperties.1.stringValue", @"example" },
881 { @"entries.0.customVariables.0.index", @"3" }, 881 { @"entries.0.customVariables.0.index", @"3" },
882 { @"entries.0.customVariables.0.name", @"User" }, 882 { @"entries.0.customVariables.0.name", @"User" },
883 { @"entries.0.customVariables.0.scope", @"visitor" }, 883 { @"entries.0.customVariables.0.scope", @"visitor" },
884 { @"entries.0.goals.0.isActive", @"1" }, 884 { @"entries.0.goals.0.isActive", @"1" },
885 { @"entries.0.goals.0.name", @"My Main Goal" }, 885 { @"entries.0.goals.0.name", @"My Main Goal" },
886 { @"entries.0.goals.0.number", @"1" }, 886 { @"entries.0.goals.0.number", @"1" },
887 { @"entries.0.goals.0.value", @"1.100000023841858" }, 887 { @"entries.0.goals.0.value", @"1.100000023841858" },
888 { @"entries.0.goals.0.destination.isCaseSensitive", @"0" }, 888 { @"entries.0.goals.0.destination.isCaseSensitive", @"0" },
889 { @"entries.0.goals.0.destination.expression", @"/wiki/DocPage" }, 889 { @"entries.0.goals.0.destination.expression", @"/wiki/DocPage" },
890 { @"entries.0.goals.0.destination.matchType", @"head" }, 890 { @"entries.0.goals.0.destination.matchType", @"head" },
891 { @"entries.0.goals.0.destination.isStep1Required", @"0" }, 891 { @"entries.0.goals.0.destination.isStep1Required", @"0" },
892 { @"entries.0.goals.0.destination.steps.0.name", @"Wiki step" }, 892 { @"entries.0.goals.0.destination.steps.0.name", @"Wiki step" },
893 { @"entries.0.goals.0.destination.steps.0.number", @"1" }, 893 { @"entries.0.goals.0.destination.steps.0.number", @"1" },
894 { @"entries.0.goals.0.destination.steps.0.path", @"/wiki" }, 894 { @"entries.0.goals.0.destination.steps.0.path", @"/wiki" },
895 { @"entries.0.goals.0.engagement", nil }, 895 { @"entries.0.goals.0.engagement", nil },
896 896
897 { @"", @"" }, // end of feed 897 { @"", @"" }, // end of feed
898 898
899 // 899 //
900 // Data feed 900 // Data feed
901 // 901 //
902 { @"GDataFeedAnalyticsData/2.0", @"Tests/FeedAnalyticsDataTest1.xml" }, 902 { @"GDataFeedAnalyticsData/2.0", @"Tests/FeedAnalyticsDataTest1.xml" },
903 903
904 // GDataFeedAnalyticsData paths 904 // GDataFeedAnalyticsData paths
905 { @"authors.0.name", @"Google Analytics" }, 905 { @"authors.0.name", @"Google Analytics" },
906 { @"title", @"Google Analytics Data for Profile 7966084" }, 906 { @"title", @"Google Analytics Data for Profile 7966084" },
907 { @"startDateString", @"2009-05-18" }, 907 { @"startDateString", @"2009-05-18" },
908 { @"endDateString", @"2009-05-20" }, 908 { @"endDateString", @"2009-05-20" },
909 { @"aggregateGroup.metrics.0.confidenceInterval", @"0" }, 909 { @"aggregateGroup.metrics.0.confidenceInterval", @"0" },
910 { @"aggregateGroup.metrics.0.name", @"ga:pageviews" }, 910 { @"aggregateGroup.metrics.0.name", @"ga:pageviews" },
911 { @"aggregateGroup.metrics.0.type", kGDataMetricTypeInteger }, 911 { @"aggregateGroup.metrics.0.type", kGDataMetricTypeInteger },
912 { @"aggregateGroup.metrics.0.stringValue", @"12" }, 912 { @"aggregateGroup.metrics.0.stringValue", @"12" },
913 { @"aggregateGroup.metrics.0.doubleValue", @"12" }, 913 { @"aggregateGroup.metrics.0.doubleValue", @"12" },
914 { @"dataSources.0.tableID", @"ga:7966084" }, 914 { @"dataSources.0.tableID", @"ga:7966084" },
915 { @"dataSources.0.tableName", @"www.example.net" }, 915 { @"dataSources.0.tableName", @"www.example.net" },
916 { @"dataSources.0.analyticsProperties.0.name", @"ga:profileId" }, 916 { @"dataSources.0.analyticsProperties.0.name", @"ga:profileId" },
917 { @"dataSources.0.analyticsProperties.0.stringValue", @"7966084" }, 917 { @"dataSources.0.analyticsProperties.0.stringValue", @"7966084" },
918 { @"dataSources.0.analyticsPropertyWithNameAccountName.stringValue", @"example" }, 918 { @"dataSources.0.analyticsPropertyWithNameAccountName.stringValue", @"example" },
919 { @"segments.0.name", @"New Visitors" }, 919 { @"segments.0.name", @"New Visitors" },
920 { @"segments.0.analyticsID", @"gaid::-2" }, 920 { @"segments.0.analyticsID", @"gaid::-2" },
921 { @"segments.0.definition", @"ga:visitorType==New Visitor" }, 921 { @"segments.0.definition", @"ga:visitorType==New Visitor" },
922 922
923 // GDataEntryAnalyticsData paths 923 // GDataEntryAnalyticsData paths
924 { @"entries.0.title", @"ga:country=United States" }, 924 { @"entries.0.title", @"ga:country=United States" },
925 { @"entries.0.dimensions.0.name", @"ga:country" }, 925 { @"entries.0.dimensions.0.name", @"ga:country" },
926 { @"entries.0.dimensions.0.stringValue", @"United States" }, 926 { @"entries.0.dimensions.0.stringValue", @"United States" },
927 { @"entries.0.dimensionWithNameCountry.stringValue", @"United States" }, 927 { @"entries.0.dimensionWithNameCountry.stringValue", @"United States" },
928 { @"entries.0.metrics.0.confidenceInterval", @"5.1" }, 928 { @"entries.0.metrics.0.confidenceInterval", @"5.1" },
929 { @"entries.0.metrics.0.name", @"ga:pageviews" }, 929 { @"entries.0.metrics.0.name", @"ga:pageviews" },
930 { @"entries.0.metrics.0.type", kGDataMetricTypeInteger }, 930 { @"entries.0.metrics.0.type", kGDataMetricTypeInteger },
931 { @"entries.0.metrics.0.stringValue", @"37" }, 931 { @"entries.0.metrics.0.stringValue", @"37" },
932 { @"entries.0.metrics.0.doubleValue", @"37" }, 932 { @"entries.0.metrics.0.doubleValue", @"37" },
933 { @"entries.0.metricWithNamePageviews.stringValue", @"37" }, 933 { @"entries.0.metricWithNamePageviews.stringValue", @"37" },
934 934
935 { @"", @"" }, // end of feed 935 { @"", @"" }, // end of feed
936 936
937 { nil, nil } // end of test array 937 { nil, nil } // end of test array
938 }; 938 };
939 939
940 [self runTests:tests]; 940 [self runTests:tests];
941 } 941 }
942 942
943 943
944 - (void)testCodeSearchFeed { 944 - (void)testCodeSearchFeed {
945 945
946 TestKeyPathValues tests[] = 946 TestKeyPathValues tests[] =
947 { 947 {
948 // 948 //
949 // Feed of a user's albums 949 // Feed of a user's albums
950 // 950 //
951 { @"GDataFeedCodeSearch", @"Tests/FeedCodeSearchTest1.xml" }, 951 { @"GDataFeedCodeSearch", @"Tests/FeedCodeSearchTest1.xml" },
952 952
953 // GDataFeedCodeSearch paths 953 // GDataFeedCodeSearch paths
954 { @"authors.0.name", @"Google Code Search" }, 954 { @"authors.0.name", @"Google Code Search" },
955 { @"authors.0.URI", @"http://www.google.com/codesearch" }, 955 { @"authors.0.URI", @"http://www.google.com/codesearch" },
956 956
957 // GDataEntryCodeSearch paths 957 // GDataEntryCodeSearch paths
958 { @"entries.0.package.name", @"http://ftp.funet.fi/pub/CPAN/src/perl-5.9.1.tar.gz" }, 958 { @"entries.0.package.name", @"http://ftp.funet.fi/pub/CPAN/src/perl-5.9.1.tar.gz" },
959 { @"entries.0.package.URI", @"http://ftp.funet.fi/pub/CPAN/src/perl-5.9.1.tar.gz" }, 959 { @"entries.0.package.URI", @"http://ftp.funet.fi/pub/CPAN/src/perl-5.9.1.tar.gz" },
960 960
961 { @"entries.1.package.name", @"http://gentoo.osuosl.org/distfiles/Perl6-Pugs-6.2.12.tar.gz" }, 961 { @"entries.1.package.name", @"http://gentoo.osuosl.org/distfiles/Perl6-Pugs-6.2.12.tar.gz" },
962 { @"entries.1.package.URI", @"http://gentoo.osuosl.org/distfiles/Perl6-Pugs-6.2.12.tar.gz" }, 962 { @"entries.1.package.URI", @"http://gentoo.osuosl.org/distfiles/Perl6-Pugs-6.2.12.tar.gz" },
963 { @"entries.1.file.name", @"Perl6-Pugs-6.2.12/t/subroutines/sub_named_params.t" }, 963 { @"entries.1.file.name", @"Perl6-Pugs-6.2.12/t/subroutines/sub_named_params.t" },
964 { @"entries.1.matches.0.lineNumberString", @"131" }, 964 { @"entries.1.matches.0.lineNumberString", @"131" },
965 { @"entries.1.matches.0.type", @"text/html" }, 965 { @"entries.1.matches.0.type", @"text/html" },
966 { @"entries.1.matches.0", @"hasPrefix:<pre>my %fellowship" }, 966 { @"entries.1.matches.0", @"hasPrefix:<pre>my %fellowship" },
967 { @"entries.1.matches.1.lineNumberString", @"132" }, 967 { @"entries.1.matches.1.lineNumberString", @"132" },
968 { @"entries.1.matches.1.type", @"text/html" }, 968 { @"entries.1.matches.1.type", @"text/html" },
969 { @"entries.1.matches.1", @"hasPrefix:<pre>is(%fellowship&lt;hobbit&gt;" }, 969 { @"entries.1.matches.1", @"hasPrefix:<pre>is(%fellowship&lt;hobbit&gt;" },
970 970
971 { @"", @"" }, // end of feed 971 { @"", @"" }, // end of feed
972 972
973 { nil, nil } // end of test array 973 { nil, nil } // end of test array
974 }; 974 };
975 975
976 [self runTests:tests]; 976 [self runTests:tests];
977 } 977 }
978 978
979 - (void)testPhotosFeeds { 979 - (void)testPhotosFeeds {
980 980
981 // TODO: test geoLocation once we have a good sample of it 981 // TODO: test geoLocation once we have a good sample of it
982 982
983 // Test a non-ASCII character and some html characters in a TextConstruct. 983 // Test a non-ASCII character and some html characters in a TextConstruct.
984 // We'll allocate it dynamically since source code cannot contain non-ASCII. 984 // We'll allocate it dynamically since source code cannot contain non-ASCII.
985 NSString *templateStr = @"Test %C Alb%Cm"; 985 NSString *templateStr = @"Test %C Alb%Cm";
986 NSString *photoAlbumName = [NSString stringWithFormat:templateStr, 986 NSString *photoAlbumName = [NSString stringWithFormat:templateStr,
987 0x262F, 0x00FC]; // yin yang, u with umlaut 987 0x262F, 0x00FC]; // yin yang, u with umlaut
988 988
989 // Non-ascii photo description, includes the Wheel of Dharma 989 // Non-ascii photo description, includes the Wheel of Dharma
990 NSString *photoDescriptionText = [NSString stringWithFormat: 990 NSString *photoDescriptionText = [NSString stringWithFormat:
991 @"Caption for the car %C photo", 0x2638]; 991 @"Caption for the car %C photo", 0x2638];
992 992
993 TestKeyPathValues tests[] = 993 TestKeyPathValues tests[] =
994 { 994 {
995 // 995 //
996 // Feed of a user's albums 996 // Feed of a user's albums
997 // 997 //
998 { @"GDataFeedPhotoUser", @"Tests/FeedPhotosUserAlbum1.xml" }, 998 { @"GDataFeedPhotoUser", @"Tests/FeedPhotosUserAlbum1.xml" },
999 999
1000 // GDataFeedPhotosAlbum paths 1000 // GDataFeedPhotosAlbum paths
1001 { @"username", @"TestdomainTestAccount" }, 1001 { @"username", @"TestdomainTestAccount" },
1002 { @"nickname", @"Greg" }, 1002 { @"nickname", @"Greg" },
1003 { @"thumbnail", @"hasPrefix:http://lh3.google.com/image/TestdomainTestAccount" }, 1003 { @"thumbnail", @"hasPrefix:http://lh3.google.com/image/TestdomainTestAccount" },
1004 { @"quotaLimit", @"1073741824" }, 1004 { @"quotaLimit", @"1073741824" },
1005 { @"quotaUsed", @"108303" }, 1005 { @"quotaUsed", @"108303" },
1006 { @"maxPhotosPerAlbum", @"500" }, 1006 { @"maxPhotosPerAlbum", @"500" },
1007 { @"categories.0.term", kGDataCategoryPhotosUser }, 1007 { @"categories.0.term", kGDataCategoryPhotosUser },
1008 1008
1009 { @"unknownAttributes.@count", @"0" }, 1009 { @"unknownAttributes.@count", @"0" },
1010 { @"unknownChildren.@count", @"0" }, 1010 { @"unknownChildren.@count", @"0" },
1011 1011
1012 // GDataEntryPhotoAlbum paths 1012 // GDataEntryPhotoAlbum paths
1013 { @"entries.0.categories.0.term", kGDataCategoryPhotosAlbum }, 1013 { @"entries.0.categories.0.term", kGDataCategoryPhotosAlbum },
1014 1014
1015 { @"entries.0.mediaGroup.mediaTitle", photoAlbumName }, 1015 { @"entries.0.mediaGroup.mediaTitle", photoAlbumName },
1016 { @"entries.0.mediaGroup.mediaDescription", @"Album description" }, 1016 { @"entries.0.mediaGroup.mediaDescription", @"Album description" },
1017 { @"entries.0.mediaGroup.mediaCredits.0", @"Greg" }, 1017 { @"entries.0.mediaGroup.mediaCredits.0", @"Greg" },
1018 { @"entries.0.mediaGroup.mediaContents.0.medium", @"image" }, 1018 { @"entries.0.mediaGroup.mediaContents.0.medium", @"image" },
1019 { @"entries.0.mediaGroup.mediaContents.0.type", @"image/jpeg" }, 1019 { @"entries.0.mediaGroup.mediaContents.0.type", @"image/jpeg" },
1020 { @"entries.0.mediaGroup.mediaContents.0.URLString", @"hasPrefix:http://lh5.google.com/image/TestdomainTestAccount" }, 1020 { @"entries.0.mediaGroup.mediaContents.0.URLString", @"hasPrefix:http://lh5.google.com/image/TestdomainTestAccount" },
1021 { @"entries.0.mediaGroup.mediaThumbnails.0.height", @"160" }, 1021 { @"entries.0.mediaGroup.mediaThumbnails.0.height", @"160" },
1022 { @"entries.0.mediaGroup.mediaThumbnails.0.URLString", @"hasPrefix:http://lh5.google.com/image/TestdomainTestAccount" }, 1022 { @"entries.0.mediaGroup.mediaThumbnails.0.URLString", @"hasPrefix:http://lh5.google.com/image/TestdomainTestAccount" },
1023 1023
1024 { @"entries.0.GPhotoID", @"5067143575034336993" }, 1024 { @"entries.0.GPhotoID", @"5067143575034336993" },
1025 { @"entries.0.access", @"public" }, 1025 { @"entries.0.access", @"public" },
1026 { @"entries.0.photosUsed", @"2" }, 1026 { @"entries.0.photosUsed", @"2" },
1027 { @"entries.0.commentCount", @"0" }, 1027 { @"entries.0.commentCount", @"0" },
1028 { @"entries.0.bytesUsed", @"108303" }, 1028 { @"entries.0.bytesUsed", @"108303" },
1029 { @"entries.0.nickname", @"Greg" }, 1029 { @"entries.0.nickname", @"Greg" },
1030 { @"entries.0.photosLeft", @"498" }, 1030 { @"entries.0.photosLeft", @"498" },
1031 { @"entries.0.commentsEnabled", @"1" }, 1031 { @"entries.0.commentsEnabled", @"1" },
1032 { @"entries.0.location", @"Album Site" }, 1032 { @"entries.0.location", @"Album Site" },
1033 { @"entries.0.timestamp.dateValue.timeIntervalSince1970", @"1179730800" }, 1033 { @"entries.0.timestamp.dateValue.timeIntervalSince1970", @"1179730800" },
1034 { @"entries.0.username", @"TestdomainTestAccount" }, 1034 { @"entries.0.username", @"TestdomainTestAccount" },
1035 { @"entries.0.identifier", @"http://photos.googleapis.com/data/entry/api/user/TestdomainTestAccount/albumid/5067143575034336993" }, 1035 { @"entries.0.identifier", @"http://photos.googleapis.com/data/entry/api/user/TestdomainTestAccount/albumid/5067143575034336993" },
1036 { @"entries.0.title.type", @"text" }, 1036 { @"entries.0.title.type", @"text" },
1037 { @"entries.0.title", photoAlbumName }, 1037 { @"entries.0.title", photoAlbumName },
1038 { @"entries.0.photoDescription", @"Album description" }, 1038 { @"entries.0.photoDescription", @"Album description" },
1039 { @"entries.0.rightsString", @"public" }, 1039 { @"entries.0.rightsString", @"public" },
1040 1040
1041 { @"entries.0.unknownAttributes.@count", @"0" }, 1041 { @"entries.0.unknownAttributes.@count", @"0" },
1042 { @"entries.0.unknownChildren.@count", @"0" }, 1042 { @"entries.0.unknownChildren.@count", @"0" },
1043 1043
1044 { @"", @"" }, // end of feed 1044 { @"", @"" }, // end of feed
1045 1045
1046 // 1046 //
1047 // Feed of an album's photos 1047 // Feed of an album's photos
1048 // 1048 //
1049 { @"GDataFeedPhotoAlbum/2.0", @"Tests/FeedPhotosAlbumPhoto1.xml" }, 1049 { @"GDataFeedPhotoAlbum/2.0", @"Tests/FeedPhotosAlbumPhoto1.xml" },
1050 1050
1051 // GDataFeedPhotoAlbum - feed paths 1051 // GDataFeedPhotoAlbum - feed paths
1052 { @"GPhotoID", @"5067143575034336993" }, 1052 { @"GPhotoID", @"5067143575034336993" },
1053 { @"access", @"public" }, 1053 { @"access", @"public" },
1054 { @"photosUsed", @"2" }, 1054 { @"photosUsed", @"2" },
1055 { @"commentCount", @"0" }, 1055 { @"commentCount", @"0" },
1056 { @"bytesUsed", @"108303" }, 1056 { @"bytesUsed", @"108303" },
1057 { @"nickname", @"Greg" }, 1057 { @"nickname", @"Greg" },
1058 { @"photosLeft", @"498" }, 1058 { @"photosLeft", @"498" },
1059 { @"commentsEnabled", @"1" }, 1059 { @"commentsEnabled", @"1" },
1060 { @"location", @"Album Site" }, 1060 { @"location", @"Album Site" },
1061 { @"timestamp.dateValue.timeIntervalSince1970", @"1179730800" }, 1061 { @"timestamp.dateValue.timeIntervalSince1970", @"1179730800" },
1062 { @"username", @"TestdomainTestAccount" }, 1062 { @"username", @"TestdomainTestAccount" },
1063 { @"identifier", @"http://photos.googleapis.com/data/feed/api/user/test%40testdomain.net/albumid/5067143575034336993" }, 1063 { @"identifier", @"http://photos.googleapis.com/data/feed/api/user/test%40testdomain.net/albumid/5067143575034336993" },
1064 { @"title.type", @"text" }, 1064 { @"title.type", @"text" },
1065 { @"title", photoAlbumName }, 1065 { @"title", photoAlbumName },
1066 { @"photoDescription", @"Album description" }, 1066 { @"photoDescription", @"Album description" },
1067 { @"rights", @"public" }, 1067 { @"rights", @"public" },
1068 { @"categories.0.term", kGDataCategoryPhotosAlbum }, 1068 { @"categories.0.term", kGDataCategoryPhotosAlbum },
1069 { @"feedLink.href", @"contains:albumid/5067143575034336993" }, 1069 { @"feedLink.href", @"contains:albumid/5067143575034336993" },
1070 { @"feedLink.rel", kGDataLinkRelFeed }, 1070 { @"feedLink.rel", kGDataLinkRelFeed },
1071 { @"postLink.href", @"contains:albumid/5067143575034336993" }, 1071 { @"postLink.href", @"contains:albumid/5067143575034336993" },
1072 { @"postLink.rel", kGDataLinkRelPost }, 1072 { @"postLink.rel", kGDataLinkRelPost },
1073 { @"alternateLink.href", @"contains:/TestAlbM" }, 1073 { @"alternateLink.href", @"contains:/TestAlbM" },
1074 { @"alternateLink.rel", @"alternate" }, 1074 { @"alternateLink.rel", @"alternate" },
1075 { @"selfLink.href", @"contains:test%40testdomain.net/albumid/5067143575034336993?start-index=1" }, 1075 { @"selfLink.href", @"contains:test%40testdomain.net/albumid/5067143575034336993?start-index=1" },
1076 { @"selfLink.rel", @"self" }, 1076 { @"selfLink.rel", @"self" },
1077 1077
1078 { @"firstEntry.GPhotoID", @"5067143579329304306" }, 1078 { @"firstEntry.GPhotoID", @"5067143579329304306" },
1079 1079
1080 { @"unknownAttributes.@count", @"0" }, 1080 { @"unknownAttributes.@count", @"0" },
1081 { @"unknownChildren.@count", @"0" }, 1081 { @"unknownChildren.@count", @"0" },
1082 1082
1083 // GDataEntryPhoto - entry paths 1083 // GDataEntryPhoto - entry paths
1084 { @"entries.0.categories.0.term", kGDataCategoryPhotosPhoto }, 1084 { @"entries.0.categories.0.term", kGDataCategoryPhotosPhoto },
1085 1085
1086 { @"entries.0.checksum", @"23512309abbs298" }, 1086 { @"entries.0.checksum", @"23512309abbs298" },
1087 { @"entries.0.GPhotoID", @"5067143579329304306" }, 1087 { @"entries.0.GPhotoID", @"5067143579329304306" },
1088 { @"entries.0.albumID", @"5067143575034336993" }, 1088 { @"entries.0.albumID", @"5067143575034336993" },
1089 { @"entries.0.width", @"660" }, 1089 { @"entries.0.width", @"660" },
1090 { @"entries.0.height", @"433" }, 1090 { @"entries.0.height", @"433" },
1091 { @"entries.0.videoStatus", kGDataPhotoStatusReady }, 1091 { @"entries.0.videoStatus", kGDataPhotoStatusReady },
1092 { @"entries.0.commentsEnabled", @"1" }, 1092 { @"entries.0.commentsEnabled", @"1" },
1093 { @"entries.0.size", @"87225" }, 1093 { @"entries.0.size", @"87225" },
1094 { @"entries.0.commentCount", @"1" }, 1094 { @"entries.0.commentCount", @"1" },
1095 { @"entries.0.timestamp.dateValue.timeIntervalSince1970", @"1179786301" }, 1095 { @"entries.0.timestamp.dateValue.timeIntervalSince1970", @"1179786301" },
1096 { @"entries.0.title", @"Car.jpg" }, 1096 { @"entries.0.title", @"Car.jpg" },
1097 { @"entries.0.photoDescription", photoDescriptionText }, 1097 { @"entries.0.photoDescription", photoDescriptionText },
1098 { @"entries.0.content.sourceURI", @"http://lh3.google.com/image/TestdomainTestAccount/RlIcPQ_TFvI/AAAAAAAAAAs/3fvWtQLN3KI/Car.jpg" }, 1098 { @"entries.0.content.sourceURI", @"http://lh3.google.com/image/TestdomainTestAccount/RlIcPQ_TFvI/AAAAAAAAAAs/3fvWtQLN3KI/Car.jpg" },
1099 { @"entries.0.content.type", @"image/jpeg" }, 1099 { @"entries.0.content.type", @"image/jpeg" },
1100 1100
1101 { @"entries.0.mediaGroup.mediaTitle", @"Car.jpg" }, 1101 { @"entries.0.mediaGroup.mediaTitle", @"Car.jpg" },
1102 { @"entries.0.mediaGroup.mediaDescription", photoDescriptionText }, 1102 { @"entries.0.mediaGroup.mediaDescription", photoDescriptionText },
1103 { @"entries.0.mediaGroup.mediaCredits.0", @"Greg" }, 1103 { @"entries.0.mediaGroup.mediaCredits.0", @"Greg" },
1104 { @"entries.0.mediaGroup.mediaContents.0.medium", @"image" }, 1104 { @"entries.0.mediaGroup.mediaContents.0.medium", @"image" },
1105 { @"entries.0.mediaGroup.mediaContents.0.type", @"image/jpeg" }, 1105 { @"entries.0.mediaGroup.mediaContents.0.type", @"image/jpeg" },
1106 { @"entries.0.mediaGroup.mediaContents.0.URLString", @"http://lh3.google.com/image/TestdomainTestAccount/RlIcPQ_TFvI/AAAAAAAAAAs/3fvWtQLN3KI/Car.jpg" }, 1106 { @"entries.0.mediaGroup.mediaContents.0.URLString", @"http://lh3.google.com/image/TestdomainTestAccount/RlIcPQ_TFvI/AAAAAAAAAAs/3fvWtQLN3KI/Car.jpg" },
1107 { @"entries.0.mediaGroup.mediaThumbnails.0.height", @"47" }, 1107 { @"entries.0.mediaGroup.mediaThumbnails.0.height", @"47" },
1108 { @"entries.0.mediaGroup.mediaThumbnails.0.width", @"72" }, 1108 { @"entries.0.mediaGroup.mediaThumbnails.0.width", @"72" },
1109 { @"entries.0.mediaGroup.mediaThumbnails.0.URLString", @"http://lh3.google.com/image/TestdomainTestAccount/RlIcPQ_TFvI/AAAAAAAAAAs/3fvWtQLN3KI/Car.jpg?imgmax=72" }, 1109 { @"entries.0.mediaGroup.mediaThumbnails.0.URLString", @"http://lh3.google.com/image/TestdomainTestAccount/RlIcPQ_TFvI/AAAAAAAAAAs/3fvWtQLN3KI/Car.jpg?imgmax=72" },
1110 { @"entries.0.mediaGroup.mediaKeywords", @"headlight, red car" }, 1110 { @"entries.0.mediaGroup.mediaKeywords", @"headlight, red car" },
1111 1111
1112 { @"entries.0.EXIFTags.tagDictionary.exposure", @"0.0080" }, 1112 { @"entries.0.EXIFTags.tagDictionary.exposure", @"0.0080" },
1113 { @"entries.0.EXIFTags.tagDictionary.imageUniqueID", @"d8a9e8fd57a384d216f4b2a853d654fc" }, 1113 { @"entries.0.EXIFTags.tagDictionary.imageUniqueID", @"d8a9e8fd57a384d216f4b2a853d654fc" },
1114 1114
1115 { @"entries.0.editMediaLink.href", @"contains:5067143579329304306" }, 1115 { @"entries.0.editMediaLink.href", @"contains:5067143579329304306" },
1116 { @"entries.0.editMediaLink.type", @"image/jpeg" }, 1116 { @"entries.0.editMediaLink.type", @"image/jpeg" },
1117 { @"entries.0.alternateLink.href", @"contains:photo#5067143579329304306" }, 1117 { @"entries.0.alternateLink.href", @"contains:photo#5067143579329304306" },
1118 { @"entries.0.alternateLink.type", kGDataLinkTypeHTML }, 1118 { @"entries.0.alternateLink.type", kGDataLinkTypeHTML },
1119 { @"entries.0.HTMLLink.href", @"contains:photo#5067143579329304306" }, 1119 { @"entries.0.HTMLLink.href", @"contains:photo#5067143579329304306" },
1120 { @"entries.0.selfLink.href", @"contains:photoid/5067143579329304306" }, 1120 { @"entries.0.selfLink.href", @"contains:photoid/5067143579329304306" },
1121 { @"entries.0.selfLink.type", kGDataLinkTypeAtom }, 1121 { @"entries.0.selfLink.type", kGDataLinkTypeAtom },
1122 { @"entries.0.feedLink.href", @"contains:photoid/5067143579329304306" }, 1122 { @"entries.0.feedLink.href", @"contains:photoid/5067143579329304306" },
1123 { @"entries.0.feedLink.type", kGDataLinkTypeAtom }, 1123 { @"entries.0.feedLink.type", kGDataLinkTypeAtom },
1124 1124
1125 { @"entries.0.unknownAttributes.@count", @"0" }, 1125 { @"entries.0.unknownAttributes.@count", @"0" },
1126 { @"entries.0.unknownChildren.@count", @"0" }, 1126 { @"entries.0.unknownChildren.@count", @"0" },
1127 1127
1128 { @"", @"" }, // end of feed 1128 { @"", @"" }, // end of feed
1129 1129
1130 // 1130 //
1131 // Feed of a photo's comments 1131 // Feed of a photo's comments
1132 // 1132 //
1133 { @"GDataFeedPhoto/2.0", @"Tests/FeedPhotosPhotoComment1.xml" }, 1133 { @"GDataFeedPhoto/2.0", @"Tests/FeedPhotosPhotoComment1.xml" },
1134 1134
1135 // GDataFeedPhoto - feed paths 1135 // GDataFeedPhoto - feed paths
1136 { @"generator.URI", @"http://photos.google.com/" }, 1136 { @"generator.URI", @"http://photos.google.com/" },
1137 { @"generator.name", @"Google Photos" }, 1137 { @"generator.name", @"Google Photos" },
1138 { @"generator.version", @"1.00" }, 1138 { @"generator.version", @"1.00" },
1139 { @"EXIFTags.tagDictionary.exposure", @"0.0080" }, 1139 { @"EXIFTags.tagDictionary.exposure", @"0.0080" },
1140 { @"categories.0.term", kGDataCategoryPhotosPhoto }, 1140 { @"categories.0.term", kGDataCategoryPhotosPhoto },
1141 { @"EXIFTags.tagDictionary.imageUniqueID", @"d8a9e8fd57a384d216f4b2a853d654fc" }, 1141 { @"EXIFTags.tagDictionary.imageUniqueID", @"d8a9e8fd57a384d216f4b2a853d654fc" },
1142 { @"checksum", @"23512309abbs298" }, 1142 { @"checksum", @"23512309abbs298" },
1143 { @"GPhotoID", @"5067143579329304306" }, 1143 { @"GPhotoID", @"5067143579329304306" },
1144 { @"albumID", @"5067143575034336993" }, 1144 { @"albumID", @"5067143575034336993" },
1145 { @"width", @"660" }, 1145 { @"width", @"660" },
1146 { @"height", @"433" }, 1146 { @"height", @"433" },
1147 { @"commentsEnabled", @"1" }, 1147 { @"commentsEnabled", @"1" },
1148 { @"size", @"87225" }, 1148 { @"size", @"87225" },
1149 { @"commentCount", @"1" }, 1149 { @"commentCount", @"1" },
1150 { @"timestamp.dateValue.timeIntervalSince1970", @"1179786301" }, 1150 { @"timestamp.dateValue.timeIntervalSince1970", @"1179786301" },
1151 { @"title", @"Car.jpg" }, 1151 { @"title", @"Car.jpg" },
1152 { @"photoDescription", photoDescriptionText }, 1152 { @"photoDescription", photoDescriptionText },
1153 { @"icon", @"http://lh3.google.com/image/TestdomainTestAccount/RlIcPQ_TFvI/AAAAAAAAAAs/3fvWtQLN3KI/Car.jpg?imgmax=288" }, 1153 { @"icon", @"http://lh3.google.com/image/TestdomainTestAccount/RlIcPQ_TFvI/AAAAAAAAAAs/3fvWtQLN3KI/Car.jpg?imgmax=288" },
1154 1154
1155 { @"unknownAttributes.@count", @"0" }, 1155 { @"unknownAttributes.@count", @"0" },
1156 { @"unknownChildren.@count", @"0" }, 1156 { @"unknownChildren.@count", @"0" },
1157 1157
1158 // GDataEntryPhotoComment - entry paths 1158 // GDataEntryPhotoComment - entry paths
1159 { @"entries.0.photoID", @"5067143579329304306" }, 1159 { @"entries.0.photoID", @"5067143579329304306" },
1160 { @"entries.0.GPhotoID", @"5067146044640532244" }, 1160 { @"entries.0.GPhotoID", @"5067146044640532244" },
1161 { @"entries.0.categories.0.term", kGDataCategoryPhotosComment }, 1161 { @"entries.0.categories.0.term", kGDataCategoryPhotosComment },
1162 1162
1163 { @"entries.0.unknownAttributes.@count", @"0" }, 1163 { @"entries.0.unknownAttributes.@count", @"0" },
1164 { @"entries.0.unknownChildren.@count", @"0" }, 1164 { @"entries.0.unknownChildren.@count", @"0" },
1165 1165
1166 { @"", @"" }, // end of feed 1166 { @"", @"" }, // end of feed
1167 1167
1168 // 1168 //
1169 // Feed of a user's tags 1169 // Feed of a user's tags
1170 // 1170 //
1171 1171
1172 // GDataFeedPhotoUser - feed paths 1172 // GDataFeedPhotoUser - feed paths
1173 1173
1174 { @"GDataFeedPhotoUser", @"Tests/FeedPhotosUserTag1.xml" }, 1174 { @"GDataFeedPhotoUser", @"Tests/FeedPhotosUserTag1.xml" },
1175 { @"username", @"TestdomainTestAccount" }, 1175 { @"username", @"TestdomainTestAccount" },
1176 { @"nickname", @"Greg" }, 1176 { @"nickname", @"Greg" },
1177 { @"thumbnail", @"hasPrefix:http://lh3.google.com/image/TestdomainTestAccount" }, 1177 { @"thumbnail", @"hasPrefix:http://lh3.google.com/image/TestdomainTestAccount" },
1178 { @"quotaLimit", @"1073741824" }, 1178 { @"quotaLimit", @"1073741824" },
1179 { @"quotaUsed", @"108303" }, 1179 { @"quotaUsed", @"108303" },
1180 { @"maxPhotosPerAlbum", @"500" }, 1180 { @"maxPhotosPerAlbum", @"500" },
1181 { @"categories.0.term", kGDataCategoryPhotosUser }, 1181 { @"categories.0.term", kGDataCategoryPhotosUser },
1182 1182
1183 { @"unknownAttributes.@count", @"0" }, 1183 { @"unknownAttributes.@count", @"0" },
1184 { @"unknownChildren.@count", @"0" }, 1184 { @"unknownChildren.@count", @"0" },
1185 1185
1186 // GDataEntryPhotoTag - entry paths 1186 // GDataEntryPhotoTag - entry paths
1187 1187
1188 { @"entries.0.title", @"headlight" }, 1188 { @"entries.0.title", @"headlight" },
1189 { @"entries.0.photoDescription", @"headlight" }, 1189 { @"entries.0.photoDescription", @"headlight" },
1190 { @"entries.0.categories.0.term", kGDataCategoryPhotosTag }, 1190 { @"entries.0.categories.0.term", kGDataCategoryPhotosTag },
1191 1191
1192 { @"entries.0.unknownAttributes.@count", @"0" }, 1192 { @"entries.0.unknownAttributes.@count", @"0" },
1193 { @"entries.0.unknownChildren.@count", @"0" }, 1193 { @"entries.0.unknownChildren.@count", @"0" },
1194 1194
1195 { @"entries.1.title", @"red car" }, 1195 { @"entries.1.title", @"red car" },
1196 { @"entries.1.photoDescription", @"red car" }, 1196 { @"entries.1.photoDescription", @"red car" },
1197 { @"entries.1.categories.0.term", kGDataCategoryPhotosTag }, 1197 { @"entries.1.categories.0.term", kGDataCategoryPhotosTag },
1198 1198
1199 { @"entries.1.unknownAttributes.@count", @"0" }, 1199 { @"entries.1.unknownAttributes.@count", @"0" },
1200 { @"entries.1.unknownChildren.@count", @"0" }, 1200 { @"entries.1.unknownChildren.@count", @"0" },
1201 1201
1202 { @"", @"" }, // end of feed 1202 { @"", @"" }, // end of feed
1203 1203
1204 // 1204 //
1205 // Feed of a user entry 1205 // Feed of a user entry
1206 // 1206 //
1207 // This is really a fake feed created by requesting just a single 1207 // This is really a fake feed created by requesting just a single
1208 // user entry from the picasa server, using 1208 // user entry from the picasa server, using
1209 // GET http://photos.googleapis.com/data/entry/api/user/<username> 1209 // GET http://photos.googleapis.com/data/entry/api/user/<username>
1210 // 1210 //
1211 1211
1212 // GDataFeedPhotoUser - feed paths (none) 1212 // GDataFeedPhotoUser - feed paths (none)
1213 1213
1214 // GDataEntryPhotoUser - entry paths 1214 // GDataEntryPhotoUser - entry paths
1215 { @"GDataFeedPhotoUser", @"Tests/FeedPhotosUserEntry1.xml" }, 1215 { @"GDataFeedPhotoUser", @"Tests/FeedPhotosUserEntry1.xml" },
1216 1216
1217 { @"entries.0.nickname", @"Greg" }, 1217 { @"entries.0.nickname", @"Greg" },
1218 { @"entries.0.username", @"TestdomainTestAccount" }, 1218 { @"entries.0.username", @"TestdomainTestAccount" },
1219 { @"entries.0.thumbnail", @"hasPrefix:http://lh3.google.com/image/TestdomainTestAccount/AAAAUbcFQeo" }, 1219 { @"entries.0.thumbnail", @"hasPrefix:http://lh3.google.com/image/TestdomainTestAccount/AAAAUbcFQeo" },
1220 { @"entries.0.identifier", @"http://photos.googleapis.com/data/entry/api/user/TestdomainTestAccount" }, 1220 { @"entries.0.identifier", @"http://photos.googleapis.com/data/entry/api/user/TestdomainTestAccount" },
1221 { @"entries.0.categories.0.term", kGDataCategoryPhotosUser }, 1221 { @"entries.0.categories.0.term", kGDataCategoryPhotosUser },
1222 1222
1223 { @"entries.0.unknownAttributes.@count", @"0" }, 1223 { @"entries.0.unknownAttributes.@count", @"0" },
1224 { @"entries.0.unknownChildren.@count", @"0" }, 1224 { @"entries.0.unknownChildren.@count", @"0" },
1225 1225
1226 { @"", @"" }, // end of feed 1226 { @"", @"" }, // end of feed
1227 1227
1228 // 1228 //
1229 // Feed of search results 1229 // Feed of search results
1230 // 1230 //
1231 1231
1232 // feed paths 1232 // feed paths
1233 { @"GDataFeedPhoto/2.0", @"Tests/FeedPhotosSearch1.xml" }, 1233 { @"GDataFeedPhoto/2.0", @"Tests/FeedPhotosSearch1.xml" },
1234 { @"title", @"Search Results" }, 1234 { @"title", @"Search Results" },
1235 1235
1236 // entry paths 1236 // entry paths
1237 { @"entries.0.title", @"Leangi_Pima_Shetland_Sheepdog_puppies_f2_3d_4.jpg" }, 1237 { @"entries.0.title", @"Leangi_Pima_Shetland_Sheepdog_puppies_f2_3d_4.jpg" },
1238 { @"entries.0.GPhotoID", @"5310251879415742162" }, 1238 { @"entries.0.GPhotoID", @"5310251879415742162" },
1239 { @"entries.0.albumID", @"5310242183362606433" }, 1239 { @"entries.0.albumID", @"5310242183362606433" },
1240 { @"entries.0.albumTitle", @"Shetland Sheepdog - B-litter - Belinda Mali Zmaj & Marvithall Sherwood" }, 1240 { @"entries.0.albumTitle", @"Shetland Sheepdog - B-litter - Belinda Mali Zmaj & Marvithall Sherwood" },
1241 { @"entries.0.albumDescription", @"Leangi Pima Shetland Sheepdog puppies" }, 1241 { @"entries.0.albumDescription", @"Leangi Pima Shetland Sheepdog puppies" },
1242 { @"entries.0.location", @"Belgrade, Serbia, Leangi Pima kennel" }, 1242 { @"entries.0.location", @"Belgrade, Serbia, Leangi Pima kennel" },
1243 { @"entries.0.snippet", @"... <b>puppies</b> ..." }, 1243 { @"entries.0.snippet", @"... <b>puppies</b> ..." },
1244 { @"entries.0.snippetType", kGDataPhotoSnippetTypePhotoTags }, 1244 { @"entries.0.snippetType", kGDataPhotoSnippetTypePhotoTags },
1245 { @"entries.0.truncated", @"0" }, 1245 { @"entries.0.truncated", @"0" },
1246 { @"", @"" }, // end of feed 1246 { @"", @"" }, // end of feed
1247 1247
1248 { nil, nil } // end of test array 1248 { nil, nil } // end of test array
1249 }; 1249 };
1250 1250
1251 [self runTests:tests]; 1251 [self runTests:tests];
1252 } 1252 }
1253 1253
1254 - (void)testWebmasterToolsFeeds { 1254 - (void)testWebmasterToolsFeeds {
1255 1255
1256 TestKeyPathValues tests[] = 1256 TestKeyPathValues tests[] =
1257 { 1257 {
1258 // 1258 //
1259 // Feed of a user's sites 1259 // Feed of a user's sites
1260 // 1260 //
1261 { @"GDataFeedSite", @"Tests/FeedWebmasterToolsSite1.xml" }, 1261 { @"GDataFeedSite", @"Tests/FeedWebmasterToolsSite1.xml" },
1262 1262
1263 { @"identifier", @"http://www.google.com/webmasters/tools/feeds/sites" }, 1263 { @"identifier", @"http://www.google.com/webmasters/tools/feeds/sites" },
1264 1264
1265 // GDataEntrySite methods 1265 // GDataEntrySite methods
1266 1266
1267 { @"entries.0.categories.0.term", kGDataCategorySiteInfo }, 1267 { @"entries.0.categories.0.term", kGDataCategorySiteInfo },
1268 { @"entries.0.isIndexed", @"1" }, 1268 { @"entries.0.isIndexed", @"1" },
1269 { @"entries.0.crawledDate.date.timeIntervalSince1970", @"1206358560" }, 1269 { @"entries.0.crawledDate.date.timeIntervalSince1970", @"1206358560" },
1270 { @"entries.0.isVerified", @"1" }, 1270 { @"entries.0.isVerified", @"1" },
1271 { @"entries.0.verificationMethods.@count", @"2" }, 1271 { @"entries.0.verificationMethods.@count", @"2" },
1272 { @"entries.0.verificationMethods.0.type", kGDataSiteVerificationMethodMetatag }, 1272 { @"entries.0.verificationMethods.0.type", kGDataSiteVerificationMethodMetatag },
1273 { @"entries.0.verificationMethods.0.isInUse", @"0" }, 1273 { @"entries.0.verificationMethods.0.isInUse", @"0" },
1274 { @"entries.0.verificationMethods.1.type", kGDataSiteVerificationMethodHTMLPage }, 1274 { @"entries.0.verificationMethods.1.type", kGDataSiteVerificationMethodHTMLPage },
1275 { @"entries.0.verificationMethods.1.isInUse", @"1" }, 1275 { @"entries.0.verificationMethods.1.isInUse", @"1" },
1276 { @"entries.0.verificationMethods.1.value", @"google28a5eb30440fabf0.html" }, 1276 { @"entries.0.verificationMethods.1.value", @"google28a5eb30440fabf0.html" },
1277 { @"entries.0.verificationMethodInUse.value", @"google28a5eb30440fabf0.html" }, 1277 { @"entries.0.verificationMethodInUse.value", @"google28a5eb30440fabf0.html" },
1278 { @"entries.0.verificationEntryLink.href", @"contains:/http%3A%2F%2Fwww.domain.com%2F/verification" }, 1278 { @"entries.0.verificationEntryLink.href", @"contains:/http%3A%2F%2Fwww.domain.com%2F/verification" },
1279 { @"entries.0.sitemapsEntryLink.href", @"contains:/http%3A%2F%2Fwww.domain.com%2F/sitemaps" }, 1279 { @"entries.0.sitemapsEntryLink.href", @"contains:/http%3A%2F%2Fwww.domain.com%2F/sitemaps" },
1280 { @"entries.0.geoLocation", @"US" }, 1280 { @"entries.0.geoLocation", @"US" },
1281 { @"entries.0.preferredDomain", kGDataSiteCrawlPreferredDomainNone }, 1281 { @"entries.0.preferredDomain", kGDataSiteCrawlPreferredDomainNone },
1282 { @"entries.0.crawlRate", kGDataSiteCrawlRateNormal }, 1282 { @"entries.0.crawlRate", kGDataSiteCrawlRateNormal },
1283 { @"entries.0.hasEnhancedImageSearch", @"1" }, 1283 { @"entries.0.hasEnhancedImageSearch", @"1" },
1284 { @"entries.0.entryLinks.@count", @"2" }, 1284 { @"entries.0.entryLinks.@count", @"2" },
1285 1285
1286 { @"", @"" }, // end of feed 1286 { @"", @"" }, // end of feed
1287 1287
1288 // 1288 //
1289 // Feed of a site's sitemaps 1289 // Feed of a site's sitemaps
1290 // 1290 //
1291 { @"GDataFeedSitemap", @"Tests/FeedWebmasterToolsSitemap1.xml" }, 1291 { @"GDataFeedSitemap", @"Tests/FeedWebmasterToolsSitemap1.xml" },
1292 1292
1293 { @"identifier", @"contains:http%3A%2F%2Fwww.domain.com%2F/sitemaps" }, 1293 { @"identifier", @"contains:http%3A%2F%2Fwww.domain.com%2F/sitemaps" },
1294 1294
1295 { @"sitemapNews.publicationLabels.@count", @"3" }, 1295 { @"sitemapNews.publicationLabels.@count", @"3" },
1296 { @"sitemapNews.publicationLabels.2.stringValue", @"a third publabel" }, 1296 { @"sitemapNews.publicationLabels.2.stringValue", @"a third publabel" },
1297 1297
1298 { @"sitemapMobile.markupLanguages.@count", @"3" }, 1298 { @"sitemapMobile.markupLanguages.@count", @"3" },
1299 { @"sitemapMobile.markupLanguages.2.stringValue", @"cHTML" }, 1299 { @"sitemapMobile.markupLanguages.2.stringValue", @"cHTML" },
1300 1300
1301 // GDataEntrySitemap methods 1301 // GDataEntrySitemap methods
1302 1302
1303 { @"entries.0.categories.0.term", kGDataCategorySitemapRegular }, 1303 { @"entries.0.categories.0.term", kGDataCategorySitemapRegular },
1304 { @"entries.0.sitemapType", @"WEB" }, 1304 { @"entries.0.sitemapType", @"WEB" },
1305 { @"entries.0.sitemapStatus", @"Pending" }, 1305 { @"entries.0.sitemapStatus", @"Pending" },
1306 { @"entries.0.lastDownloadDate", nil }, 1306 { @"entries.0.lastDownloadDate", nil },
1307 { @"entries.0.sitemapURLCount", @"99" }, 1307 { @"entries.0.sitemapURLCount", @"99" },
1308 1308
1309 { @"entries.1.categories.0.term", kGDataCategorySitemapMobile }, 1309 { @"entries.1.categories.0.term", kGDataCategorySitemapMobile },
1310 { @"entries.1.markupLanguage", @"HTML" }, 1310 { @"entries.1.markupLanguage", @"HTML" },
1311 { @"entries.1.sitemapStatus", @"StatusValue" }, 1311 { @"entries.1.sitemapStatus", @"StatusValue" },
1312 { @"entries.1.lastDownloadDate.date.timeIntervalSince1970", @"1163878052" }, 1312 { @"entries.1.lastDownloadDate.date.timeIntervalSince1970", @"1163878052" },
1313 { @"entries.1.sitemapURLCount", @"102" }, 1313 { @"entries.1.sitemapURLCount", @"102" },
1314 1314
1315 { @"entries.2.categories.0.term", kGDataCategorySitemapNews }, 1315 { @"entries.2.categories.0.term", kGDataCategorySitemapNews },
1316 { @"entries.2.publicationLabel", @"pubLabelValue" }, 1316 { @"entries.2.publicationLabel", @"pubLabelValue" },
1317 { @"entries.2.sitemapStatus", @"AnotherStatusValue" }, 1317 { @"entries.2.sitemapStatus", @"AnotherStatusValue" },
1318 { @"entries.2.lastDownloadDate.date.timeIntervalSince1970", @"1163878052" }, 1318 { @"entries.2.lastDownloadDate.date.timeIntervalSince1970", @"1163878052" },
1319 { @"entries.2.sitemapURLCount", @"102" }, 1319 { @"entries.2.sitemapURLCount", @"102" },
1320 1320
1321 { @"", @"" }, // end of feed 1321 { @"", @"" }, // end of feed
1322 1322
1323 // 1323 //
1324 // Feed of a site's crawl issues 1324 // Feed of a site's crawl issues
1325 // 1325 //
1326 { @"GDataFeedSiteCrawlIssue", @"Tests/FeedWebmasterToolsCrawlIssues1.xml" }, 1326 { @"GDataFeedSiteCrawlIssue", @"Tests/FeedWebmasterToolsCrawlIssues1.xml" },
1327 1327
1328 { @"identifier", @"contains:http%3A%2F%2Fwww.example.net%2F/crawlissues" }, 1328 { @"identifier", @"contains:http%3A%2F%2Fwww.example.net%2F/crawlissues" },
1329 { @"title", @"Crawl Issues" }, 1329 { @"title", @"Crawl Issues" },
1330 1330
1331 // GDataEntrySiteCrawlIssue methods 1331 // GDataEntrySiteCrawlIssue methods
1332 { @"entries.0.crawlType", kGDataSiteCrawlTypeWeb }, 1332 { @"entries.0.crawlType", kGDataSiteCrawlTypeWeb },
1333 { @"entries.0.detectedDate.RFC3339String", @"2008-11-17T01:06:10Z" }, 1333 { @"entries.0.detectedDate.RFC3339String", @"2008-11-17T01:06:10Z" },
1334 { @"entries.0.detail", @"4xx Error" }, 1334 { @"entries.0.detail", @"4xx Error" },
1335 { @"entries.0.issueType", @"http-error" }, 1335 { @"entries.0.issueType", @"http-error" },
1336 { @"entries.0.issueURLString", @"http://example.com/dir/" }, 1336 { @"entries.0.issueURLString", @"http://example.com/dir/" },
1337 { @"entries.0.issueLinkedFromURLStrings.0", @"http://example.com" }, 1337 { @"entries.0.issueLinkedFromURLStrings.0", @"http://example.com" },
1338 { @"entries.0.issueLinkedFromURLStrings.0.className", @"NSCFString" }, 1338 { @"entries.0.issueLinkedFromURLStrings.0.className", @"__NSCFString" },
1339 1339
1340 { @"", @"" }, // end of feed 1340 { @"", @"" }, // end of feed
1341 1341
1342 // 1342 //
1343 // Feed of a site's messages 1343 // Feed of a site's messages
1344 // 1344 //
1345 { @"GDataFeedSiteMessage", @"Tests/FeedWebmasterToolsMessages1.xml" }, 1345 { @"GDataFeedSiteMessage", @"Tests/FeedWebmasterToolsMessages1.xml" },
1346 { @"title", @"Messages" }, 1346 { @"title", @"Messages" },
1347 1347
1348 // GDataEntrySiteNessage methods 1348 // GDataEntrySiteNessage methods
1349 { @"entries.0.body", @"Crawl rate change has been requested." }, 1349 { @"entries.0.body", @"Crawl rate change has been requested." },
1350 { @"entries.0.messageDate.RFC3339String", @"2008-09-18T20:49:57Z" }, 1350 { @"entries.0.messageDate.RFC3339String", @"2008-09-18T20:49:57Z" },
1351 { @"entries.0.language", @"en" }, 1351 { @"entries.0.language", @"en" },
1352 { @"entries.0.read", @"1" }, 1352 { @"entries.0.read", @"1" },
1353 { @"entries.0.subject", @"hasPrefix:Crawl rate change request" }, 1353 { @"entries.0.subject", @"hasPrefix:Crawl rate change request" },
1354 1354
1355 { @"", @"" }, // end of feed 1355 { @"", @"" }, // end of feed
1356 1356
1357 // 1357 //
1358 // Feed of a site's keywords 1358 // Feed of a site's keywords
1359 // 1359 //
1360 { @"GDataFeedSiteKeyword", @"Tests/FeedWebmasterToolsKeywords1.xml" }, 1360 { @"GDataFeedSiteKeyword", @"Tests/FeedWebmasterToolsKeywords1.xml" },
1361 1361
1362 { @"identifier", @"contains:http%3A%2F%2Fwww.example.net%2F/keywords" }, 1362 { @"identifier", @"contains:http%3A%2F%2Fwww.example.net%2F/keywords" },
1363 1363
1364 { @"keywords.@count", @"4" }, 1364 { @"keywords.@count", @"4" },
1365 { @"keywordsWithInternalSource.@count", @"1" }, 1365 { @"keywordsWithInternalSource.@count", @"1" },
1366 { @"keywords.0.stringValue", @"example net" }, 1366 { @"keywords.0.stringValue", @"example net" },
1367 { @"keywords.0.source", kGDataSiteKeywordExternal }, 1367 { @"keywords.0.source", kGDataSiteKeywordExternal },
1368 { @"keywordsWithInternalSource.0.stringValue", @"example" }, 1368 { @"keywordsWithInternalSource.0.stringValue", @"example" },
1369 { @"keywordsWithInternalSource.0.source", kGDataSiteKeywordInternal }, 1369 { @"keywordsWithInternalSource.0.source", kGDataSiteKeywordInternal },
1370 1370
1371 // the keywords feed has no entries 1371 // the keywords feed has no entries
1372 { @"entries", nil }, 1372 { @"entries", nil },
1373 1373
1374 { @"", @"" }, // end of feed 1374 { @"", @"" }, // end of feed
1375 1375
1376 { nil, nil } // end of test array 1376 { nil, nil } // end of test array
1377 }; 1377 };
1378 1378
1379 [self runTests:tests]; 1379 [self runTests:tests];
1380 } 1380 }
1381 1381
1382 1382
1383 - (void)testMessageFeed { 1383 - (void)testMessageFeed {
1384 1384
1385 TestKeyPathValues tests[] = 1385 TestKeyPathValues tests[] =
1386 { 1386 {
1387 // 1387 //
1388 // Message Feed 1388 // Message Feed
1389 // 1389 //
1390 { @"GDataFeedMessage", @"Tests/FeedMessageTest1.xml" }, 1390 { @"GDataFeedMessage", @"Tests/FeedMessageTest1.xml" },
1391 1391
1392 // GDataFeedMessage paths 1392 // GDataFeedMessage paths
1393 { @"links.0.href", @"hasPrefix:http://www.google.com/calendar/feeds/default" }, 1393 { @"links.0.href", @"hasPrefix:http://www.google.com/calendar/feeds/default" },
1394 { @"categories.0.term", kGDataMessage }, 1394 { @"categories.0.term", kGDataMessage },
1395 1395
1396 { @"unknownAttributes.@count", @"0" }, 1396 { @"unknownAttributes.@count", @"0" },
1397 { @"unknownChildren.@count", @"0" }, 1397 { @"unknownChildren.@count", @"0" },
1398 1398
1399 // GDataEntryMessage paths 1399 // GDataEntryMessage paths
1400 { @"entries.0.categories.0.term", kGDataMessage }, 1400 { @"entries.0.categories.0.term", kGDataMessage },
1401 { @"entries.0.categories.1.term", kGDataMessageSent }, 1401 { @"entries.0.categories.1.term", kGDataMessageSent },
1402 { @"entries.0.identifier", @"http://mymail.example.com/feeds/jo/home/full/e1a2af06df8a563edf9d32ec9fd61e03f7f3b67b" }, 1402 { @"entries.0.identifier", @"http://mymail.example.com/feeds/jo/home/full/e1a2af06df8a563edf9d32ec9fd61e03f7f3b67b" },
1403 { @"entries.0.content", @"Hi, Fritz -- The information you're looking for is on p. 47." }, 1403 { @"entries.0.content", @"Hi, Fritz -- The information you're looking for is on p. 47." },
1404 { @"entries.0.title", @"Re: Info?" }, 1404 { @"entries.0.title", @"Re: Info?" },
1405 { @"entries.0.participants.0.rel", kGDataWhoMessageFrom }, 1405 { @"entries.0.participants.0.rel", kGDataWhoMessageFrom },
1406 { @"entries.0.participants.1.rel", kGDataWhoMessageTo }, 1406 { @"entries.0.participants.1.rel", kGDataWhoMessageTo },
1407 1407
1408 { @"entries.0.unknownAttributes.@count", @"0" }, 1408 { @"entries.0.unknownAttributes.@count", @"0" },
1409 { @"entries.0.unknownChildren.@count", @"0" }, 1409 { @"entries.0.unknownChildren.@count", @"0" },
1410 1410
1411 { @"", @"" }, // end of feed 1411 { @"", @"" }, // end of feed
1412 1412
1413 { nil, nil } // end of test array 1413 { nil, nil } // end of test array
1414 }; 1414 };
1415 1415
1416 [self runTests:tests]; 1416 [self runTests:tests];
1417 } 1417 }
1418 1418
1419 1419
1420 - (void)testDocListFeed { 1420 - (void)testDocListFeed {
1421 1421
1422 TestKeyPathValues tests[] = 1422 TestKeyPathValues tests[] =
1423 { 1423 {
1424 // 1424 //
1425 // Docs Feed 1425 // Docs Feed
1426 // 1426 //
1427 { @"GDataFeedDocList", @"Tests/FeedDocListTest1.xml" }, 1427 { @"GDataFeedDocList", @"Tests/FeedDocListTest1.xml" },
1428 1428
1429 { @"identifier", @"http://docs.google.com/feeds/documents/private/full" }, 1429 { @"identifier", @"http://docs.google.com/feeds/documents/private/full" },
1430 1430
1431 // Docs Entries. The elements are all standard atom protocol elements, 1431 // Docs Entries. The elements are all standard atom protocol elements,
1432 // so we are just interested that the proper entry class has been 1432 // so we are just interested that the proper entry class has been
1433 // instantiated 1433 // instantiated
1434 { @"entries.0.className", @"GDataEntryStandardDoc" }, 1434 { @"entries.0.className", @"GDataEntryStandardDoc" },
1435 { @"entries.0.categories.0.term", @"http://schemas.google.com/docs/2007#document"}, 1435 { @"entries.0.categories.0.term", @"http://schemas.google.com/docs/2007#document"},
1436 { @"entries.0.categories.0.label", @"document"}, 1436 { @"entries.0.categories.0.label", @"document"},
1437 { @"entries.0.lastViewed.date.timeIntervalSince1970", @"1222905296"}, 1437 { @"entries.0.lastViewed.date.timeIntervalSince1970", @"1222905296"},
1438 { @"entries.0.sharedWithMe.date.timeIntervalSince1970", @"1321426505"}, 1438 { @"entries.0.sharedWithMe.date.timeIntervalSince1970", @"1321426505"},
1439 { @"entries.0.lastModifiedByMe.date.timeIntervalSince1970", @"1325716676"}, 1439 { @"entries.0.lastModifiedByMe.date.timeIntervalSince1970", @"1325716676"},
1440 { @"entries.0.writersCanInvite", @"1"}, 1440 { @"entries.0.writersCanInvite", @"1"},
1441 { @"entries.0.lastModifiedBy.name", @"Fred Flintstone"}, 1441 { @"entries.0.lastModifiedBy.name", @"Fred Flintstone"},
1442 { @"entries.0.quotaBytesUsed", @"12345"}, 1442 { @"entries.0.quotaBytesUsed", @"12345"},
1443 { @"entries.0.documentDescription", @"cherry soda"}, 1443 { @"entries.0.documentDescription", @"cherry soda"},
1444 { @"entries.0.MD5Checksum", @"2b01142f7481c7b056c4b410d28f33cf"}, 1444 { @"entries.0.MD5Checksum", @"2b01142f7481c7b056c4b410d28f33cf"},
1445 { @"entries.0.filename", @"hi mom.txt"}, 1445 { @"entries.0.filename", @"hi mom.txt"},
1446 { @"entries.0.suggestedFilename", @"Hi Mom.txt"}, 1446 { @"entries.0.suggestedFilename", @"Hi Mom.txt"},
1447 { @"entries.0.lastCommented", @"2007-08-02T20:09:40Z"}, 1447 { @"entries.0.lastCommented", @"2007-08-02T20:09:40Z"},
1448 { @"entries.0.isRemoved", @"1"}, 1448 { @"entries.0.isRemoved", @"1"},
1449 { @"entries.0.changestamp", @"1234"}, 1449 { @"entries.0.changestamp", @"1234"},
1450 { @"entries.0.isHidden", @"1"}, 1450 { @"entries.0.isHidden", @"1"},
1451 1451
1452 { @"entries.1.className", @"GDataEntrySpreadsheetDoc" }, 1452 { @"entries.1.className", @"GDataEntrySpreadsheetDoc" },
1453 { @"entries.1.categories.0.term", @"http://schemas.google.com/docs/2007#spreadsheet"}, 1453 { @"entries.1.categories.0.term", @"http://schemas.google.com/docs/2007#spreadsheet"},
1454 { @"entries.1.categories.0.label", @"spreadsheet"}, 1454 { @"entries.1.categories.0.label", @"spreadsheet"},
1455 1455
1456 { @"entries.2.className", @"GDataEntryPresentationDoc" }, 1456 { @"entries.2.className", @"GDataEntryPresentationDoc" },
1457 { @"entries.2.categories.0.term", @"http://schemas.google.com/docs/2007#presentation"}, 1457 { @"entries.2.categories.0.term", @"http://schemas.google.com/docs/2007#presentation"},
1458 { @"entries.2.categories.0.label", @"presentation"}, 1458 { @"entries.2.categories.0.label", @"presentation"},
1459 { @"entries.2.isStarred", @"0"}, 1459 { @"entries.2.isStarred", @"0"},
1460 1460
1461 { @"entries.3.className", @"GDataEntryPDFDoc" }, 1461 { @"entries.3.className", @"GDataEntryPDFDoc" },
1462 { @"entries.3.categories.0.term", @"http://schemas.google.com/docs/2007#pdf"}, 1462 { @"entries.3.categories.0.term", @"http://schemas.google.com/docs/2007#pdf"},
1463 { @"entries.3.categories.0.label", @"pdf"}, 1463 { @"entries.3.categories.0.label", @"pdf"},
1464 { @"entries.3.isStarred", @"1"}, 1464 { @"entries.3.isStarred", @"1"},
1465 { @"entries.3.isHidden", @"0"}, 1465 { @"entries.3.isHidden", @"0"},
1466 { @"entries.3.ACLFeedLink.href", @"contains:pdf54595c7b"}, 1466 { @"entries.3.ACLFeedLink.href", @"contains:pdf54595c7b"},
1467 { @"entries.3.parentLinks.0.href", @"contains:cc5275b740e3" }, 1467 { @"entries.3.parentLinks.0.href", @"contains:cc5275b740e3" },
1468 1468
1469 { @"entries.4.className", @"GDataEntryFolderDoc" }, 1469 { @"entries.4.className", @"GDataEntryFolderDoc" },
1470 { @"entries.4.categories.0.term", @"http://schemas.google.com/docs/2007#folder"}, 1470 { @"entries.4.categories.0.term", @"http://schemas.google.com/docs/2007#folder"},
1471 { @"entries.4.categories.0.label", @"folder"}, 1471 { @"entries.4.categories.0.label", @"folder"},
1472 1472
1473 { @"entries.0.unknownAttributes.@count", @"0" }, 1473 { @"entries.0.unknownAttributes.@count", @"0" },
1474 { @"entries.0.unknownChildren.@count", @"0" }, 1474 { @"entries.0.unknownChildren.@count", @"0" },
1475 1475
1476 { @"", @"" }, // end of feed 1476 { @"", @"" }, // end of feed
1477 1477
1478 // 1478 //
1479 // DocList User Metadata Entry 1479 // DocList User Metadata Entry
1480 // 1480 //
1481 { @"GDataEntryDocListMetadata", @"Tests/EntryDocListMetadataTest1.xml" }, 1481 { @"GDataEntryDocListMetadata", @"Tests/EntryDocListMetadataTest1.xml" },
1482 1482
1483 { @"identifier", @"http://docs.google.com/feeds/metadata/fredflintstone%40example.net" }, 1483 { @"identifier", @"http://docs.google.com/feeds/metadata/fredflintstone%40example.net" },
1484 { @"quotaBytesTotal", @"1073741824" }, 1484 { @"quotaBytesTotal", @"1073741824" },
1485 { @"quotaBytesUsed", @"124432802" }, 1485 { @"quotaBytesUsed", @"124432802" },
1486 { @"quotaBytesUsedInTrash", @"89564924" }, 1486 { @"quotaBytesUsedInTrash", @"89564924" },
1487 { @"exportFormats.0.source", @"presentation" }, 1487 { @"exportFormats.0.source", @"presentation" },
1488 { @"exportFormats.0.target", @"text/plain" }, 1488 { @"exportFormats.0.target", @"text/plain" },
1489 { @"importFormats.1.source", @"application/vnd.sun.xml.writer" }, 1489 { @"importFormats.1.source", @"application/vnd.sun.xml.writer" },
1490 { @"importFormats.1.target", @"document" }, 1490 { @"importFormats.1.target", @"document" },
1491 { @"features.0.featureName", @"ocr" }, 1491 { @"features.0.featureName", @"ocr" },
1492 { @"features.0.featureRate", nil }, 1492 { @"features.0.featureRate", nil },
1493 { @"features.1.featureName", @"translation" }, 1493 { @"features.1.featureName", @"translation" },
1494 { @"features.1.featureRate", @"2.0" }, 1494 { @"features.1.featureRate", @"2.0" },
1495 { @"maxUploadSizes.0.longLongNumberValue", @"512000" }, 1495 { @"maxUploadSizes.0.longLongNumberValue", @"512000" },
1496 { @"maxUploadSizes.0.uploadKind", @"document" }, 1496 { @"maxUploadSizes.0.uploadKind", @"document" },
1497 { @"maxUploadSizeForKindPDF.longLongNumberValue", @"1048571000" }, 1497 { @"maxUploadSizeForKindPDF.longLongNumberValue", @"1048571000" },
1498 { @"featureForNameUploadAny.featureName", @"upload_any" }, 1498 { @"featureForNameUploadAny.featureName", @"upload_any" },
1499 { @"featureForNameUploadNone", nil }, 1499 { @"featureForNameUploadNone", nil },
1500 { @"", @"" }, // end of feed 1500 { @"", @"" }, // end of feed
1501 1501
1502 { nil, nil } // end of test array 1502 { nil, nil } // end of test array
1503 }; 1503 };
1504 [self runTests:tests]; 1504 [self runTests:tests];
1505 }; 1505 };
1506 1506
1507 - (void)testFinanceFeed { 1507 - (void)testFinanceFeed {
1508 1508
1509 TestKeyPathValues tests[] = 1509 TestKeyPathValues tests[] =
1510 { 1510 {
1511 // 1511 //
1512 // Portfolio feed 1512 // Portfolio feed
1513 // 1513 //
1514 { @"GDataFeedFinancePortfolio", @"Tests/FeedFinancePortfolioTest1.xml" }, 1514 { @"GDataFeedFinancePortfolio", @"Tests/FeedFinancePortfolioTest1.xml" },
1515 1515
1516 { @"identifier", @"http://finance.google.com/finance/feeds/default/portfolios" }, 1516 { @"identifier", @"http://finance.google.com/finance/feeds/default/portfolios" },
1517 1517
1518 // Portfolio entry 1518 // Portfolio entry
1519 { @"entries.0.className", @"GDataEntryFinancePortfolio" }, 1519 { @"entries.0.className", @"GDataEntryFinancePortfolio" },
1520 { @"entries.0.positionURL.absoluteString", @"http://finance.google.com/finance/feeds/default/portfolios/1/positions" }, 1520 { @"entries.0.positionURL.absoluteString", @"http://finance.google.com/finance/feeds/default/portfolios/1/positions" },
1521 { @"entries.0.portfolioData.currencyCode", @"USD" }, 1521 { @"entries.0.portfolioData.currencyCode", @"USD" },
1522 { @"entries.0.portfolioData.gainPercentage", @"10.3" }, 1522 { @"entries.0.portfolioData.gainPercentage", @"10.3" },
1523 { @"entries.0.portfolioData.return1w", @"12" }, 1523 { @"entries.0.portfolioData.return1w", @"12" },
1524 { @"entries.0.portfolioData.return1y", @"17" }, 1524 { @"entries.0.portfolioData.return1y", @"17" },
1525 { @"entries.0.portfolioData.return3m", @"0" }, 1525 { @"entries.0.portfolioData.return3m", @"0" },
1526 { @"entries.0.portfolioData.return3y", @"23" }, 1526 { @"entries.0.portfolioData.return3y", @"23" },
1527 { @"entries.0.portfolioData.return4w", @"-41" }, 1527 { @"entries.0.portfolioData.return4w", @"-41" },
1528 { @"entries.0.portfolioData.return5y", @"10" }, 1528 { @"entries.0.portfolioData.return5y", @"10" },
1529 { @"entries.0.portfolioData.returnOverall", @"12" }, 1529 { @"entries.0.portfolioData.returnOverall", @"12" },
1530 { @"entries.0.portfolioData.returnYTD", @"6.7" }, 1530 { @"entries.0.portfolioData.returnYTD", @"6.7" },
1531 1531
1532 { @"", @"" }, // end of feed 1532 { @"", @"" }, // end of feed
1533 1533
1534 // 1534 //
1535 // Position feed 1535 // Position feed
1536 // 1536 //
1537 { @"GDataFeedFinancePosition", @"Tests/FeedFinancePositionTest1.xml" }, 1537 { @"GDataFeedFinancePosition", @"Tests/FeedFinancePositionTest1.xml" },
1538 1538
1539 { @"identifier", @"http://finance.google.com/finance/feeds/default/portfolios/1/positions" }, 1539 { @"identifier", @"http://finance.google.com/finance/feeds/default/portfolios/1/positions" },
1540 1540
1541 // Position entry 1541 // Position entry
1542 { @"entries.0.className", @"GDataEntryFinancePosition" }, 1542 { @"entries.0.className", @"GDataEntryFinancePosition" },
1543 { @"entries.0.transactionURL.absoluteString", @"http://finance.google.com/finance/feeds/default/portfolios/1/positions/NASDAQ:GOOG/transactions" }, 1543 { @"entries.0.transactionURL.absoluteString", @"http://finance.google.com/finance/feeds/default/portfolios/1/positions/NASDAQ:GOOG/transactions" },
1544 { @"entries.0.symbol.exchange", @"NASDAQ" }, 1544 { @"entries.0.symbol.exchange", @"NASDAQ" },
1545 { @"entries.0.symbol.fullName", @"Google Inc." }, 1545 { @"entries.0.symbol.fullName", @"Google Inc." },
1546 { @"entries.0.symbol.symbol", @"GOOG" }, 1546 { @"entries.0.symbol.symbol", @"GOOG" },
1547 1547
1548 { @"entries.0.positionData.shares", @"2" }, 1548 { @"entries.0.positionData.shares", @"2" },
1549 { @"entries.0.positionData.gainPercentage", @"1.3" }, 1549 { @"entries.0.positionData.gainPercentage", @"1.3" },
1550 { @"entries.0.positionData.return1w", @"0.07" }, 1550 { @"entries.0.positionData.return1w", @"0.07" },
1551 { @"entries.0.positionData.return1y", @"-10" }, 1551 { @"entries.0.positionData.return1y", @"-10" },
1552 { @"entries.0.positionData.return3m", @"172.1" }, 1552 { @"entries.0.positionData.return3m", @"172.1" },
1553 { @"entries.0.positionData.return3y", @"5.4" }, 1553 { @"entries.0.positionData.return3y", @"5.4" },
1554 { @"entries.0.positionData.return4w", @"-4" }, 1554 { @"entries.0.positionData.return4w", @"-4" },
1555 { @"entries.0.positionData.return5y", @"11" }, 1555 { @"entries.0.positionData.return5y", @"11" },
1556 { @"entries.0.positionData.returnOverall", @"12" }, 1556 { @"entries.0.positionData.returnOverall", @"12" },
1557 { @"entries.0.positionData.returnYTD", @"13" }, 1557 { @"entries.0.positionData.returnYTD", @"13" },
1558 { @"", @"" }, // end of feed 1558 { @"", @"" }, // end of feed
1559 1559
1560 // 1560 //
1561 // Transaction feed 1561 // Transaction feed
1562 // 1562 //
1563 { @"GDataFeedFinanceTransaction", @"Tests/FeedFinanceTransactionTest1.xml" }, 1563 { @"GDataFeedFinanceTransaction", @"Tests/FeedFinanceTransactionTest1.xml" },
1564 1564
1565 { @"identifier", @"http://finance.google.com/finance/feeds/default/portfolios/1/positions/NASDAQ%3AAAPL/transactions" }, 1565 { @"identifier", @"http://finance.google.com/finance/feeds/default/portfolios/1/positions/NASDAQ%3AAAPL/transactions" },
1566 1566
1567 // Transaction entry 1567 // Transaction entry
1568 { @"entries.0.className", @"GDataEntryFinanceTransaction" }, 1568 { @"entries.0.className", @"GDataEntryFinanceTransaction" },
1569 1569
1570 { @"entries.0.transactionData.date.date.timeIntervalSince1970", @"1212364800" }, 1570 { @"entries.0.transactionData.date.date.timeIntervalSince1970", @"1212364800" },
1571 { @"entries.0.transactionData.shares", @"100" }, 1571 { @"entries.0.transactionData.shares", @"100" },
1572 { @"entries.0.transactionData.type", @"Buy" }, 1572 { @"entries.0.transactionData.type", @"Buy" },
1573 { @"entries.0.transactionData.notes", @"Astrologer&#39;s advice" }, 1573 { @"entries.0.transactionData.notes", @"Astrologer&#39;s advice" },
1574 { @"entries.0.transactionData.commission.moneyWithPrimaryCurrency.amount", @"13.12" }, 1574 { @"entries.0.transactionData.commission.moneyWithPrimaryCurrency.amount", @"13.12" },
1575 { @"entries.0.transactionData.commission.moneyWithPrimaryCurrency.currencyCode", @"USD" }, 1575 { @"entries.0.transactionData.commission.moneyWithPrimaryCurrency.currencyCode", @"USD" },
1576 { @"entries.0.transactionData.price.moneyWithPrimaryCurrency.amount", @"120" }, 1576 { @"entries.0.transactionData.price.moneyWithPrimaryCurrency.amount", @"120" },
1577 { @"entries.0.transactionData.price.moneyWithPrimaryCurrency.currencyCode", @"USD" }, 1577 { @"entries.0.transactionData.price.moneyWithPrimaryCurrency.currencyCode", @"USD" },
1578 { @"entries.0.transactionData.price.moneyWithSecondaryCurrency.amount", @"110" }, 1578 { @"entries.0.transactionData.price.moneyWithSecondaryCurrency.amount", @"110" },
1579 { @"entries.0.transactionData.price.moneyWithSecondaryCurrency.currencyCode", @"CAD" }, 1579 { @"entries.0.transactionData.price.moneyWithSecondaryCurrency.currencyCode", @"CAD" },
1580 { @"", @"" }, // end of feed 1580 { @"", @"" }, // end of feed
1581 1581
1582 { nil, nil } // end of test array 1582 { nil, nil } // end of test array
1583 }; 1583 };
1584 [self runTests:tests]; 1584 [self runTests:tests];
1585 }; 1585 };
1586 1586
1587 - (void)testYouTubeFeeds { 1587 - (void)testYouTubeFeeds {
1588 1588
1589 TestKeyPathValues tests[] = 1589 TestKeyPathValues tests[] =
1590 { 1590 {
1591 // 1591 //
1592 // user profile 1592 // user profile
1593 // 1593 //
1594 1594
1595 // note that the user profile "feed" is really an entry returned by the 1595 // note that the user profile "feed" is really an entry returned by the
1596 // YouTube server 1596 // YouTube server
1597 { @"GDataEntryYouTubeUserProfile/2.0", @"Tests/FeedYouTubeUserProfile1.xml" }, 1597 { @"GDataEntryYouTubeUserProfile/2.0", @"Tests/FeedYouTubeUserProfile1.xml" },
1598 1598
1599 // entry elements 1599 // entry elements
1600 { @"identifier", @"http://gdata.youtube.com/feeds/api/users/TestAccount" }, 1600 { @"identifier", @"http://gdata.youtube.com/feeds/api/users/TestAccount" },
1601 1601
1602 // user profile entry elements 1602 // user profile entry elements
1603 { @"className", @"GDataEntryYouTubeUserProfile" }, 1603 { @"className", @"GDataEntryYouTubeUserProfile" },
1604 1604
1605 { @"channelType", @"Standard" }, 1605 { @"channelType", @"Standard" },
1606 { @"statistics.lastWebAccess.RFC3339String", @"2008-01-30T11:38:20-08:00" }, 1606 { @"statistics.lastWebAccess.RFC3339String", @"2008-01-30T11:38:20-08:00" },
1607 { @"statistics.videoWatchCount", @"1" }, 1607 { @"statistics.videoWatchCount", @"1" },
1608 { @"statistics.viewCount", @"2" }, 1608 { @"statistics.viewCount", @"2" },
1609 { @"statistics.favoriteCount", @"7" }, 1609 { @"statistics.favoriteCount", @"7" },
1610 { @"statistics.totalUploadViews", @"37" }, 1610 { @"statistics.totalUploadViews", @"37" },
1611 1611
1612 { @"books", @"Booksz" }, 1612 { @"books", @"Booksz" },
1613 { @"aboutMe", @"Narf narf" }, 1613 { @"aboutMe", @"Narf narf" },
1614 { @"age", @"49" }, 1614 { @"age", @"49" },
1615 { @"thumbnail.URLString", @"http://i.ytimg.com/vi/Bkhnvn1PIHs/default.jpg" }, 1615 { @"thumbnail.URLString", @"http://i.ytimg.com/vi/Bkhnvn1PIHs/default.jpg" },
1616 { @"company", @"Apple, Google" }, 1616 { @"company", @"Apple, Google" },
1617 { @"gender", @"m" }, 1617 { @"gender", @"m" },
1618 { @"hobbies", @"Hobbiez, and more hobbiez" }, 1618 { @"hobbies", @"Hobbiez, and more hobbiez" },
1619 { @"hometown", @"Oakland, CA" }, 1619 { @"hometown", @"Oakland, CA" },
1620 { @"location", @"Seattle, WA, US" }, 1620 { @"location", @"Seattle, WA, US" },
1621 { @"movies", @"Moviez" }, 1621 { @"movies", @"Moviez" },
1622 { @"music", @"Musicz" }, 1622 { @"music", @"Musicz" },
1623 { @"occupation", @"worker, player" }, 1623 { @"occupation", @"worker, player" },
1624 { @"relationship", @"open" }, 1624 { @"relationship", @"open" },
1625 { @"school", @"Wildwood Elementary" }, 1625 { @"school", @"Wildwood Elementary" },
1626 { @"username", @"TestAccount" }, 1626 { @"username", @"TestAccount" },
1627 { @"firstName", @"Test" }, 1627 { @"firstName", @"Test" },
1628 { @"lastName", @"Account" }, 1628 { @"lastName", @"Account" },
1629 1629
1630 { @"feedLinks.@count", @"6" }, 1630 { @"feedLinks.@count", @"6" },
1631 1631
1632 { @"unknownAttributes.@count", @"0" }, 1632 { @"unknownAttributes.@count", @"0" },
1633 { @"unknownChildren.@count", @"0" }, 1633 { @"unknownChildren.@count", @"0" },
1634 1634
1635 { @"", @"" }, // end of feed 1635 { @"", @"" }, // end of feed
1636 1636
1637 // 1637 //
1638 // video feed 1638 // video feed
1639 // 1639 //
1640 { @"GDataFeedYouTubeVideo/2.0", @"Tests/FeedYouTubeVideo1.xml" }, 1640 { @"GDataFeedYouTubeVideo/2.0", @"Tests/FeedYouTubeVideo1.xml" },
1641 1641
1642 // video entry elements 1642 // video entry elements
1643 { @"entries.0.statistics.viewCount", @"177" }, 1643 { @"entries.0.statistics.viewCount", @"177" },
1644 { @"entries.0.comment.feedLink.href", @"http://gdata.youtube.com/feeds/api/videos/Dl643JFJWig/comments" }, 1644 { @"entries.0.comment.feedLink.href", @"http://gdata.youtube.com/feeds/api/videos/Dl643JFJWig/comments" },
1645 { @"entries.0.links.0.youTubeToken.stringValue", @"ZeeToken" }, 1645 { @"entries.0.links.0.youTubeToken.stringValue", @"ZeeToken" },
1646 { @"entries.0.isEmbeddable", @"0" }, 1646 { @"entries.0.isEmbeddable", @"0" },
1647 { @"entries.0.rating.numberOfLikes", @"100" }, 1647 { @"entries.0.rating.numberOfLikes", @"100" },
1648 { @"entries.0.rating.numberOfDislikes", @"25" }, 1648 { @"entries.0.rating.numberOfDislikes", @"25" },
1649 { @"entries.0.mediaGroup.duration", @"3266" }, 1649 { @"entries.0.mediaGroup.duration", @"3266" },
1650 { @"entries.0.mediaGroup.isPrivate", @"1" }, 1650 { @"entries.0.mediaGroup.isPrivate", @"1" },
1651 { @"entries.0.mediaGroup.mediaPlayers.0.URLString", @"http://www.youtube.com/watch?v=Dl643JFJWig" }, 1651 { @"entries.0.mediaGroup.mediaPlayers.0.URLString", @"http://www.youtube.com/watch?v=Dl643JFJWig" },
1652 { @"entries.0.mediaGroup.mediaRatings.0.stringValue", @"1" }, 1652 { @"entries.0.mediaGroup.mediaRatings.0.stringValue", @"1" },
1653 { @"entries.0.mediaGroup.mediaRatings.0.youTubeCountry", @"KR" }, 1653 { @"entries.0.mediaGroup.mediaRatings.0.youTubeCountry", @"KR" },
1654 { @"entries.0.mediaGroup.mediaThumbnails.0.height", @"97" }, 1654 { @"entries.0.mediaGroup.mediaThumbnails.0.height", @"97" },
1655 { @"entries.0.mediaGroup.mediaThumbnails.0.youTubeName", @"abc987" }, 1655 { @"entries.0.mediaGroup.mediaThumbnails.0.youTubeName", @"abc987" },
1656 { @"entries.0.publicationState.name", @"rejected" }, 1656 { @"entries.0.publicationState.name", @"rejected" },
1657 { @"entries.0.publicationState.reasonCode", @"32" }, 1657 { @"entries.0.publicationState.reasonCode", @"32" },
1658 { @"entries.0.publicationState.helpURLString", @"http://www.youtube.com/" }, 1658 { @"entries.0.publicationState.helpURLString", @"http://www.youtube.com/" },
1659 { @"entries.0.publicationState.errorDescription", @"incorrect format" }, 1659 { @"entries.0.publicationState.errorDescription", @"incorrect format" },
1660 { @"entries.0.isIncomplete", @"1" }, 1660 { @"entries.0.isIncomplete", @"1" },
1661 { @"entries.0.captionTracksLink.href", @"contains:GppRTi2JGQ8/captions" }, 1661 { @"entries.0.captionTracksLink.href", @"contains:GppRTi2JGQ8/captions" },
1662 { @"entries.0.videoResponsesLink.href", @"contains:Dl643JFJWig/responses" }, 1662 { @"entries.0.videoResponsesLink.href", @"contains:Dl643JFJWig/responses" },
1663 { @"entries.0.accessControls.0.action", kGDataYouTubeAccessControlVideoRespond }, 1663 { @"entries.0.accessControls.0.action", kGDataYouTubeAccessControlVideoRespond },
1664 { @"entries.0.accessControls.0.permission", kGDataYouTubeAccessControlPermissionDenied }, 1664 { @"entries.0.accessControls.0.permission", kGDataYouTubeAccessControlPermissionDenied },
1665 { @"entries.0.accessControls.1.action", kGDataYouTubeAccessControlComment }, 1665 { @"entries.0.accessControls.1.action", kGDataYouTubeAccessControlComment },
1666 { @"entries.0.accessControls.1.permission", kGDataYouTubeAccessControlPermissionAllowed }, 1666 { @"entries.0.accessControls.1.permission", kGDataYouTubeAccessControlPermissionAllowed },
1667 { @"entries.0.accessControls.1.type", @"group" }, 1667 { @"entries.0.accessControls.1.type", @"group" },
1668 { @"entries.0.accessControls.1.value", @"friends" }, 1668 { @"entries.0.accessControls.1.value", @"friends" },
1669 1669
1670 { @"unknownAttributes.@count", @"0" }, 1670 { @"unknownAttributes.@count", @"0" },
1671 { @"unknownChildren.@count", @"0" }, 1671 { @"unknownChildren.@count", @"0" },
1672 1672
1673 { @"", @"" }, // end of feed 1673 { @"", @"" }, // end of feed
1674 1674
1675 // 1675 //
1676 // playlist link feed, v2 1676 // playlist link feed, v2
1677 // 1677 //
1678 1678
1679 { @"GDataFeedYouTubePlaylistLink/2.0", @"Tests/FeedYouTubePlaylistLink1.xml" }, 1679 { @"GDataFeedYouTubePlaylistLink/2.0", @"Tests/FeedYouTubePlaylistLink1.xml" },
1680 { @"categories.0.term", kGDataCategoryYouTubePlaylistLink }, 1680 { @"categories.0.term", kGDataCategoryYouTubePlaylistLink },
1681 { @"totalResults", @"2" }, 1681 { @"totalResults", @"2" },
1682 { @"startIndex", @"1" }, 1682 { @"startIndex", @"1" },
1683 { @"itemsPerPage", @"22" }, 1683 { @"itemsPerPage", @"22" },
1684 1684
1685 { @"entries.0.className", @"GDataEntryYouTubePlaylistLink" }, 1685 { @"entries.0.className", @"GDataEntryYouTubePlaylistLink" },
1686 { @"entries.0.isPrivate", @"1" }, 1686 { @"entries.0.isPrivate", @"1" },
1687 { @"entries.0.categories.0.term", kGDataCategoryYouTubePlaylistLink }, 1687 { @"entries.0.categories.0.term", kGDataCategoryYouTubePlaylistLink },
1688 { @"entries.0.categories.1.scheme", kGDataSchemeYouTubeTag }, 1688 { @"entries.0.categories.1.scheme", kGDataSchemeYouTubeTag },
1689 { @"entries.0.categories.1.term", @"moreplaylisttags" }, 1689 { @"entries.0.categories.1.term", @"moreplaylisttags" },
1690 { @"entries.0.countHint", @"10" }, 1690 { @"entries.0.countHint", @"10" },
1691 1691
1692 { @"entries.1.categories.0.scheme", kGDataSchemeYouTubeTag }, 1692 { @"entries.1.categories.0.scheme", kGDataSchemeYouTubeTag },
1693 { @"entries.1.categories.0.term", @"PlaylistTags" }, 1693 { @"entries.1.categories.0.term", @"PlaylistTags" },
1694 { @"entries.1.categories.1.term", kGDataCategoryYouTubePlaylistLink }, 1694 { @"entries.1.categories.1.term", kGDataCategoryYouTubePlaylistLink },
1695 { @"entries.1.isPrivate", @"0" }, 1695 { @"entries.1.isPrivate", @"0" },
1696 { @"entries.1.mediaGroup.mediaThumbnails.0.URLString", @"http://i.ytimg.com/vi/L-PzCdlQ5aY/default.jpg" }, 1696 { @"entries.1.mediaGroup.mediaThumbnails.0.URLString", @"http://i.ytimg.com/vi/L-PzCdlQ5aY/default.jpg" },
1697 1697
1698 { @"unknownAttributes.@count", @"0" }, 1698 { @"unknownAttributes.@count", @"0" },
1699 { @"unknownChildren.@count", @"0" }, 1699 { @"unknownChildren.@count", @"0" },
1700 1700
1701 { @"", @"" }, // end of feed 1701 { @"", @"" }, // end of feed
1702 1702
1703 // 1703 //
1704 // playlist feed 1704 // playlist feed
1705 // 1705 //
1706 1706
1707 { @"GDataFeedYouTubePlaylist", @"Tests/FeedYouTubePlaylist1.xml" }, 1707 { @"GDataFeedYouTubePlaylist", @"Tests/FeedYouTubePlaylist1.xml" },
1708 1708
1709 { @"categories.0.term", kGDataCategoryYouTubePlaylist }, 1709 { @"categories.0.term", kGDataCategoryYouTubePlaylist },
1710 { @"categories.1.scheme", kGDataSchemeYouTubeTag }, 1710 { @"categories.1.scheme", kGDataSchemeYouTubeTag },
1711 { @"categories.1.term", @"PlaylistTags" }, 1711 { @"categories.1.term", @"PlaylistTags" },
1712 { @"totalResults", @"2" }, 1712 { @"totalResults", @"2" },
1713 { @"startIndex", @"1" }, 1713 { @"startIndex", @"1" },
1714 { @"itemsPerPage", @"25" }, 1714 { @"itemsPerPage", @"25" },
1715 1715
1716 { @"mediaGroup.mediaContents.0.URLString", @"http://www.youtube.com/ep.swf?id=BBA2B78EF2F08B10" }, 1716 { @"mediaGroup.mediaContents.0.URLString", @"http://www.youtube.com/ep.swf?id=BBA2B78EF2F08B10" },
1717 { @"mediaGroup.mediaContents.0.youTubeFormatNumber", @"5" }, 1717 { @"mediaGroup.mediaContents.0.youTubeFormatNumber", @"5" },
1718 1718
1719 { @"entries.0.className", @"GDataEntryYouTubePlaylist" }, 1719 { @"entries.0.className", @"GDataEntryYouTubePlaylist" },
1720 { @"entries.0.categories.0.term", kGDataCategoryYouTubePlaylist }, 1720 { @"entries.0.categories.0.term", kGDataCategoryYouTubePlaylist },
1721 { @"entries.0.mediaGroup.mediaTitle", @"The Graphing Calculator Story" }, 1721 { @"entries.0.mediaGroup.mediaTitle", @"The Graphing Calculator Story" },
1722 { @"entries.0.mediaGroup.mediaDescription", @"Google TechTalks" }, 1722 { @"entries.0.mediaGroup.mediaDescription", @"Google TechTalks" },
1723 { @"entries.0.mediaGroup.mediaKeywords.keywords.1", @"avitzur" }, 1723 { @"entries.0.mediaGroup.mediaKeywords.keywords.1", @"avitzur" },
1724 { @"entries.0.mediaGroup.duration", @"3266" }, 1724 { @"entries.0.mediaGroup.duration", @"3266" },
1725 { @"entries.0.statistics.viewCount", @"185" }, 1725 { @"entries.0.statistics.viewCount", @"185" },
1726 { @"entries.0.position", @"1" }, 1726 { @"entries.0.position", @"1" },
1727 1727
1728 { @"unknownAttributes.@count", @"0" }, 1728 { @"unknownAttributes.@count", @"0" },
1729 { @"unknownChildren.@count", @"0" }, 1729 { @"unknownChildren.@count", @"0" },
1730 1730
1731 { @"", @"" }, // end of feed 1731 { @"", @"" }, // end of feed
1732 1732
1733 // 1733 //
1734 // contacts feed 1734 // contacts feed
1735 // 1735 //
1736 { @"GDataFeedYouTubeFriend", @"Tests/FeedYouTubeContacts1.xml" }, 1736 { @"GDataFeedYouTubeFriend", @"Tests/FeedYouTubeContacts1.xml" },
1737 1737
1738 { @"categories.0.term", kGDataCategoryYouTubeFriend }, 1738 { @"categories.0.term", kGDataCategoryYouTubeFriend },
1739 1739
1740 { @"entries.0.className", @"GDataEntryYouTubeFriend" }, 1740 { @"entries.0.className", @"GDataEntryYouTubeFriend" },
1741 1741
1742 { @"entries.0.username", @"fredflintstone" }, 1742 { @"entries.0.username", @"fredflintstone" },
1743 { @"entries.0.status", @"accepted" }, 1743 { @"entries.0.status", @"accepted" },
1744 1744
1745 { @"entries.0.unknownAttributes.@count", @"0" }, 1745 { @"entries.0.unknownAttributes.@count", @"0" },
1746 { @"entries.0.unknownChildren.@count", @"0" }, 1746 { @"entries.0.unknownChildren.@count", @"0" },
1747 1747
1748 { @"", @"" }, // end of feed 1748 { @"", @"" }, // end of feed
1749 1749
1750 // 1750 //
1751 // caption track feed 1751 // caption track feed
1752 // 1752 //
1753 { @"GDataFeedYouTubeCaptionTrack", @"Tests/FeedYouTubeCaptionTracks1.xml" }, 1753 { @"GDataFeedYouTubeCaptionTrack", @"Tests/FeedYouTubeCaptionTracks1.xml" },
1754 1754
1755 { @"categories.0.term", kGDataCategoryYouTubeCaptionTrack }, 1755 { @"categories.0.term", kGDataCategoryYouTubeCaptionTrack },
1756 1756
1757 { @"entries.0.className", @"GDataEntryYouTubeCaptionTrack" }, 1757 { @"entries.0.className", @"GDataEntryYouTubeCaptionTrack" },
1758 { @"entries.0.title", @"captrack name" }, 1758 { @"entries.0.title", @"captrack name" },
1759 { @"entries.0.categories.0.term", kGDataCategoryYouTubeCaptionTrack }, 1759 { @"entries.0.categories.0.term", kGDataCategoryYouTubeCaptionTrack },
1760 1760
1761 { @"entries.0.publicationState.name", @"failed" }, 1761 { @"entries.0.publicationState.name", @"failed" },
1762 { @"entries.0.publicationState.reasonCode", @"invalidFormat" }, 1762 { @"entries.0.publicationState.reasonCode", @"invalidFormat" },
1763 { @"entries.0.derived", kGDataYouTubeDerivedSpeechRecogniion }, 1763 { @"entries.0.derived", kGDataYouTubeDerivedSpeechRecogniion },
1764 1764
1765 { @"entries.0.unknownAttributes.@count", @"0" }, 1765 { @"entries.0.unknownAttributes.@count", @"0" },
1766 { @"entries.0.unknownChildren.@count", @"0" }, 1766 { @"entries.0.unknownChildren.@count", @"0" },
1767 { @"entries.0.unknownChildren", nil }, 1767 { @"entries.0.unknownChildren", nil },
1768 1768
1769 { @"", @"" }, // end of feed 1769 { @"", @"" }, // end of feed
1770 1770
1771 // 1771 //
1772 // subscription feed 1772 // subscription feed
1773 // 1773 //
1774 { @"GDataFeedYouTubeSubscription/2.0", @"Tests/FeedYouTubeSubscriptions1.xml" }, 1774 { @"GDataFeedYouTubeSubscription/2.0", @"Tests/FeedYouTubeSubscriptions1.xml" },
1775 1775
1776 // feed elements 1776 // feed elements
1777 { @"identifier", @"http://gdata.youtube.com/feeds/api/users/testaccount/subscriptions?start-index=1&max-results=25" }, 1777 { @"identifier", @"http://gdata.youtube.com/feeds/api/users/testaccount/subscriptions?start-index=1&max-results=25" },
1778 { @"logo", @"http://www.youtube.com/img/pic_youtubelogo_123x63.gif" }, 1778 { @"logo", @"http://www.youtube.com/img/pic_youtubelogo_123x63.gif" },
1779 1779
1780 // subscription entry elements 1780 // subscription entry elements
1781 { @"entries.0.className", @"GDataEntryYouTubeSubscription" }, 1781 { @"entries.0.className", @"GDataEntryYouTubeSubscription" },
1782 1782
1783 { @"entries.0.subscriptionType", @"channel" }, 1783 { @"entries.0.subscriptionType", @"channel" },
1784 { @"entries.0.username", @"googletechtalks" }, 1784 { @"entries.0.username", @"googletechtalks" },
1785 { @"entries.0.content.sourceURI", @"http://gdata.youtube.com/feeds/api/users/googletechtalks/uploads" }, 1785 { @"entries.0.content.sourceURI", @"http://gdata.youtube.com/feeds/api/users/googletechtalks/uploads" },
1786 { @"entries.0.countHint", @"2" }, 1786 { @"entries.0.countHint", @"2" },
1787 { @"entries.0.relatedLink.href", @"http://gdata.youtube.com/feeds/api/users/TestAccount" }, 1787 { @"entries.0.relatedLink.href", @"http://gdata.youtube.com/feeds/api/users/TestAccount" },
1788 1788
1789 { @"entries.1.youTubeQueryString", @"cute dogs" }, 1789 { @"entries.1.youTubeQueryString", @"cute dogs" },
1790 { @"entries.1.playlistID", @"1sbd45" }, 1790 { @"entries.1.playlistID", @"1sbd45" },
1791 { @"entries.1.playlistTitle", @"Dog Playlist" }, 1791 { @"entries.1.playlistTitle", @"Dog Playlist" },
1792 1792
1793 { @"entries.0.unknownAttributes.@count", @"0" }, 1793 { @"entries.0.unknownAttributes.@count", @"0" },
1794 { @"entries.0.unknownChildren.@count", @"0" }, 1794 { @"entries.0.unknownChildren.@count", @"0" },
1795 1795
1796 { @"", @"" }, // end of feed 1796 { @"", @"" }, // end of feed
1797 1797
1798 // 1798 //
1799 // favorites feed 1799 // favorites feed
1800 // 1800 //
1801 { @"GDataFeedYouTubeFavorite/2.0", @"Tests/FeedYouTubeFavorites1.xml" }, 1801 { @"GDataFeedYouTubeFavorite/2.0", @"Tests/FeedYouTubeFavorites1.xml" },
1802 1802
1803 // feed elements 1803 // feed elements
1804 { @"ETag", @"W/\"CUACQX47eCp7ImA9WxdSEkg.\"" }, 1804 { @"ETag", @"W/\"CUACQX47eCp7ImA9WxdSEkg.\"" },
1805 { @"identifier", @"tag:youtube,2008:user:fredflintstone:favorites" }, 1805 { @"identifier", @"tag:youtube,2008:user:fredflintstone:favorites" },
1806 { @"logo", @"http://www.youtube.com/img/pic_youtubelogo_123x63.gif" }, 1806 { @"logo", @"http://www.youtube.com/img/pic_youtubelogo_123x63.gif" },
1807 1807
1808 // favorites entry elements 1808 // favorites entry elements
1809 { @"entries.0.className", @"GDataEntryYouTubeFavorite" }, 1809 { @"entries.0.className", @"GDataEntryYouTubeFavorite" },
1810 { @"entries.0.ETag", @"W/\"CUACQX47eCp7ImA9WxdSEkg.\"" }, 1810 { @"entries.0.ETag", @"W/\"CUACQX47eCp7ImA9WxdSEkg.\"" },
1811 { @"entries.0.identifier", @"tag:youtube,2008:favorite:vjVQa1PpcFP8fBdcAc_YTSRHgC1CE_ageg03_RO2EVk" }, 1811 { @"entries.0.identifier", @"tag:youtube,2008:favorite:vjVQa1PpcFP8fBdcAc_YTSRHgC1CE_ageg03_RO2EVk" },
1812 { @"entries.0.content.sourceURI", @"http://www.youtube.com/v/I-t-7lTw6mA&f=gdata_user_favorites" }, 1812 { @"entries.0.content.sourceURI", @"http://www.youtube.com/v/I-t-7lTw6mA&f=gdata_user_favorites" },
1813 1813
1814 { @"entries.0.location", @"mountain view, ca" }, 1814 { @"entries.0.location", @"mountain view, ca" },
1815 { @"entries.0.recordedDate", @"2008-03-04" }, 1815 { @"entries.0.recordedDate", @"2008-03-04" },
1816 1816
1817 { @"entries.0.mediaGroup.mediaTitle", @"Authors@Google: Michael Pollan" }, 1817 { @"entries.0.mediaGroup.mediaTitle", @"Authors@Google: Michael Pollan" },
1818 { @"entries.0.mediaGroup.mediaDescription", @"Michael Pollan visits Google" }, 1818 { @"entries.0.mediaGroup.mediaDescription", @"Michael Pollan visits Google" },
1819 { @"entries.0.mediaGroup.videoID", @"I-t-7lTw6mA" }, 1819 { @"entries.0.mediaGroup.videoID", @"I-t-7lTw6mA" },
1820 { @"entries.0.mediaGroup.aspectRatio", @"widescreen" }, 1820 { @"entries.0.mediaGroup.aspectRatio", @"widescreen" },
1821 { @"entries.0.mediaGroup.uploadedDate.date.timeIntervalSince1970", @"1204847352" }, 1821 { @"entries.0.mediaGroup.uploadedDate.date.timeIntervalSince1970", @"1204847352" },
1822 { @"entries.0.mediaGroup.mediaCredits.0.role", @"uploader" }, 1822 { @"entries.0.mediaGroup.mediaCredits.0.role", @"uploader" },
1823 { @"entries.0.mediaGroup.mediaCredits.0.scheme", @"urn:youtube" }, 1823 { @"entries.0.mediaGroup.mediaCredits.0.scheme", @"urn:youtube" },
1824 { @"entries.0.mediaGroup.mediaCredits.0.youTubeCreditType", @"partner" }, 1824 { @"entries.0.mediaGroup.mediaCredits.0.youTubeCreditType", @"partner" },
1825 { @"entries.0.mediaGroup.mediaContents.0.duration", @"3554" }, 1825 { @"entries.0.mediaGroup.mediaContents.0.duration", @"3554" },
1826 { @"entries.0.mediaGroup.mediaContents.0.expression", @"full" }, 1826 { @"entries.0.mediaGroup.mediaContents.0.expression", @"full" },
1827 { @"entries.0.mediaGroup.mediaContents.0.medium", @"video" }, 1827 { @"entries.0.mediaGroup.mediaContents.0.medium", @"video" },
1828 { @"entries.0.mediaGroup.mediaContents.0.type", @"application/x-shockwave-flash" }, 1828 { @"entries.0.mediaGroup.mediaContents.0.type", @"application/x-shockwave-flash" },
1829 { @"entries.0.mediaGroup.mediaContents.0.URLString", @"http://www.youtube.com/v/I-t-7lTw6mA&f=gdata_user_favorites" }, 1829 { @"entries.0.mediaGroup.mediaContents.0.URLString", @"http://www.youtube.com/v/I-t-7lTw6mA&f=gdata_user_favorites" },
1830 { @"entries.0.mediaGroup.mediaContents.0.youTubeFormatNumber", @"5" }, 1830 { @"entries.0.mediaGroup.mediaContents.0.youTubeFormatNumber", @"5" },
1831 { @"entries.0.mediaGroup.highQualityThumbnail.URLString", @"http://i.ytimg.com/vi/I-t-7lTw6mA/0.jpg" }, 1831 { @"entries.0.mediaGroup.highQualityThumbnail.URLString", @"http://i.ytimg.com/vi/I-t-7lTw6mA/0.jpg" },
1832 { @"entries.0.mediaGroup.mediaContentWithFormatNumber1.type", @"video/3gpp" }, 1832 { @"entries.0.mediaGroup.mediaContentWithFormatNumber1.type", @"video/3gpp" },
1833 1833
1834 { @"entries.0.unknownAttributes.@count", @"0" }, 1834 { @"entries.0.unknownAttributes.@count", @"0" },
1835 { @"entries.0.unknownChildren.@count", @"0" }, 1835 { @"entries.0.unknownChildren.@count", @"0" },
1836 1836
1837 { @"", @"" }, // end of feed 1837 { @"", @"" }, // end of feed
1838 1838
1839 // 1839 //
1840 // user events feed 1840 // user events feed
1841 // 1841 //
1842 { @"GDataFeedYouTubeUserEvent/2.0", @"Tests/FeedYouTubeUserEventTest1.xml" }, 1842 { @"GDataFeedYouTubeUserEvent/2.0", @"Tests/FeedYouTubeUserEventTest1.xml" },
1843 1843
1844 // feed elements 1844 // feed elements
1845 { @"ETag", @"W/\"AkUBRH47eCp7ImA9WxVWFkU.\"" }, 1845 { @"ETag", @"W/\"AkUBRH47eCp7ImA9WxVWFkU.\"" },
1846 { @"identifier", @"tag:youtube.com,2008:events" }, 1846 { @"identifier", @"tag:youtube.com,2008:events" },
1847 1847
1848 // entry elements 1848 // entry elements
1849 { @"entries.0.className", @"GDataEntryYouTubeUserEvent" }, 1849 { @"entries.0.className", @"GDataEntryYouTubeUserEvent" },
1850 { @"entries.0.kindCategory.term", kGDataCategoryYouTubeUserEvent }, 1850 { @"entries.0.kindCategory.term", kGDataCategoryYouTubeUserEvent },
1851 { @"entries.0.ETag", @"W/\"AkUBRH47eCp7ImA9WxVWFkU.\"" }, 1851 { @"entries.0.ETag", @"W/\"AkUBRH47eCp7ImA9WxVWFkU.\"" },
1852 { @"entries.0.identifier", @"tag:youtube.com,2008:event:Z3JlZ3JvYmJpbnM3MTIzNTY4ODI1NUJlbGFuYXI%3D" }, 1852 { @"entries.0.identifier", @"tag:youtube.com,2008:event:Z3JlZ3JvYmJpbnM3MTIzNTY4ODI1NUJlbGFuYXI%3D" },
1853 { @"entries.0.username", @"wilmaflintstone" }, 1853 { @"entries.0.username", @"wilmaflintstone" },
1854 { @"entries.0.userEventType", kGDataYouTubeUserEventFriendAdded }, 1854 { @"entries.0.userEventType", kGDataYouTubeUserEventFriendAdded },
1855 { @"entries.0.unknownAttributes.@count", @"0" }, 1855 { @"entries.0.unknownAttributes.@count", @"0" },
1856 { @"entries.0.unknownChildren.@count", @"0" }, 1856 { @"entries.0.unknownChildren.@count", @"0" },
1857 1857
1858 { @"entries.1.userEventType", kGDataYouTubeUserEventVideoFavorited }, 1858 { @"entries.1.userEventType", kGDataYouTubeUserEventVideoFavorited },
1859 { @"entries.1.videoLink.href", @"http://gdata.youtube.com/feeds/api/videos/cxFfUsDgnaU" }, 1859 { @"entries.1.videoLink.href", @"http://gdata.youtube.com/feeds/api/videos/cxFfUsDgnaU" },
1860 { @"entries.1.videoID", @"cxFfUsDgnaU" }, 1860 { @"entries.1.videoID", @"cxFfUsDgnaU" },
1861 { @"entries.1.unknownAttributes.@count", @"0" }, 1861 { @"entries.1.unknownAttributes.@count", @"0" },
1862 { @"entries.1.unknownChildren.@count", @"0" }, 1862 { @"entries.1.unknownChildren.@count", @"0" },
1863 1863
1864 { @"", @"" }, // end of feed 1864 { @"", @"" }, // end of feed
1865 1865
1866 { nil, nil } // end of test array 1866 { nil, nil } // end of test array
1867 }; 1867 };
1868 [self runTests:tests]; 1868 [self runTests:tests];
1869 }; 1869 };
1870 1870
1871 - (void)testMapsFeed { 1871 - (void)testMapsFeed {
1872 1872
1873 TestKeyPathValues tests[] = 1873 TestKeyPathValues tests[] =
1874 { 1874 {
1875 // 1875 //
1876 // Map Feature Feed 1876 // Map Feature Feed
1877 // 1877 //
1878 1878
1879 { @"GDataFeedMapFeature/2.0", @"Tests/FeedMapFeaturesTest1.xml" }, 1879 { @"GDataFeedMapFeature/2.0", @"Tests/FeedMapFeaturesTest1.xml" },
1880 1880
1881 // feature feed elements 1881 // feature feed elements
1882 { @"title", @"Kirkland Office" }, 1882 { @"title", @"Kirkland Office" },
1883 { @"identifier", @"http://maps.google.com/maps/feeds/features/2063624404192119555/0046a899354a8585d4d" }, 1883 { @"identifier", @"http://maps.google.com/maps/feeds/features/2063624404192119555/0046a899354a8585d4d" },
1884 1884
1885 { @"unknownAttributes.@count", @"0" }, 1885 { @"unknownAttributes.@count", @"0" },
1886 { @"unknownChildren.@count", @"0" }, 1886 { @"unknownChildren.@count", @"0" },
1887 1887
1888 // feature entry elements 1888 // feature entry elements
1889 { @"entries.0.editedDate.RFC3339String", @"2009-05-23T02:10:51Z" }, 1889 { @"entries.0.editedDate.RFC3339String", @"2009-05-23T02:10:51Z" },
1890 { @"entries.0.categories.0.term", kGDataCategoryMapFeature }, 1890 { @"entries.0.categories.0.term", kGDataCategoryMapFeature },
1891 1891
1892 { @"entries.0.KMLValues.@count", @"1" }, 1892 { @"entries.0.KMLValues.@count", @"1" },
1893 { @"entries.0.KMLValues.0.name", @"Placemark" }, 1893 { @"entries.0.KMLValues.0.name", @"Placemark" },
1894 { @"entries.0.viewLink.href", @"contains:view/00047730f33bb0097204c" }, 1894 { @"entries.0.viewLink.href", @"contains:view/00047730f33bb0097204c" },
1895 1895
1896 { @"entries.0.postalAddress.city", @"Anytown" }, 1896 { @"entries.0.postalAddress.city", @"Anytown" },
1897 1897
1898 { @"entries.0.customProperties.@count", @"2" }, 1898 { @"entries.0.customProperties.@count", @"2" },
1899 { @"entries.0.customProperties.0.name", @"distance" }, 1899 { @"entries.0.customProperties.0.name", @"distance" },
1900 { @"entries.0.customProperties.0.unit", @"meters" }, 1900 { @"entries.0.customProperties.0.unit", @"meters" },
1901 { @"entries.0.customProperties.0.value", @"36" }, 1901 { @"entries.0.customProperties.0.value", @"36" },
1902 { @"entries.0.customPropertyWithHeightName.value", @"10.2" }, 1902 { @"entries.0.customPropertyWithHeightName.value", @"10.2" },
1903 1903
1904 { @"entries.0.unknownAttributes.@count", @"0" }, 1904 { @"entries.0.unknownAttributes.@count", @"0" },
1905 { @"entries.0.unknownChildren.@count", @"0" }, 1905 { @"entries.0.unknownChildren.@count", @"0" },
1906 1906
1907 { @"", @"" }, // end of feed 1907 { @"", @"" }, // end of feed
1908 1908
1909 { nil, nil } // end of test array 1909 { nil, nil } // end of test array
1910 }; 1910 };
1911 1911
1912 [self runTests:tests]; 1912 [self runTests:tests];
1913 } 1913 }
1914 1914
1915 - (void)testBlogFeeds { 1915 - (void)testBlogFeeds {
1916 1916
1917 TestKeyPathValues tests[] = 1917 TestKeyPathValues tests[] =
1918 { 1918 {
1919 // 1919 //
1920 // Blog feed 1920 // Blog feed
1921 // 1921 //
1922 1922
1923 { @"GDataFeedBlog/2.0", @"Tests/FeedBlogTest1.xml" }, 1923 { @"GDataFeedBlog/2.0", @"Tests/FeedBlogTest1.xml" },
1924 1924
1925 // feed elements 1925 // feed elements
1926 { @"title", @"TestAccount's Blogs" }, 1926 { @"title", @"TestAccount's Blogs" },
1927 1927
1928 { @"unknownAttributes.@count", @"0" }, 1928 { @"unknownAttributes.@count", @"0" },
1929 { @"unknownChildren.@count", @"0" }, 1929 { @"unknownChildren.@count", @"0" },
1930 1930
1931 // entry elements - no extensions, so just test convenience accessors 1931 // entry elements - no extensions, so just test convenience accessors
1932 { @"entries.0.templateLink.href", @"http://www.blogger.com/feeds/145278007186576769/template" }, 1932 { @"entries.0.templateLink.href", @"http://www.blogger.com/feeds/145278007186576769/template" },
1933 { @"entries.0.settingsLink.href", @"http://www.blogger.com/feeds/145278007186576769/settings" }, 1933 { @"entries.0.settingsLink.href", @"http://www.blogger.com/feeds/145278007186576769/settings" },
1934 1934
1935 { @"entries.0.unknownAttributes.@count", @"0" }, 1935 { @"entries.0.unknownAttributes.@count", @"0" },
1936 { @"entries.0.unknownChildren.@count", @"0" }, 1936 { @"entries.0.unknownChildren.@count", @"0" },
1937 1937
1938 { @"", @"" }, // end of feed 1938 { @"", @"" }, // end of feed
1939 1939
1940 // 1940 //
1941 // Blog post feed 1941 // Blog post feed
1942 // 1942 //
1943 1943
1944 { @"GDataFeedBlogPost/2.0", @"Tests/FeedBlogPostTest1.xml" }, 1944 { @"GDataFeedBlogPost/2.0", @"Tests/FeedBlogPostTest1.xml" },
1945 1945
1946 // feed elements 1946 // feed elements
1947 { @"title", @"Test Posts" }, 1947 { @"title", @"Test Posts" },
1948 1948
1949 { @"unknownAttributes.@count", @"0" }, 1949 { @"unknownAttributes.@count", @"0" },
1950 { @"unknownChildren.@count", @"0" }, 1950 { @"unknownChildren.@count", @"0" },
1951 1951
1952 // entry elements 1952 // entry elements
1953 { @"entries.0.atomPubControl.isDraft", @"1" }, 1953 { @"entries.0.atomPubControl.isDraft", @"1" },
1954 { @"entries.0.identifier", @"tag:blogger.com,1999:blog-1452780071865767697.post-6317479243618470383" }, 1954 { @"entries.0.identifier", @"tag:blogger.com,1999:blog-1452780071865767697.post-6317479243618470383" },
1955 { @"entries.0.total", @"3" }, 1955 { @"entries.0.total", @"3" },
1956 { @"entries.0.thumbnail.URLString", @"contains:Hippo.jpg" }, 1956 { @"entries.0.thumbnail.URLString", @"contains:Hippo.jpg" },
1957 { @"entries.0.repliesHTMLLink.href", @"https://www.blogger.com/comment.g?blogID=1452780071865767697&postID=6317479243618470383" }, 1957 { @"entries.0.repliesHTMLLink.href", @"https://www.blogger.com/comment.g?blogID=1452780071865767697&postID=6317479243618470383" },
1958 { @"entries.0.repliesAtomLink.href", @"http://testaccount.blogspot.com/feeds/6317479243618470383/comments/default" }, 1958 { @"entries.0.repliesAtomLink.href", @"http://testaccount.blogspot.com/feeds/6317479243618470383/comments/default" },
1959 { @"entries.0.enclosureLink.href", @"http://example.net/file.txt" }, 1959 { @"entries.0.enclosureLink.href", @"http://example.net/file.txt" },
1960 1960
1961 { @"entries.0.unknownAttributes.@count", @"0" }, 1961 { @"entries.0.unknownAttributes.@count", @"0" },
1962 { @"entries.0.unknownChildren.@count", @"0" }, 1962 { @"entries.0.unknownChildren.@count", @"0" },
1963 1963
1964 { @"", @"" }, // end of feed 1964 { @"", @"" }, // end of feed
1965 1965
1966 // 1966 //
1967 // Blog comments feed 1967 // Blog comments feed
1968 // 1968 //
1969 1969
1970 { @"GDataFeedBlogComment/2.0", @"Tests/FeedBlogCommentsTest1.xml" }, 1970 { @"GDataFeedBlogComment/2.0", @"Tests/FeedBlogCommentsTest1.xml" },
1971 1971
1972 // feed elements 1972 // feed elements
1973 { @"title", @"Comments on Post" }, 1973 { @"title", @"Comments on Post" },
1974 1974
1975 { @"unknownAttributes.@count", @"0" }, 1975 { @"unknownAttributes.@count", @"0" },
1976 { @"unknownChildren.@count", @"0" }, 1976 { @"unknownChildren.@count", @"0" },
1977 1977
1978 // entry elements 1978 // entry elements
1979 { @"entries.0.inReplyTo.href", @"http://testaccount.blogspot.com/2009/06/post-created-2009-06-02-161600-0700.html" }, 1979 { @"entries.0.inReplyTo.href", @"http://testaccount.blogspot.com/2009/06/post-created-2009-06-02-161600-0700.html" },
1980 { @"entries.0.inReplyTo.ref", @"tag:blogger.com,1999:blog-1452780071865767697.post-1015986829942539734" }, 1980 { @"entries.0.inReplyTo.ref", @"tag:blogger.com,1999:blog-1452780071865767697.post-1015986829942539734" },
1981 { @"entries.0.inReplyTo.source", @"http://testaccount.blogspot.com/feeds/posts/default/1015986829942539734" }, 1981 { @"entries.0.inReplyTo.source", @"http://testaccount.blogspot.com/feeds/posts/default/1015986829942539734" },
1982 { @"entries.0.inReplyTo.type", kGDataLinkTypeHTML }, 1982 { @"entries.0.inReplyTo.type", kGDataLinkTypeHTML },
1983 1983
1984 { @"entries.0.unknownAttributes.@count", @"0" }, 1984 { @"entries.0.unknownAttributes.@count", @"0" },
1985 { @"entries.0.unknownChildren.@count", @"0" }, 1985 { @"entries.0.unknownChildren.@count", @"0" },
1986 1986
1987 { @"", @"" }, // end of feed 1987 { @"", @"" }, // end of feed
1988 1988
1989 { nil, nil } // end of test array 1989 { nil, nil } // end of test array
1990 }; 1990 };
1991 1991
1992 [self runTests:tests]; 1992 [self runTests:tests];
1993 } 1993 }
1994 1994
1995 - (void)testACLFeed { 1995 - (void)testACLFeed {
1996 1996
1997 TestKeyPathValues tests[] = 1997 TestKeyPathValues tests[] =
1998 { 1998 {
1999 // 1999 //
2000 // ACL Feed 2000 // ACL Feed
2001 // 2001 //
2002 { @"GDataFeedACL", @"Tests/FeedACLTest1.xml" }, 2002 { @"GDataFeedACL", @"Tests/FeedACLTest1.xml" },
2003 2003
2004 // GDataFeedACL paths 2004 // GDataFeedACL paths
2005 { @"links.0.href", @"http://www.google.com/calendar/feeds/test%40gmail.com/private/full" }, 2005 { @"links.0.href", @"http://www.google.com/calendar/feeds/test%40gmail.com/private/full" },
2006 { @"links.0.rel", kGDataLinkRelControlledObject }, 2006 { @"links.0.rel", kGDataLinkRelControlledObject },
2007 { @"categories.0.term", kGDataCategoryACL }, 2007 { @"categories.0.term", kGDataCategoryACL },
2008 { @"categories.0.scheme", kGDataCategoryScheme }, 2008 { @"categories.0.scheme", kGDataCategoryScheme },
2009 2009
2010 { @"unknownAttributes.@count", @"0" }, 2010 { @"unknownAttributes.@count", @"0" },
2011 { @"unknownChildren.@count", @"0" }, 2011 { @"unknownChildren.@count", @"0" },
2012 2012
2013 // GDataEntryACL paths (scope and role are the main elements) 2013 // GDataEntryACL paths (scope and role are the main elements)
2014 { @"entries.0.categories.0.term", kGDataCategoryACL }, 2014 { @"entries.0.categories.0.term", kGDataCategoryACL },
2015 { @"entries.0.identifier", @"http://www.google.com/calendar/feeds/test%40gmail.com/acl/full/user%3Atest%40gmail.com" }, 2015 { @"entries.0.identifier", @"http://www.google.com/calendar/feeds/test%40gmail.com/acl/full/user%3Atest%40gmail.com" },
2016 { @"entries.0.content", @"" }, 2016 { @"entries.0.content", @"" },
2017 { @"entries.0.links.1.rel", @"edit" }, 2017 { @"entries.0.links.1.rel", @"edit" },
2018 { @"entries.0.scope.type", @"user" }, 2018 { @"entries.0.scope.type", @"user" },
2019 { @"entries.0.scope.value", @"test@example.com" }, 2019 { @"entries.0.scope.value", @"test@example.com" },
2020 { @"entries.0.role.value", @"http://schemas.google.com/gCal/2005#owner" }, 2020 { @"entries.0.role.value", @"http://schemas.google.com/gCal/2005#owner" },
2021 2021
2022 { @"entries.0.unknownAttributes.@count", @"0" }, 2022 { @"entries.0.unknownAttributes.@count", @"0" },
2023 { @"entries.0.unknownChildren.@count", @"0" }, 2023 { @"entries.0.unknownChildren.@count", @"0" },
2024 2024
2025 { @"entries.1.scope.type", @"user" }, 2025 { @"entries.1.scope.type", @"user" },
2026 { @"entries.1.scope.name", @"wilma" }, 2026 { @"entries.1.scope.name", @"wilma" },
2027 { @"entries.1.keyedRole.key", @"A123B" }, 2027 { @"entries.1.keyedRole.key", @"A123B" },
2028 { @"entries.1.keyedRole.role.value", @"reader" }, 2028 { @"entries.1.keyedRole.role.value", @"reader" },
2029 { @"entries.1.keyedRole.additionalRoles.1.value", @"pigeon" }, 2029 { @"entries.1.keyedRole.additionalRoles.1.value", @"pigeon" },
2030 2030
2031 { @"entries.1.unknownAttributes.@count", @"0" }, 2031 { @"entries.1.unknownAttributes.@count", @"0" },
2032 { @"entries.1.unknownChildren.@count", @"0" }, 2032 { @"entries.1.unknownChildren.@count", @"0" },
2033 2033
2034 { @"", @"" }, // end of feed 2034 { @"", @"" }, // end of feed
2035 2035
2036 { nil, nil } // end of test array 2036 { nil, nil } // end of test array
2037 }; 2037 };
2038 2038
2039 [self runTests:tests]; 2039 [self runTests:tests];
2040 } 2040 }
2041 2041
2042 - (void)testServiceDocuments { 2042 - (void)testServiceDocuments {
2043 2043
2044 TestKeyPathValues tests[] = 2044 TestKeyPathValues tests[] =
2045 { 2045 {
2046 // 2046 //
2047 // service document 2047 // service document
2048 // 2048 //
2049 { @"GDataAtomServiceDocument", @"Tests/FeedServiceDocTest2.xml" }, 2049 { @"GDataAtomServiceDocument", @"Tests/FeedServiceDocTest2.xml" },
2050 2050
2051 // GDataAtomServiceDocument paths 2051 // GDataAtomServiceDocument paths
2052 { @"namespaces.app", kGDataNamespaceAtomPub }, 2052 { @"namespaces.app", kGDataNamespaceAtomPub },
2053 { @"workspaces.@count", @"2" }, 2053 { @"workspaces.@count", @"2" },
2054 2054
2055 // workspace paths 2055 // workspace paths
2056 { @"workspaces.0.title", @"fredflintstone workspace" }, 2056 { @"workspaces.0.title", @"fredflintstone workspace" },
2057 { @"workspaces.0.collections.@count", @"1" }, 2057 { @"workspaces.0.collections.@count", @"1" },
2058 { @"workspaces.0.collections.0.title", @"filetypes" }, 2058 { @"workspaces.0.collections.0.title", @"filetypes" },
2059 { @"workspaces.0.collections.0.serviceAcceptStrings.@count", @"5" }, 2059 { @"workspaces.0.collections.0.serviceAcceptStrings.@count", @"5" },
2060 { @"workspaces.0.collections.0.serviceAcceptStrings.0", @"image/png" }, 2060 { @"workspaces.0.collections.0.serviceAcceptStrings.0", @"image/png" },
2061 { @"workspaces.0.collections.0.serviceAcceptStrings.1", @"image/jpeg" }, 2061 { @"workspaces.0.collections.0.serviceAcceptStrings.1", @"image/jpeg" },
2062 2062
2063 { @"workspaces.1.title", @"Second Workspace" }, 2063 { @"workspaces.1.title", @"Second Workspace" },
2064 { @"workspaces.1.collections.@count", @"1" }, 2064 { @"workspaces.1.collections.@count", @"1" },
2065 { @"workspaces.1.collections.0.href", @"http://example.org/hrefcollection" }, 2065 { @"workspaces.1.collections.0.href", @"http://example.org/hrefcollection" },
2066 { @"workspaces.1.collections.0.title", @"Remaindered Links" }, 2066 { @"workspaces.1.collections.0.title", @"Remaindered Links" },
2067 { @"workspaces.1.collections.0.serviceAcceptStrings.@count", @"1" }, 2067 { @"workspaces.1.collections.0.serviceAcceptStrings.@count", @"1" },
2068 { @"workspaces.1.collections.0.serviceAcceptStrings.0", @"entry" }, 2068 { @"workspaces.1.collections.0.serviceAcceptStrings.0", @"entry" },
2069 { @"workspaces.1.collections.0.categoryGroup.isFixed", @"1" }, 2069 { @"workspaces.1.collections.0.categoryGroup.isFixed", @"1" },
2070 { @"workspaces.1.collections.0.categoryGroup.scheme", @"bogusscheme" }, 2070 { @"workspaces.1.collections.0.categoryGroup.scheme", @"bogusscheme" },
2071 { @"workspaces.1.collections.0.categoryGroup.href", @"bogushref" }, 2071 { @"workspaces.1.collections.0.categoryGroup.href", @"bogushref" },
2072 { @"workspaces.1.collections.0.categoryGroup.categories.@count", @"2" }, 2072 { @"workspaces.1.collections.0.categoryGroup.categories.@count", @"2" },
2073 { @"workspaces.1.collections.0.categoryGroup.categories.1.term", @"serious" }, 2073 { @"workspaces.1.collections.0.categoryGroup.categories.1.term", @"serious" },
2074 2074
2075 { @"unknownAttributes.@count", @"0" }, 2075 { @"unknownAttributes.@count", @"0" },
2076 { @"unknownChildren.@count", @"0" }, 2076 { @"unknownChildren.@count", @"0" },
2077 2077
2078 { @"", @"" }, // end of feed 2078 { @"", @"" }, // end of feed
2079 2079
2080 { nil, nil } // end of test array 2080 { nil, nil } // end of test array
2081 }; 2081 };
2082 2082
2083 [self runTests:tests]; 2083 [self runTests:tests];
2084 } 2084 }
2085 2085
2086 - (void)testDetachedEntries { 2086 - (void)testDetachedEntries {
2087 2087
2088 // get a feed, retain the entries, release the feed, then verify that the 2088 // get a feed, retain the entries, release the feed, then verify that the
2089 // entries are usable with the feed itself gone 2089 // entries are usable with the feed itself gone
2090 2090
2091 NSData *data = [NSData dataWithContentsOfFile:@"Tests/FeedCalendarEventTest1.xml"]; 2091 NSData *data = [NSData dataWithContentsOfFile:@"Tests/FeedCalendarEventTest1.xml"];
2092 STAssertNotNil(data, @"Cannot read feed for detach test"); 2092 STAssertNotNil(data, @"Cannot read feed for detach test");
2093 2093
2094 // create the feed object 2094 // create the feed object
2095 GDataFeedBase *feed = [[GDataFeedCalendarEvent alloc] initWithData:data 2095 GDataFeedBase *feed = [[GDataFeedCalendarEvent alloc] initWithData:data
2096 serviceVersion:@"2.1" 2096 serviceVersion:@"2.1"
2097 shouldIgnoreUnknowns:NO]; 2097 shouldIgnoreUnknowns:NO];
2098 STAssertNotNil(feed, @"Cannot make detaching feed"); 2098 STAssertNotNil(feed, @"Cannot make detaching feed");
2099 2099
2100 NSArray *entries = [[[feed entries] retain] autorelease]; 2100 NSArray *entries = [[[feed entries] retain] autorelease];
2101 STAssertTrue([entries count] > 0, @"Feed lacks entries to detach"); 2101 STAssertTrue([entries count] > 0, @"Feed lacks entries to detach");
2102 2102
2103 [feed release]; 2103 [feed release];
2104 2104
2105 GDataEntryBase *firstEntry = [entries objectAtIndex:0]; 2105 GDataEntryBase *firstEntry = [entries objectAtIndex:0];
2106 NSString *title = [[firstEntry title] stringValue]; 2106 NSString *title = [[firstEntry title] stringValue];
2107 STAssertEqualObjects(title, @"3 days", @"testing an element in a detached entry"); 2107 STAssertEqualObjects(title, @"3 days", @"testing an element in a detached entry");
2108 2108
2109 NSString *titleType = [[firstEntry title] type]; 2109 NSString *titleType = [[firstEntry title] type];
2110 STAssertEqualObjects(titleType, @"text", @"testing an attribute in a detached entry"); 2110 STAssertEqualObjects(titleType, @"text", @"testing an attribute in a detached entry");
2111 } 2111 }
2112 2112
2113 @end 2113 @end
2114 2114
2115 /////////////////////////////////////////////////////////////////////////// 2115 ///////////////////////////////////////////////////////////////////////////
2116 // 2116 //
2117 // categories to test helper methods that require arguments 2117 // categories to test helper methods that require arguments
2118 // 2118 //
2119 2119
2120 // 2120 //
2121 // YouTube 2121 // YouTube
2122 // 2122 //
2123 2123
2124 @interface GDataYouTubeMediaGroup (TestHelperMethods) 2124 @interface GDataYouTubeMediaGroup (TestHelperMethods)
2125 @end 2125 @end
2126 2126
2127 @implementation GDataYouTubeMediaGroup (TestHelperMethods) 2127 @implementation GDataYouTubeMediaGroup (TestHelperMethods)
2128 - (GDataMediaContent *)mediaContentWithFormatNumber1 { 2128 - (GDataMediaContent *)mediaContentWithFormatNumber1 {
2129 return [self mediaContentWithFormatNumber:kGDataYouTubeMediaContentFormatRTSPStream]; 2129 return [self mediaContentWithFormatNumber:kGDataYouTubeMediaContentFormatRTSPStream];
2130 } 2130 }
2131 @end 2131 @end
2132 2132
2133 // 2133 //
2134 // analytics 2134 // analytics
2135 // 2135 //
2136 2136
2137 @interface GDataAnalyticsDataSource (TestHelperMethods) 2137 @interface GDataAnalyticsDataSource (TestHelperMethods)
2138 - (GDataAnalyticsProperty *)analyticsPropertyWithNameAccountName; 2138 - (GDataAnalyticsProperty *)analyticsPropertyWithNameAccountName;
2139 @end 2139 @end
2140 2140
2141 @implementation GDataAnalyticsDataSource (TestHelperMethods) 2141 @implementation GDataAnalyticsDataSource (TestHelperMethods)
2142 - (GDataAnalyticsProperty *)analyticsPropertyWithNameAccountName { 2142 - (GDataAnalyticsProperty *)analyticsPropertyWithNameAccountName {
2143 return [self analyticsPropertyWithName:@"ga:accountName"]; 2143 return [self analyticsPropertyWithName:@"ga:accountName"];
2144 } 2144 }
2145 @end 2145 @end
2146 2146
2147 2147
2148 @interface GDataEntryAnalyticsData (TestHelperMethods) 2148 @interface GDataEntryAnalyticsData (TestHelperMethods)
2149 - (GDataAnalyticsDimension *)dimensionWithNameCountry; 2149 - (GDataAnalyticsDimension *)dimensionWithNameCountry;
2150 - (GDataAnalyticsMetric *)metricWithNamePageviews; 2150 - (GDataAnalyticsMetric *)metricWithNamePageviews;
2151 @end 2151 @end
2152 2152
2153 @implementation GDataEntryAnalyticsData (TestHelperMethods) 2153 @implementation GDataEntryAnalyticsData (TestHelperMethods)
2154 - (GDataAnalyticsDimension *)dimensionWithNameCountry { 2154 - (GDataAnalyticsDimension *)dimensionWithNameCountry {
2155 return [self dimensionWithName:@"ga:country"]; 2155 return [self dimensionWithName:@"ga:country"];
2156 } 2156 }
2157 2157
2158 - (GDataAnalyticsMetric *)metricWithNamePageviews { 2158 - (GDataAnalyticsMetric *)metricWithNamePageviews {
2159 return [self metricWithName:@"ga:pageviews"]; 2159 return [self metricWithName:@"ga:pageviews"];
2160 } 2160 }
2161 @end 2161 @end
2162 2162
2163 // 2163 //
2164 // maps 2164 // maps
2165 // 2165 //
2166 2166
2167 @interface GDataEntryMapFeature (TestHelperMethods) 2167 @interface GDataEntryMapFeature (TestHelperMethods)
2168 - (GDataCustomProperty *)customPropertyWithHeightName; 2168 - (GDataCustomProperty *)customPropertyWithHeightName;
2169 @end 2169 @end
2170 2170
2171 @implementation GDataEntryMapFeature (TestHelperMethods) 2171 @implementation GDataEntryMapFeature (TestHelperMethods)
2172 - (GDataCustomProperty *)customPropertyWithHeightName { 2172 - (GDataCustomProperty *)customPropertyWithHeightName {
2173 return [self customPropertyWithName:@"height"]; 2173 return [self customPropertyWithName:@"height"];
2174 } 2174 }
2175 @end 2175 @end
2176 2176
2177 // 2177 //
2178 // DocList User Metadata 2178 // DocList User Metadata
2179 // 2179 //
2180 2180
2181 @interface GDataEntryDocListMetadata (TestHelperMethods) 2181 @interface GDataEntryDocListMetadata (TestHelperMethods)
2182 - (GDataDocMaxUploadSize *)maxUploadSizeForKindPDF; 2182 - (GDataDocMaxUploadSize *)maxUploadSizeForKindPDF;
2183 - (GDataDocFeature *)featureForNameUploadAny; 2183 - (GDataDocFeature *)featureForNameUploadAny;
2184 - (GDataDocFeature *)featureForNameUploadNone; 2184 - (GDataDocFeature *)featureForNameUploadNone;
2185 @end 2185 @end
2186 2186
2187 @implementation GDataEntryDocListMetadata (TestHelperMethods) 2187 @implementation GDataEntryDocListMetadata (TestHelperMethods)
2188 - (GDataDocMaxUploadSize *)maxUploadSizeForKindPDF { 2188 - (GDataDocMaxUploadSize *)maxUploadSizeForKindPDF {
2189 return [self maxUploadSizeForKind:@"pdf"]; 2189 return [self maxUploadSizeForKind:@"pdf"];
2190 } 2190 }
2191 2191
2192 - (GDataDocFeature *)featureForNameUploadAny { 2192 - (GDataDocFeature *)featureForNameUploadAny {
2193 return [self featureForName:@"upload_any"]; 2193 return [self featureForName:@"upload_any"];
2194 } 2194 }
2195 2195
2196 - (GDataDocFeature *)featureForNameUploadNone { 2196 - (GDataDocFeature *)featureForNameUploadNone {
2197 return [self featureForName:@"upload_none"]; 2197 return [self featureForName:@"upload_none"];
2198 } 2198 }
2199 2199
2200 @end 2200 @end
2201 2201
2202 // 2202 //
2203 // webmaster tools 2203 // webmaster tools
2204 // 2204 //
2205 2205
2206 @interface GDataFeedSiteKeyword (TestHelperMethods) 2206 @interface GDataFeedSiteKeyword (TestHelperMethods)
2207 - (NSArray *)keywordsWithInternalSource; 2207 - (NSArray *)keywordsWithInternalSource;
2208 @end 2208 @end
2209 2209
2210 @implementation GDataFeedSiteKeyword (TestHelperMethods) 2210 @implementation GDataFeedSiteKeyword (TestHelperMethods)
2211 - (NSArray *)keywordsWithInternalSource { 2211 - (NSArray *)keywordsWithInternalSource {
2212 return [self keywordsWithSource:kGDataSiteKeywordInternal]; 2212 return [self keywordsWithSource:kGDataSiteKeywordInternal];
2213 } 2213 }
2214 @end 2214 @end
Powered by Google Project Hosting