public async Task <DisqusResponse <IEnumerable <string> > > ValidateAsync(DisqusAccessToken accessToken, DisqusForumValidateRequest request) { Collection <KeyValuePair <string, string> > parameters = Parameters .WithParameter("access_token", accessToken) .WithMultipleParameters(request.Parameters); return(await RequestProcessor .ExecuteAsync <DisqusResponse <IEnumerable <string> > >(DisqusRequestMethod.Get, DisqusEndpoints.Forums.Validate, parameters) .ConfigureAwait(false)); }
public async Task ValidateAsync_Test() { /* arrange */ var request = DisqusForumValidateRequest .New(TestData.Forum) .AdsPositionTopEnabled(true) .AdsProductLinksEnabled(true); /* act */ var response = await Disqus.Forums .ValidateAsync(DisqusAccessToken.Create(TestData.AccessToken), request) .ConfigureAwait(false); /* assert */ Assert.That(response.Code, Is.EqualTo(DisqusApiResponseCode.Success)); }