public void Forums_ListModerators() { // // Try authenticated as forum owner DisqusApiClient client = new DisqusApiClient(new Disqus.Api.V30.Authentication.DsqAuth(_validApiKey, _validAccessToken), new Uri("http://disqus.com/", UriKind.Absolute)); var forumModeratorsAuthenticated = client.ListForumModeratorsAsync(_ownedForum).Result; Assert.AreEqual(0, forumModeratorsAuthenticated.Code); // // Try as unauthenticated user client = new DisqusApiClient(new Disqus.Api.V30.Authentication.DsqAuth(_validApiKey), new Uri("http://disqus.com/", UriKind.Absolute)); try { var unauthenticated = client.ListForumModeratorsAsync(_ownedForum).Result; } catch (Exception) { // Should fail } // // Try as authenticated, but another forum client = new DisqusApiClient(new Disqus.Api.V30.Authentication.DsqAuth(_validApiKey, _validAccessToken), new Uri("http://disqus.com/", UriKind.Absolute)); var forumModeratorsAuthenticatedOther = client.ListForumModeratorsAsync("disqus").Result; Assert.AreEqual(0, forumModeratorsAuthenticatedOther.Code); }