Пример #1
0
        public void CanGetComments()
        {
            var client = new SoapiClient(Apikey, AppId);
            var response = client.Comments.Comments("stackoverflow", null, null, null, null, null, null, null, null);

            Assert.Greater(response.Items.Count, 0);
        }
Пример #2
0
 public void CanGetSuggestedEditsByIds()
 {
     var client = new SoapiClient(Apikey, AppId);
     var response = client.Suggested_Edits.SuggestedEdits("stackoverflow", null, null, null, null, null, null, null, null);
     Assert.Greater(response.Items.Count, 0);
     client.Suggested_Edits.SuggestedEditsByIds("stackoverflow", null, null, null, null, null, null, null, null,"9248237");
 }
Пример #3
0
        public void CanGetPostsByIdsSuggestedEdits()
        {
            var client = new SoapiClient(Apikey, AppId);
            var response = client.Posts.PostsByIdsSuggestedEdits("stackoverflow", null, null, null, null, null, null, null, null, "6841479");

            Assert.Greater(response.Items.Count, 0);
        }
Пример #4
0
 public void CanGetErrorsById()
 {
     var client = new SoapiClient(Apikey, AppId);
     try
     {
         client.Errors.ErrorsById(401);
     }
     catch (ApiException apiException)
     {
         // #TODO put this functionality back in ApiException
         var error = JsonConvert.DeserializeObject<ErrorClass>(apiException.ResponseText);
         Assert.AreEqual(401, error.ErrorId);
     }
 }
Пример #5
0
 public void CanGetUsersByIdInboxUnread()
 {
     var client = new SoapiClient(Apikey, AppId);
     var response = client.Users.UsersByIdInboxUnread("stackoverflow", null, null, 242897, null);
     Assert.Greater(response.Items.Count, 0);
 }
Пример #6
0
 public void CanGetUsersByIdAssociated()
 {
     var client = new SoapiClient(Apikey, AppId);
     var response = client.Users.UsersByIdAssociated(null, null, "87636");
     Assert.Greater(response.Items.Count, 0);
 }
Пример #7
0
 public void CanGetUsersModeratorsElected()
 {
     var client = new SoapiClient(Apikey, AppId);
     var response = client.Users.UsersModeratorsElected("stackoverflow", null, null, null, null, null, null, null, null);
     Assert.Greater(response.Items.Count, 0);
 }
Пример #8
0
 public void CanGetFilters()
 {
     var client = new SoapiClient(Apikey, AppId);
     var response = client.Filters.Filters("!masJQxPJAU");
     Assert.Greater(response.Items.Count, 0);
 }
Пример #9
0
 public void CanGetTagsModeratorOnly()
 {
     var client = new SoapiClient(Apikey, AppId);
     var response = client.Tags.TagsModeratorOnly("stackapps", null, null, null, null, null, null, null, null, "status");
     Assert.Greater(response.Items.Count, 0);
 }
Пример #10
0
 public void CanGetTagsByTagsWikis()
 {
     var client = new SoapiClient(Apikey, AppId);
     var response = client.Tags.TagsByTagsWikis("stackoverflow", null, null, "asp.net");
     Assert.Greater(response.Items.Count, 0);
 }
Пример #11
0
 public void CanGetUsersByIdsFavorites()
 {
     var client = new SoapiClient(Apikey, AppId);
     var response = client.Users.UsersByIdsFavorites("stackoverflow", null, null, null, null, null, null, null, null, "242897");
     Assert.Greater(response.Items.Count, 0);
 }
Пример #12
0
 public void CanGetInfo()
 {
     var client = new SoapiClient(Apikey, AppId);
     var response = client.Info.Info("stackoverflow");
     Assert.Greater(response.Items.Count, 0);
 }
Пример #13
0
 public void CanGetSimilar()
 {
     var client = new SoapiClient(Apikey, AppId);
     var response = client.Search.Similar("stackoverflow", null, null, null, null, null, null, null, null, null, null, "Why is subtracting these two times (in 1927) giving a strange result");
     Assert.Greater(response.Items.Count, 0);
 }
Пример #14
0
 public void CanGetSearch()
 {
     var client = new SoapiClient(Apikey, AppId);
     var response = client.Search.Search("stackoverflow", null, null, null, null, null, null, null, null, null, null, "jquery");
     Assert.Greater(response.Items.Count, 0);
 }
Пример #15
0
 public void CanGetUsersByIds()
 {
     var client = new SoapiClient(Apikey, AppId);
     var response = client.Users.UsersByIds("stackapps", null, null, null, null, null, null, null, null, "14");
     Assert.Greater(response.Items.Count, 0);
 }
Пример #16
0
 public void CanGetRevisions()
 {
     var client = new SoapiClient(Apikey, AppId);
     var response = client.Revisions.RevisionsByIds("stackoverflow", null, null, null, null, "91265C70-4988-4AAC-9C34-D6370EA0CAC4");
     Assert.Greater(response.Items.Count, 0);
 }
Пример #17
0
 public void CanGetUsersByIdsCommentsToId()
 {
     var client = new SoapiClient(Apikey, AppId);
     var response = client.Users.UsersByIdsCommentsToId("stackoverflow", null, null, null, null, null, null, null, null, "242897", 22656);
     Assert.Greater(response.Items.Count, 0);
 }
Пример #18
0
 public void CanGetUsersByIdsQuestionsNoAnswers()
 {
     var client = new SoapiClient(Apikey, AppId);
     var response = client.Users.UsersByIdsQuestionsNoAnswers("stackoverflow", null, null, null, null, null, null, null, null, "47012");
     Assert.Greater(response.Items.Count, 0);
 }
Пример #19
0
 public void CanGetSites()
 {
     var client = new SoapiClient(Apikey, AppId);
     var response = client.Sites.Sites(null, null);
     Assert.Greater(response.Items.Count, 0);
 }
Пример #20
0
 public void CanGetUsersByIdTagsByTagsTopAnswers()
 {
     var client = new SoapiClient(Apikey, AppId);
     var response = client.Users.UsersByIdTagsByTagsTopAnswers("stackoverflow", null, null, null, null, null, null, null, null, 242897, "javascript");
     Assert.Greater(response.Items.Count, 0);
 }
Пример #21
0
 public void CanGetTagsByTagTopAskersByPeriod()
 {
     var client = new SoapiClient(Apikey, AppId);
     var response = client.Tags.TagsByTagTopAskersByPeriod("stackoverflow", null, null, "asp.net", Period.all_time);
     Assert.Greater(response.Items.Count, 0);
 }
Пример #22
0
 public void CanGetUsersByIdTopQuestionTags()
 {
     var client = new SoapiClient(Apikey, AppId);
     var response = client.Users.UsersByIdTopQuestionTags("stackoverflow", null, null, 242897);
     Assert.Greater(response.Items.Count, 0);
 }
Пример #23
0
 public void CanGetTagsRequired()
 {
     var client = new SoapiClient(Apikey, AppId);
     var response = client.Tags.TagsRequired("stackapps", null, null, null, null, null, null, null, null, null);
     Assert.Greater( response.Items.Count, 0);
 }
Пример #24
0
 public void CanCreateFilters()
 {
     var client = new SoapiClient(Apikey, AppId);
     var response = client.Filters.FiltersCreate(".total;question.body", null, null, null);
     Assert.Greater(response.Items.Count, 0);
 }