public void BuildSearchUrlWithoutQueryTest()
        {
            UserRequestProcessor_Accessor <User> reqProc = new UserRequestProcessor_Accessor <User>();

            reqProc.BaseUrl = "https://api.twitter.com/1/";
            Dictionary <string, string> parameters =
                new Dictionary <string, string>
            {
                { "Type", ((int)UserType.Search).ToString() },
            };
            var actual = reqProc.BuildURL(parameters);
        }
        public void BuildLookupScreenNameUrlWithUserIDAndScreenNameTest()
        {
            UserRequestProcessor_Accessor <User> reqProc = new UserRequestProcessor_Accessor <User>();

            reqProc.BaseUrl = "https://api.twitter.com/1/";
            Dictionary <string, string> parameters =
                new Dictionary <string, string>
            {
                { "Type", ((int)UserType.Lookup).ToString() },
                { "ScreenName", "JoeMayo,LinqToTweeter" },
                { "UserID", "1,2" }
            };
            var actual = reqProc.BuildURL(parameters);
        }
        public void BuildSuggestionCategoriesUrlTest()
        {
            UserRequestProcessor_Accessor <User> reqProc = new UserRequestProcessor_Accessor <User>();

            reqProc.BaseUrl = "https://api.twitter.com/1/";
            Dictionary <string, string> parameters =
                new Dictionary <string, string>
            {
                { "Type", ((int)UserType.Categories).ToString() }
            };
            string expected = "https://api.twitter.com/1/users/suggestions.xml";
            var    actual   = reqProc.BuildURL(parameters);

            Assert.AreEqual(expected, actual);
        }
        public void BuildLookupScreenNameUrlTest()
        {
            UserRequestProcessor_Accessor <User> reqProc = new UserRequestProcessor_Accessor <User>();

            reqProc.BaseUrl = "https://api.twitter.com/1/";
            Dictionary <string, string> parameters =
                new Dictionary <string, string>
            {
                { "Type", ((int)UserType.Lookup).ToString() },
                { "ScreenName", "JoeMayo,LinqToTweeter" }
            };
            string expected = "https://api.twitter.com/1/users/lookup.xml?screen_name=JoeMayo,LinqToTweeter";
            var    actual   = reqProc.BuildURL(parameters);

            Assert.AreEqual(expected, actual);
        }
        public void BuildFriendsUrlTest()
        {
            UserRequestProcessor_Accessor <User> reqProc = new UserRequestProcessor_Accessor <User>();

            reqProc.BaseUrl = "http://twitter.com/";
            Dictionary <string, string> parameters =
                new Dictionary <string, string>
            {
                { "Type", ((int)UserType.Friends).ToString() },
                { "ID", "15411837" }
            };
            string expected = "http://twitter.com/statuses/friends/15411837.xml";
            var    actual   = reqProc.BuildFriendsUrl(parameters);

            Assert.AreEqual(expected, actual);
        }
        public void BuildLookupUserIDUrlTest()
        {
            UserRequestProcessor_Accessor <User> reqProc = new UserRequestProcessor_Accessor <User>();

            reqProc.BaseUrl = "https://api.twitter.com/1/";
            Dictionary <string, string> parameters =
                new Dictionary <string, string>
            {
                { "Type", ((int)UserType.Lookup).ToString() },
                { "UserID", "1,2" }
            };
            string expected = "https://api.twitter.com/1/users/lookup.xml?user_id=1,2";
            var    actual   = reqProc.BuildURL(parameters);

            Assert.AreEqual(expected, actual);
        }
        public void BuildShowUrlWithNoParametersTest()
        {
            UserRequestProcessor_Accessor <User> reqProc = new UserRequestProcessor_Accessor <User>();

            reqProc.BaseUrl = "http://twitter.com/";
            Dictionary <string, string> parameters =
                new Dictionary <string, string>
            {
                { "Type", ((int)UserType.Show).ToString() },
                { "ID", "15411837" }
            };
            string expected = "http://twitter.com/users/show/15411837.json";
            var    actual   = reqProc.BuildShowUrl(parameters);

            Assert.AreEqual(expected, actual);
        }
        public void BuildShowUrlTest()
        {
            UserRequestProcessor_Accessor <User> reqProc = new UserRequestProcessor_Accessor <User>();

            reqProc.BaseUrl = "http://twitter.com/";
            Dictionary <string, string> parameters =
                new Dictionary <string, string>
            {
                { "Type", ((int)UserType.Friends).ToString() },
                { "ID", "15411837" },
                { "UserID", "15411837" },
                { "ScreenName", "JoeMayo" }
            };
            string expected = "http://twitter.com/users/show/15411837.json?user_id=15411837&screen_name=JoeMayo";
            var    actual   = reqProc.BuildShowUrl(parameters);

            Assert.AreEqual(expected, actual);
        }
        public void BuildSearchUrlTest()
        {
            UserRequestProcessor_Accessor <User> reqProc = new UserRequestProcessor_Accessor <User>();

            reqProc.BaseUrl = "https://api.twitter.com/1/";
            Dictionary <string, string> parameters =
                new Dictionary <string, string>
            {
                { "Type", ((int)UserType.Search).ToString() },
                { "Query", "Joe Mayo" },
                { "Page", "2" },
                { "PerPage", "10" }
            };
            string expected = "https://api.twitter.com/1/users/search.xml?q=Joe+Mayo&page=2&per_page=10";
            var    actual   = reqProc.BuildURL(parameters);

            Assert.AreEqual(expected, actual);
        }
        public void BuildFollowersUrlTest()
        {
            UserRequestProcessor_Accessor <User> reqProc = new UserRequestProcessor_Accessor <User>();

            reqProc.BaseUrl = "http://twitter.com/";
            Dictionary <string, string> parameters =
                new Dictionary <string, string>
            {
                { "Type", ((int)UserType.Followers).ToString() },
                { "ID", "15411837" },
                { "UserID", "123" },
                { "ScreenName", "JoeMayo" },
                { "Page", "2" }
            };
            string expected = "http://twitter.com/statuses/followers/15411837.xml?user_id=123&screen_name=JoeMayo&page=2";
            var    actual   = reqProc.BuildFollowersUrl(parameters);

            Assert.AreEqual(expected, actual);
        }
 public void BuildLookupScreenNameUrlWithoutParamsTest()
 {
     UserRequestProcessor_Accessor<User> reqProc = new UserRequestProcessor_Accessor<User>();
     reqProc.BaseUrl = "https://api.twitter.com/1/";
     Dictionary<string, string> parameters =
         new Dictionary<string, string>
             {
                 { "Type", ((int)UserType.Lookup).ToString() },
             };
     var actual = reqProc.BuildURL(parameters);
 }
 public void BuildShowUrlWithNoParametersTest()
 {
     UserRequestProcessor_Accessor<User> reqProc = new UserRequestProcessor_Accessor<User>();
     reqProc.BaseUrl = "http://twitter.com/";
     Dictionary<string, string> parameters =
         new Dictionary<string, string>
             {
                 { "Type", ((int)UserType.Show).ToString() },
                 { "ID", "15411837" }
             };
     string expected = "http://twitter.com/users/show/15411837.json";
     var actual = reqProc.BuildShowUrl(parameters);
     Assert.AreEqual(expected, actual);
 }
 public void BuildShowUrlTest()
 {
     UserRequestProcessor_Accessor<User> reqProc = new UserRequestProcessor_Accessor<User>();
     reqProc.BaseUrl = "http://twitter.com/";
     Dictionary<string, string> parameters =
         new Dictionary<string, string>
             {
                 { "Type", ((int)UserType.Friends).ToString() },
                 { "ID", "15411837" },
                 { "UserID", "15411837" },
                 { "ScreenName", "JoeMayo" }
             };
     string expected = "http://twitter.com/users/show/15411837.json?user_id=15411837&screen_name=JoeMayo";
     var actual = reqProc.BuildShowUrl(parameters);
     Assert.AreEqual(expected, actual);
 }
 public void BuildSearchUrlTest()
 {
     UserRequestProcessor_Accessor<User> reqProc = new UserRequestProcessor_Accessor<User>();
     reqProc.BaseUrl = "https://api.twitter.com/1/";
     Dictionary<string, string> parameters =
         new Dictionary<string, string>
             {
                 { "Type", ((int)UserType.Search).ToString() },
                 { "Query", "Joe Mayo" },
                 { "Page", "2" },
                 { "PerPage", "10" }
             };
     string expected = "https://api.twitter.com/1/users/search.xml?q=Joe+Mayo&page=2&per_page=10";
     var actual = reqProc.BuildURL(parameters);
     Assert.AreEqual(expected, actual);
 }
 public void BuildLookupUserIDUrlTest()
 {
     UserRequestProcessor_Accessor<User> reqProc = new UserRequestProcessor_Accessor<User>();
     reqProc.BaseUrl = "https://api.twitter.com/1/";
     Dictionary<string, string> parameters =
         new Dictionary<string, string>
             {
                 { "Type", ((int)UserType.Lookup).ToString() },
                 { "UserID", "1,2" }
             };
     string expected = "https://api.twitter.com/1/users/lookup.xml?user_id=1,2";
     var actual = reqProc.BuildURL(parameters);
     Assert.AreEqual(expected, actual);
 }
 public void BuildLookupScreenNameUrlWithUserIDAndScreenNameTest()
 {
     UserRequestProcessor_Accessor<User> reqProc = new UserRequestProcessor_Accessor<User>();
     reqProc.BaseUrl = "https://api.twitter.com/1/";
     Dictionary<string, string> parameters =
         new Dictionary<string, string>
             {
                 { "Type", ((int)UserType.Lookup).ToString() },
                 { "ScreenName", "JoeMayo,LinqToTweeter" },
                 { "UserID", "1,2" }
            };
     var actual = reqProc.BuildURL(parameters);
 }
 public void BuildFriendsUrlTest()
 {
     UserRequestProcessor_Accessor<User> reqProc = new UserRequestProcessor_Accessor<User>();
     reqProc.BaseUrl = "http://twitter.com/";
     Dictionary<string, string> parameters =
         new Dictionary<string, string>
             {
                 { "Type", ((int)UserType.Friends).ToString() },
                 { "ID", "15411837" }
             };
     string expected = "http://twitter.com/statuses/friends/15411837.xml";
     var actual = reqProc.BuildFriendsUrl(parameters);
     Assert.AreEqual(expected, actual);
 }
 public void BuildSuggestionCategoryUsersUrlTest()
 {
     UserRequestProcessor_Accessor<User> reqProc = new UserRequestProcessor_Accessor<User>();
     reqProc.BaseUrl = "https://api.twitter.com/1/";
     Dictionary<string, string> parameters =
         new Dictionary<string, string>
             {
                 { "Type", ((int)UserType.Category).ToString() },
                 { "Slug", "twitter" }
             };
     string expected = "https://api.twitter.com/1/users/suggestions/twitter.xml";
     var actual = reqProc.BuildURL(parameters);
     Assert.AreEqual(expected, actual);
 }
 public void BuildLookupScreenNameUrlTest()
 {
     UserRequestProcessor_Accessor<User> reqProc = new UserRequestProcessor_Accessor<User>();
     reqProc.BaseUrl = "https://api.twitter.com/1/";
     Dictionary<string, string> parameters =
         new Dictionary<string, string>
             {
                 { "Type", ((int)UserType.Lookup).ToString() },
                 { "ScreenName", "JoeMayo,LinqToTweeter" }
             };
     string expected = "https://api.twitter.com/1/users/lookup.xml?screen_name=JoeMayo,LinqToTweeter";
     var actual = reqProc.BuildURL(parameters);
     Assert.AreEqual(expected, actual);
 }
 public void BuildSuggestionCategoryUsersUrlWithoutSlugTest()
 {
     UserRequestProcessor_Accessor<User> reqProc = new UserRequestProcessor_Accessor<User>();
     reqProc.BaseUrl = "https://api.twitter.com/1/";
     Dictionary<string, string> parameters =
         new Dictionary<string, string>
             {
                 { "Type", ((int)UserType.Category).ToString() },
             };
     var actual = reqProc.BuildURL(parameters);
 }
 public void BuildFollowersUrlTest()
 {
     UserRequestProcessor_Accessor<User> reqProc = new UserRequestProcessor_Accessor<User>();
     reqProc.BaseUrl = "http://twitter.com/";
     Dictionary<string, string> parameters =
         new Dictionary<string, string>
             {
                 { "Type", ((int)UserType.Followers).ToString() },
                 { "ID", "15411837" },
                 { "UserID", "123" },
                 { "ScreenName", "JoeMayo" },
                 { "Page", "2" }
             };
     string expected = "http://twitter.com/statuses/followers/15411837.xml?user_id=123&screen_name=JoeMayo&page=2";
     var actual = reqProc.BuildFollowersUrl(parameters);
     Assert.AreEqual(expected, actual);
 }