예제 #1
0
 public void CommentsQueryConstructorTest()
 {
     string queryUri = "http://www.google.com/test";
     string expected = "http://www.google.com/test?kind=comment"; 
     CommentsQuery target = new CommentsQuery(queryUri);
     Assert.AreEqual(new Uri(expected), target.Uri);
 }
예제 #2
0
        public string GetAllComments(string albumid, string photoid)
        {
            CommentsQuery query = new CommentsQuery(PicasaQuery.CreatePicasaUri(GetGUsername(), albumid, photoid));
            PicasaFeed feed = service.Query(query);
            if (feed.Entries.Count != 0)
            {

                int count = 0;
                string results = "";
                foreach (PicasaEntry entry in feed.Entries)
                {
                    if (count < 20)
                    {
                        results += "<p>" + entry.Content.Content + "</p>";
                        count++;
                    }
                }
                return results;
            }
            return "No Comments";
        }
예제 #3
0
 public void CommentsQueryConstructorTest1()
 {
     CommentsQuery target = new CommentsQuery();
     Assert.IsNotNull(target);
 }