Source

stacky / trunk / source / Tests / Stacky.Net35.IntegrationTests / UserTests.cs

using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Threading;

namespace Stacky.IntegrationTests.Net35
{
    [TestClass]
    public class UserTests : IntegrationTest
    {
        [TestMethod]
        public void User_GetUsers()
        {
            var users = Client.GetUsers();
            Assert.IsNotNull(users);
        }

        [TestMethod]
        public void User_GetUsers_ContainsPagingInformation()
        {
            var users = Client.GetUsers();
            Assert.IsNotNull(users);
            Assert.IsTrue(users.PageSize > 0);
            Assert.IsTrue(users.CurrentPage > 0);
            Assert.IsTrue(users.TotalItems > 0);
        }

        //[TestMethod]
        //public void User_GetUserMentions()
        //{
        //    var mentions = Client.GetUserMentions(22656);
        //    Assert.IsNotNull(mentions);
        //}

        //[TestMethod]
        //public void User_GetUserMentions_ContainsPagingInformation()
        //{
        //    var mentions = Client.GetUserMentions(22656);
        //    Assert.IsNotNull(mentions);
        //    Assert.IsTrue(mentions.PageSize > 0);
        //    Assert.IsTrue(mentions.CurrentPage > 0);
        //    Assert.IsTrue(mentions.TotalItems > 0);
        //}

        //[TestMethod]
        //public void User_GetQuestionAnswers()
        //{
        //    var answers = Client.GetQuestionAnswers(31415);
        //    Assert.IsNotNull(answers);
        //}

        //[TestMethod]
        //public void User_GetQuestionAnswers_ContainsPagingInformation()
        //{
        //    var answers = Client.GetQuestionAnswers(31415);
        //    Assert.IsNotNull(answers);
        //    Assert.IsTrue(answers.PageSize > 0);
        //    Assert.IsTrue(answers.CurrentPage > 0);
        //    Assert.IsTrue(answers.TotalItems > 0);
        //}

        //[TestMethod]
        //public void User_GetUserTimeline()
        //{
        //    var events = Client.GetUserTimeline(22656);
        //    Assert.IsNotNull(events);
        //}

        //[TestMethod]
        //public void User_GetUserTimeline_ContainsPagingInformation()
        //{
        //    var events = Client.GetUserTimeline(22656);
        //    Assert.IsNotNull(events);
        //    Assert.IsTrue(events.PageSize > 0);
        //    Assert.IsTrue(events.CurrentPage > 0);
        //    Assert.IsTrue(events.TotalItems > 0);
        //}

        //[TestMethod]
        //public void User_GetUserReputation()
        //{
        //    var rep = Client.GetUserReputation(22656);
        //    Assert.IsNotNull(rep);
        //}

        //[TestMethod]
        //public void User_GetUserReputation_ContainsPagingInformation()
        //{
        //    var rep = Client.GetUserReputation(22656);
        //    Assert.IsNotNull(rep);
        //    Assert.IsTrue(rep.PageSize > 0);
        //    Assert.IsTrue(rep.CurrentPage > 0);
        //    Assert.IsTrue(rep.TotalItems > 0);
        //}

        //[TestMethod]
        //public void User_Returns_Badge_Counts()
        //{
        //    var user = Client.GetUser(22656);

        //    Assert.IsNotNull(user);
        //    Assert.IsNotNull(user.BadgeCounts);
        //    Assert.IsTrue(user.BadgeCounts.Bronze > 0);
        //}

        [TestMethod]
        public void GetModerators()
        {
            var users = Client.GetModerators();
            Assert.IsNotNull(users);
        }
    }
}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.