public async void TestScroll() { String accessToken = this.RandomString(); ScrollTagsRequest req = new ScrollTagsRequest(); MockAPI <Tags> mock = this.MockFor <Tags>( HttpMethod.Post, "/api/v1/tags.scroll", m => m.WithContent(req.ToString()) .Respond("application/json", "{ \"tags\": [{\"tagId\":\"" + this.RandomString() + "\"}]}") ); APIResponse <TagsResponseBody> res = await mock.Instance.Scroll(accessToken, null); mock.Handler.VerifyNoOutstandingExpectation(); Assert.Equal(res.Body.Tags.Count, 1); }
public async void TestScrollWithAllOptions() { String accessToken = this.RandomString(); String teamId = this.RandomString(); String cursor = this.RandomString(); int size = 20; ScrollTagsRequest req = new ScrollTagsRequest(); req.TeamId = teamId; req.ScrollCursor = cursor; req.Size = size; req.IncludeDeletedTags = true; MockAPI <Tags> mock = this.MockFor <Tags>( HttpMethod.Post, "/api/v1/tags.scroll", m => m.WithContent(req.ToString()) .Respond("application/json", "{ \"tags\": [{\"tagId\":\"" + this.RandomString() + "\"}]}") ); APIResponse <TagsResponseBody> res = await mock.Instance.Scroll(accessToken, cursor, true, teamId, size); mock.Handler.VerifyNoOutstandingExpectation(); Assert.Equal(res.Body.Tags.Count, 1); }