///////////////////////////////////////////////////////////////////////////// [Test] public void YouTubeUploaderTest() { YouTubeQuery query = new YouTubeQuery(); query.Uri = new Uri(CreateUri(this.resourcePath + "uploaderyt.xml")); YouTubeService service = new YouTubeService("NETUnittests", this.ytDevKey); if (this.userName != null) { service.Credentials = new GDataCredentials(this.ytUser, this.ytPwd); } YouTubeFeed feed = service.Query(query); YouTubeEntry entry = feed.Entries[0] as YouTubeEntry; YouTube.MediaCredit uploader = entry.Uploader; Assert.IsTrue(uploader != null); Assert.IsTrue(uploader.Role == "uploader"); Assert.IsTrue(uploader.Scheme == "urn:youtube"); Assert.IsTrue(uploader.Value == "GoogleDevelopers"); }
public void YouTubeUploaderTest() { Tracing.TraceMsg("Entering YouTubeUploaderTest"); YouTubeQuery query = new YouTubeQuery(); query.Uri = new Uri(CreateUri(Path.Combine(this.resourcePath, "uploaderyt.xml"))); YouTubeService service = new YouTubeService("NETUnittests", this.ytDevKey); if (!string.IsNullOrEmpty(this.ytUser)) { service.Credentials = new GDataCredentials(this.ytUser, this.ytPwd); } YouTubeFeed feed = service.Query(query); YouTubeEntry entry = feed.Entries[0] as YouTubeEntry; YouTube.MediaCredit uploader = entry.Uploader; Assert.IsTrue(uploader != null); Assert.IsTrue(uploader.Role == "uploader"); Assert.IsTrue(uploader.Scheme == "urn:youtube"); Assert.IsTrue(uploader.Value == "GoogleDevelopers"); }