示例#1
0
 public async Task UnsubscribeFeed()
 {
     Caller api = new Caller(info);
     Assert.IsNotNull(api);
     Assert.IsFalse(api.hasSessionId);
     var trysubscription = await api.SubscribeToFeed(unsubscribeFeed, 0, "", "");
     var feeds = await api.GetFeeds(0, false, 200, 0, true);
     bool found = false;
     int feed_id = 0;
     foreach (GetFeedsResponseContent c in feeds.Content)
     {
         if (c.FeedUrl.Equals(unsubscribeFeed))
         {
             found = true;
             feed_id = c.Id;
             break;
         }
     }
     Assert.IsTrue(found);
     var heads = await api.UnsubscribeFeed(feed_id);
     Assert.IsTrue(api.hasSessionId);
     Assert.AreEqual(heads.Status, 0);
     feeds = await api.GetFeeds(0, false, 200, 0, true);
     found = false;
     foreach (GetFeedsResponseContent c in feeds.Content)
     {
         if (c.FeedUrl.Equals(unsubscribeFeed))
         {
             found = true;
             break;
         }
     }
     Assert.IsFalse(found);
 }
示例#2
0
 public async Task TestGetFeeds1()
 {
     Caller api = new Caller(info);
     Assert.IsNotNull(api);
     Assert.IsFalse(api.hasSessionId);
     var feeds = await api.GetFeeds(-1, false, 10, 0, true);
     Assert.IsTrue(api.hasSessionId);
     Assert.AreEqual(feeds.Status, 0);
 }