-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathclienttests.cs
734 lines (630 loc) · 25.6 KB
/
clienttests.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
/* Software License Agreement (BSD License)
*
* Copyright (c) 2010-2011, Rustici Software, LLC
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of the <organization> nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL Rustici Software, LLC BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using System.Xml;
using System.Globalization;
using System.Diagnostics;
using System.Threading;
using System.Net;
using System.IO;
using System.Collections;
namespace RusticiSoftware.HostedEngine.Client
{
public class clienttests
{
public ScormEngineService svc;
public ServiceRequest req;
public Configuration cfg;
private string _course;
private string _regid2;
public string tstCourse
{
get
{
if (_course == null)
{
// find a test course
try
{
if (cfg == null)
{
fixtureSetup();
}
CourseService cs = new CourseService(cfg, svc);
_course = cs.GetCourseList()[0].CourseId;
}
catch (Exception ex)
{
throw new IgnoreException("Failed to select a test course", ex);
}
}
return _course;
}
}
public string regId2
{
get
{
if (_regid2 == null)
{
// find a test course
try
{
if (cfg == null)
{
fixtureSetup();
}
RegistrationService rs = new RegistrationService(cfg, svc);
List<RegistrationData> regs = rs.GetRegistrationList();
if (regs.Count > 0)
{
_regid2 = regs[0].RegistrationId;
}
else
{
_regid2 = Guid.NewGuid().ToString();
rs.CreateRegistration(_regid2, tstCourse, 0, tstLearner, fName, lName, postback, authType, pbLogin, pbPass, resultFmt);
}
}
catch (Exception ex)
{
throw new IgnoreException("Failed to select a test Registration", ex);
}
}
return _regid2;
}
}
public string regId;
public string courseId;
public string courseFile = "Golf_RunTimeAdvancedCalls_SCORM20043rdEdition.zip";
public string courseFilePath = @"Z:\shared\samplecourses\Scorm2004";
public string upldFile = @"Z:\shared\samplecourses\Scorm2004\Golf_RunTimeAdvancedCalls_SCORM20043rdEdition.zip";
public string tstLearner = "nunitLearnerId_" + Guid.NewGuid().ToString();
public string fName = "Test";
public string lName = "User";
public string postback = "http://localhost";
public RegistrationResultsAuthType authType = RegistrationResultsAuthType.HTTPBASIC;
public string pbLogin = "testpostbackusername";
public string pbPass = "password";
public RegistrationResultsFormat resultFmt = RegistrationResultsFormat.FULL;
public string domain = "default"; //TODO: should local WS handle other domains?
[TestFixtureSetUp]
public virtual void fixtureSetup()
{
if (cfg == null)
{
cfg = new Configuration(@"http://cloud.scorm.com/EngineWebServices/", "[App Id]", "[Secret Key]");
//cfg = new Configuration(@"http://120.50.41.175/EngineWebServices", "defaultID", "changeme_lgpjkqk5JK");//"4JloSCYfXMancDw267peGZoL8s4GNlGhQkIV5qch");
//cfg = new Configuration(@"http://bclark.local/EngineWebServices", "defaultID", "4JloSCYfXMancDw267peGZoL8s4GNlGhQkIV5qch");
//cfg = new Configuration(@"http://test/EngineWebServices", "defaultID", "changeme_lgpjkqk5JK");
//http://cloud.scorm.com/EngineWebServices/
svc = new ScormEngineService(cfg);
}
}
[SetUp]
public virtual void caseSetup()
{
req = svc.CreateNewRequest();
courseId = Guid.NewGuid().ToString();
regId = Guid.NewGuid().ToString();
}
protected String testRegMissingMsg
{
get { return string.Format("Could not find registration [{0}] associated with appid [{1}]", regId2, cfg.AppId); }
}
protected String testCourseMissingMsg
{
get { return string.Format("Could not find course [{0}], versionid [{1}] associated with appid [{2}]", tstCourse, 0, cfg.AppId); }
}
protected String courseServerPath
{
//TODO: should local keep PD when saving uploads, if so, use PD here, not "default"
// not correct for cloud WS unless "default" pd is used.
get { return "default/"+courseFile; }
}
//
}
[TestFixture]
public class DbgSvc : clienttests
{
DebugService debugSvc;
public override void caseSetup()
{
base.caseSetup();
debugSvc = new DebugService(cfg, svc);
}
[Test]
public void ping()
{
bool resp = debugSvc.CloudPing();
Debug.WriteLine(Environment.NewLine + resp.ToString());
Assert.IsTrue(resp,"Ping Failed");
}
[Test]
public void Authping()
{
bool resp = debugSvc.CloudAuthPing();
Debug.WriteLine(Environment.NewLine + resp.ToString());
Assert.IsTrue(resp, "Auth Ping Failed");
}
[Test]
public void getTime()
{
XmlDocument response = req.CallService("rustici.debug.getTime");
DateTime serverTime = DateTime.ParseExact(response.SelectSingleNode(@"/rsp/currenttime").InnerText, "yyyyMMddHHmmss", CultureInfo.InvariantCulture);
TimeSpan diff = DateTime.UtcNow - serverTime;
Assert.LessOrEqual(Math.Abs(diff.Seconds), 60, "clock times too far off - server time is: " + serverTime.ToLocalTime());
}
}
[TestFixture]
public class Upload : clienttests
{
UploadService upload;
public override void caseSetup()
{
base.caseSetup();
upload = new UploadService(cfg, svc);
}
[Test]
public void getUploadToken()
{
XmlDocument response = req.CallService("rustici.upload.getUploadToken");
Console.WriteLine(response.InnerXml);
}
[Test]
public void UploadShowDelete()
{
upload.UploadFile(upldFile, domain);
foreach (FileData fd in upload.GetFileList(domain))
{
Console.WriteLine();
Console.WriteLine("File: " + fd.Name);
Console.WriteLine(fd.LastModified);
Console.WriteLine(fd.Size);
Console.WriteLine();
if (fd.Name != courseFile)
{
upload.DeleteFile(fd.Name, domain);
}
}
}
[Test]
public void ListFiles()
{
List<FileData> files = upload.GetFileList();
foreach (FileData file in files)
{
Console.WriteLine(file.Name);
}
}
[Test]
public void url()
{
Console.WriteLine(Environment.NewLine + upload.GetUploadUrl("http://scorm.com"));
}
public void EnsureTestFile()
{
try
{
if (upload == null)
{
fixtureSetup();
caseSetup();
}
bool found = false;
List<FileData> files = upload.GetFileList(domain);
foreach (FileData file in files)
{
if (file.Name == courseFile)
{
found = true;
break;
}
}
if (!found)
{
UploadResult ur = upload.UploadFile(Path.Combine(courseFilePath,courseFile),domain);
}
}
catch (InvalidProgramException ex)
{
Assert.Ignore("Prerequisite failure: error ensuring test file was present on server. " + Environment.NewLine + ex.ToString());
}
}
}
[TestFixture]
public class Registration : clienttests
{
private RegistrationService reg;
public override void caseSetup()
{
base.caseSetup();
reg = new RegistrationService(cfg, svc);
}
[Test]
public void createDelete()
{
try
{
reg.CreateRegistration(regId, tstCourse, 0, tstLearner, fName, lName, postback, authType, pbLogin, pbPass, resultFmt);
}
catch (ServiceException se)
{
if (se.Message == testCourseMissingMsg)
{
Assert.Ignore("test course does not exist on the server");
}
else throw;
}
Assert.AreEqual(1, reg.GetRegistrationList(regId, null).Count, "Registration ID " + regId + " just created not found on server." );
reg.ResetGlobalObjectives(regId, false);
reg.ResetRegistration(regId);
reg.DeleteRegistration(regId, false);
}
[Test]
public void List()
{
foreach (RegistrationData rd in reg.GetRegistrationList())
{
Console.WriteLine(rd.CourseId + " : " + rd.RegistrationId);
}
}
[Test]
public void Info()
{
foreach (RegistrationData rd in reg.GetRegistrationList(regId2, tstCourse))
{
Console.WriteLine(rd.CourseId + " : " + rd.RegistrationId);
}
Console.WriteLine(reg.GetRegistrationSummary(regId2).Complete);
Console.WriteLine(reg.GetRegistrationResult(regId2, RegistrationResultsFormat.FULL, DataFormat.JSON));
}
[Test]
public void History()
{
string launchID = "";
foreach (LaunchInfo li in reg.GetLaunchHistory(regId2))
{
Console.WriteLine(string.Format("{0} : {1}", li.Id, li.LaunchTime));
Console.WriteLine(li.Log);
launchID = li.Id;
}
if (!String.IsNullOrEmpty(launchID))
{
LaunchInfo li = reg.GetLaunchInfo(launchID);
Console.WriteLine(li.Log);
}
else
{
Assert.Ignore("no history");
}
}
[Test]
public void LaunchExistingRegistration()
{
List<RegistrationData> regs = reg.GetRegistrationList();
if (regs.Count < 1)
{
Assert.Ignore("No existing registration to launch");
}
string url = reg.GetLaunchUrl(regs[0].RegistrationId, "closer.html");
Process browser = new Process();
Console.WriteLine(url);
browser.StartInfo = new ProcessStartInfo("firefox", " -new-window " + url);
browser.Start();
if (!browser.WaitForExit(1000 * 60 * 1))
{
Assert.Inconclusive("Browser did not close");
}
}
[Test]
public void uploadAndShowLaunchLink()
{
CourseService pkg = new CourseService(cfg, svc);
List<ImportResult> results = pkg.ImportCourse(courseId, upldFile,null,domain);
Assert.AreEqual(1, results.Count, "Expected 1 import result");
Assert.IsTrue(results[0].WasSuccessful, results[0].Message);
reg.CreateRegistration(regId, courseId, 0, tstLearner, fName, lName, postback, authType, pbLogin, pbPass, resultFmt);
string url = reg.GetLaunchUrl(regId, @"closer.htm");
showResponse(url);
}
private void showResponse(String url)
{
HttpWebRequest wreq = (HttpWebRequest)HttpWebRequest.Create(url);
//wreq.UserAgent = @"Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0)";
try
{
using (WebResponse response = wreq.GetResponse())
{
showResponse(response);
}
}
catch (WebException we)
{
showResponse(we.Response);
((IDisposable)we.Response).Dispose();
throw;
}
}
private void showResponse(WebResponse response)
{
StringBuilder sb = new StringBuilder();
foreach (string key in response.Headers.AllKeys)
{
sb.AppendLine(key + ": " + response.Headers[key]);
}
sb.AppendLine("length: " + response.ContentLength);
if (response.ContentLength >= 0)
{
byte[] content = new byte[response.ContentLength];
response.GetResponseStream().Read(content, 0, (int)response.ContentLength);
sb.AppendLine(Encoding.UTF8.GetString(content));
}
Console.WriteLine(sb);
}
}
[TestFixture]
public class Course : clienttests
{
CourseService pkg;
public override void fixtureSetup()
{
base.fixtureSetup();
new Upload().EnsureTestFile();
}
public override void caseSetup()
{
base.caseSetup();
pkg = new CourseService(cfg, svc);
}
[Test]
public void CourseList()
{
List<CourseData> courseList = pkg.GetCourseList();
foreach (CourseData course in courseList)
{
Console.WriteLine(course.CourseId + " - " + course.Title);
}
}
[Test]
public void CourseListFilter()
{
List<CourseData> courseList = pkg.GetCourseList();
if (courseList.Count < 2)
{
Assert.Ignore("Can't test filtering, only " + courseList.Count + " courses.");
}
string courseId = courseList[0].CourseId;
courseList = pkg.GetCourseList(courseId);
Assert.AreEqual(1, courseList.Count);
Assert.AreEqual(courseId, courseList[0].CourseId);
}
[Test]
public void import_delete()
{
pkg.ImportUploadedCourse(courseId, courseServerPath);
pkg.VersionUploadedCourse(courseId, courseServerPath, null);
pkg.VersionUploadedCourse(courseId, courseServerPath, null);
RegistrationService reg = new RegistrationService(cfg, svc);
reg.CreateRegistration(regId, courseId, 0, tstLearner, fName, lName, postback, authType, pbLogin, pbPass, resultFmt);
pkg.DeleteCourse(courseId, true);
pkg.DeleteCourseVersion(courseId, 1);
pkg.DeleteCourse(courseId);
}
[Test]
public void import_async()
{
AsyncImportResult res = null;
string token = pkg.ImportUploadedCourseAsync(courseId, courseServerPath, "", "wherever");
while (res == null || res.Status == AsyncImportResult.ImportStatus.RUNNING)
{
Thread.Sleep(1000);
res = pkg.GetAsyncImportResult(token);
Console.WriteLine(res.Status);
}
}
[Test]
public void import_asset_ops()
{
pkg.ImportUploadedCourse(courseId, courseServerPath);
pkg.GetAttributes(courseId);
pkg.GetFileStructure(courseId);
pkg.GetPreviewUrl(courseId);
pkg.GetPropertyEditorUrl(courseId);
pkg.GetAssets(@"test.zip", courseId);
}
[Test]
public void import_asset_structure()
{
pkg.ImportUploadedCourse(courseId, courseServerPath);
XmlDocument doc = new XmlDocument();
doc.LoadXml(pkg.GetFileStructure(courseId));
string topdir = doc.DocumentElement.GetAttribute("name");
foreach (XmlElement file in doc.SelectNodes("/dir/file"))
{
string path = topdir + @"\" + file.GetAttribute("name");
Console.WriteLine(path);
Console.WriteLine(pkg.GetAssetUrl(courseId, path));
}
}
[Test]
public void courseMetaData()
{
pkg.ImportUploadedCourse(courseId, courseServerPath);
foreach (MetadataScope scope in Enum.GetValues(typeof(MetadataScope)))
{
foreach (MetadataFormat format in Enum.GetValues(typeof(MetadataFormat)))
{
Console.WriteLine(scope.ToString() + " - " + format.ToString());
Console.WriteLine(pkg.GetMetadata(courseId, scope, format) + Environment.NewLine);
}
}
}
[TearDown]
public void teardown()
{
try
{
pkg.DeleteCourse(courseId);
}
catch { }
}
}
public class Reporting : clienttests
{
[Test]
public void getAccountInfo()
{
ServiceRequest req = new ServiceRequest(cfg);
Console.WriteLine(req.CallService("rustici.reporting.getAccountInfo").OuterXml);
}
/*[Test]
public void getUsageInfo()
{
ServiceRequest req = new ServiceRequest(cfg);
Console.WriteLine(req.CallService("rustici.reporting.getUsageInfo").OuterXml);
}*/
[Test]
public void launch()
{
ServiceRequest req = new ServiceRequest(cfg);
req.Parameters.Add("auth", "no auth");
req.Parameters.Add("reporturl", "http://scorm.com");
string url = req.ConstructUrl("rustici.reporting.launchReport");
WebRequest wr = HttpWebRequest.Create(url);
((HttpWebRequest)wr).AllowAutoRedirect = false;
WebResponse rsp = wr.GetResponse();
Console.WriteLine(((HttpWebResponse)rsp).StatusCode);
Console.WriteLine(((HttpWebResponse)rsp).StatusDescription);
Console.WriteLine("Header: ");
foreach (string key in ((HttpWebResponse)rsp).Headers.AllKeys)
{
Console.WriteLine(string.Format("{0} : {1}", key, rsp.Headers[key]));
}
Console.WriteLine("end of header");
Console.WriteLine(rsp.ResponseUri);
Console.WriteLine(new StreamReader(rsp.GetResponseStream()).ReadToEnd());
}
[Test]
public void auth()
{
ServiceRequest req = new ServiceRequest(cfg);
req.Parameters.Add("navpermission", "NONAV");
Console.WriteLine(req.CallService("rustici.reporting.getReportageAuth").OuterXml);
}
}
public class Tagging : clienttests
{
private const string testTag = "testTag";
private const string testTag2 = "second test tag";
[Test]
public void course()
{
{
ServiceRequest req = svc.CreateNewRequest();
req.Parameters.Add("courseid", tstCourse);
req.Parameters.Add("tag", testTag);
Console.WriteLine("Add: " + req.CallService("rustici.tagging.addCourseTag").OuterXml);
}
{
ServiceRequest req = svc.CreateNewRequest();
req.Parameters.Add("courseid", tstCourse);
req.Parameters.Add("tag", testTag);
Console.WriteLine("Remove: " + req.CallService("rustici.tagging.removeCourseTag").OuterXml);
}
}
[Test]
public void learner()
{
addLearnerTag(tstLearner, testTag,0);
addLearnerTag(tstLearner, testTag2, 1);
removeLearnerTag(tstLearner, testTag, 2);
removeLearnerTag(tstLearner, testTag2, 1);
}
private void addLearnerTag(string learnerId, string tag, int existingTagCount)
{
IList<string> learnerTags;
Assert.AreEqual(existingTagCount, getLearnerTags(tstLearner).Count, "expected tag count");
addLearnerTag(learnerId, tag);
learnerTags = getLearnerTags(learnerId);
Assert.AreEqual(existingTagCount + 1, learnerTags.Count, "expected tag count after adding tag");
Assert.Contains(tag, (ICollection)learnerTags, "missing added tag");
addLearnerTag(learnerId, tag);
learnerTags = getLearnerTags(learnerId);
Assert.AreEqual(existingTagCount + 1, learnerTags.Count, "expected tag count after adding tag (dup)");
Assert.Contains(tag, (ICollection)learnerTags, "missing added tag");
}
private void removeLearnerTag(string learnerId, string tag, int existingTagCount)
{
IList<string> learnerTags;
Assert.AreEqual(existingTagCount, getLearnerTags(tstLearner).Count, "expected tag count");
removeLearnerTag(learnerId, tag);
learnerTags = getLearnerTags(learnerId);
Assert.AreEqual(existingTagCount - 1, learnerTags.Count, "expected tag count after removing tag");
Assert.IsFalse(learnerTags.Contains(tag), "tag not removed");
removeLearnerTag(learnerId, tag);
learnerTags = getLearnerTags(learnerId);
Assert.AreEqual(existingTagCount - 1, learnerTags.Count, "expected tag count after removing tag (dup)");
Assert.IsFalse(learnerTags.Contains(tag), "tag not removed");
}
private void addLearnerTag(string learnerId, string tag)
{
ServiceRequest req = svc.CreateNewRequest();
req.Parameters.Add("learnerid", learnerId);
req.Parameters.Add("tag", tag);
XmlDocument rsp =req.CallService("rustici.tagging.addLearnerTag");
Assert.IsNotNull(rsp.SelectSingleNode(@"/rsp/success"),rsp.OuterXml);
}
private void removeLearnerTag(string learnerId, string tag)
{
ServiceRequest req = svc.CreateNewRequest();
req.Parameters.Add("learnerid", learnerId);
req.Parameters.Add("tag", tag);
XmlDocument rsp = req.CallService("rustici.tagging.removeLearnerTag");
Assert.IsNotNull(rsp.SelectSingleNode(@"/rsp/success"), rsp.OuterXml);
}
private IList<string> getLearnerTags(string learnerId)
{
IList<string> tags = new List<string>();
ServiceRequest req = svc.CreateNewRequest();
req.Parameters.Add("learnerid", learnerId);
XmlDocument rsp = req.CallService("rustici.tagging.getLearnerTags");
XmlNode responseNode = rsp.SelectSingleNode(@"/rsp[@stat='ok']");
Assert.IsNotNull(responseNode, rsp.OuterXml);
XmlNodeList tagNodes = responseNode.SelectNodes(@"tags/tag");
foreach (XmlNode tagNode in tagNodes)
{
tags.Add(tagNode.InnerText);
}
return tags;
}
}
}