コード例 #1
0
        public void BuildPublicUrlTest()
        {
            var reqProc = new StatusRequestProcessor_Accessor();

            reqProc.BaseUrl = "http://twitter.com/";
            string expected = "http://twitter.com/statuses/public_timeline.xml";
            var    actual   = reqProc.BuildPublicUrl();

            Assert.AreEqual(expected, actual);
        }
コード例 #2
0
        public void BuildFriendAndUrlParametersTest()
        {
            var reqProc = new StatusRequestProcessor_Accessor();
            var url     = "http://twitter.com/statuses/user_timeline/15411837.xml";
            Dictionary <string, string> parameters =
                new Dictionary <string, string>
            {
                { "Page", "0" },
                { "Count", "21" },
                { "SinceID", "934818247" }
            };
            string expected = "http://twitter.com/statuses/user_timeline/15411837.xml?since_id=934818247&count=21&page=0";
            var    actual   = reqProc.BuildFriendRepliesAndUrlParameters(parameters, url);

            Assert.AreEqual(expected, actual);
        }
コード例 #3
0
        public void BuildShowUrlTest()
        {
            var reqProc = new StatusRequestProcessor_Accessor();

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

            Assert.AreEqual(expected, actual);
        }
コード例 #4
0
        public void BuildFriendUrlTest()
        {
            var reqProc = new StatusRequestProcessor_Accessor();

            reqProc.BaseUrl = "http://twitter.com/";
            Dictionary <string, string> parameters =
                new Dictionary <string, string>
            {
                { "Page", "0" },
                { "Count", "21" },
                { "SinceID", "934818247" }
            };
            string expected = "http://twitter.com/statuses/friends_timeline.xml?since_id=934818247&count=21&page=0";
            var    actual   = reqProc.BuildFriendUrl(parameters);

            Assert.AreEqual(expected, actual);
        }
コード例 #5
0
        public void BuildUserUrlTest()
        {
            var reqProc = new StatusRequestProcessor_Accessor();

            reqProc.BaseUrl = "http://twitter.com/";
            Dictionary <string, string> parameters =
                new Dictionary <string, string>
            {
                { "Type", ((int)StatusType.User).ToString() },
                { "ID", "15411837" },
                { "UserID", "15411837" },
                { "ScreenName", "JoeMayo" },
            };
            string expected = "http://twitter.com/statuses/user_timeline/15411837.xml?user_id=15411837&screen_name=JoeMayo";
            var    actual   = reqProc.BuildUserUrl(parameters);

            Assert.AreEqual(expected, actual);
        }
コード例 #6
0
 public void BuildPublicUrlTest()
 {
     var reqProc = new StatusRequestProcessor_Accessor<Status>();
     reqProc.BaseUrl = "http://twitter.com/";
     string expected = "http://twitter.com/statuses/public_timeline.xml";
     var actual = reqProc.BuildPublicUrl();
     Assert.AreEqual(expected, actual);
 }
コード例 #7
0
 public void BuildShowUrlTest()
 {
     var reqProc = new StatusRequestProcessor_Accessor<Status>();
     reqProc.BaseUrl = "http://twitter.com/";
     Dictionary<string, string> parameters =
         new Dictionary<string, string>
             {
                 { "Type", ((int)StatusType.Show).ToString() },
                 { "ID", "945932078" }
             };
     string expected = "http://twitter.com/statuses/show/945932078.xml";
     var actual = reqProc.BuildShowUrl(parameters);
     Assert.AreEqual(expected, actual);
 }
コード例 #8
0
 public void BuildMentionsUrlTest()
 {
     var reqProc = new StatusRequestProcessor_Accessor<Status>();
     reqProc.BaseUrl = "http://twitter.com/";
     Dictionary<string, string> parameters =
         new Dictionary<string, string>
             {
                 { "Page", "0" },
                 { "SinceID", "934818247" }
             };
     string expected = "http://twitter.com/statuses/mentions.xml?since_id=934818247&page=0";
     var actual = reqProc.BuildMentionsUrl(parameters);
     Assert.AreEqual(expected, actual);
 }
コード例 #9
0
 public void BuildFriendAndUrlParametersTest()
 {
     var reqProc = new StatusRequestProcessor_Accessor<Status>();
     var url = "http://twitter.com/statuses/user_timeline/15411837.xml";
     Dictionary<string, string> parameters =
         new Dictionary<string, string>
             {
                 { "Page", "0" },
                 { "Count", "21" },
                 { "SinceID", "934818247" }
             };
     string expected = "http://twitter.com/statuses/user_timeline/15411837.xml?since_id=934818247&count=21&page=0";
     var actual = reqProc.BuildFriendRepliesAndUrlParameters(parameters, url);
     Assert.AreEqual(expected, actual);
 }
コード例 #10
0
 public void TwypocalypseStatusIDUrlTest()
 {
     var reqProc = new StatusRequestProcessor_Accessor<Status>();
     reqProc.BaseUrl = "http://twitter.com/";
     var twypocalypseID = ulong.MaxValue.ToString();
     Dictionary<string, string> parameters =
         new Dictionary<string, string>
             {
                 { "ID", twypocalypseID }
             };
     string expected = "http://twitter.com/statuses/show/18446744073709551615.xml";
     var actual = reqProc.BuildShowUrl(parameters);
     Assert.AreEqual(expected, actual);
 }
コード例 #11
0
 public void TwypocalypseSinceIDUrlTest()
 {
     var reqProc = new StatusRequestProcessor_Accessor<Status>();
     reqProc.BaseUrl = "http://twitter.com/";
     var twypocalypseID = ulong.MaxValue.ToString();
     Dictionary<string, string> parameters =
         new Dictionary<string, string>
             {
                 { "Type", ((int)StatusType.User).ToString() },
                 { "ID", "15411837" },
                 { "UserID", "15411837" },
                 { "SinceID", twypocalypseID },
                 { "ScreenName", "JoeMayo" },
             };
     string expected = "http://twitter.com/statuses/user_timeline/15411837.xml?user_id=15411837&screen_name=JoeMayo&since_id=18446744073709551615";
     var actual = reqProc.BuildUserUrl(parameters);
     Assert.AreEqual(expected, actual);
 }
コード例 #12
0
 public void BuildUserUrlTest()
 {
     var reqProc = new StatusRequestProcessor_Accessor<Status>();
     reqProc.BaseUrl = "http://twitter.com/";
     Dictionary<string, string> parameters =
         new Dictionary<string, string>
             {
                 { "Type", ((int)StatusType.User).ToString() },
                 { "ID", "15411837" },
                 { "UserID", "15411837" },
                 { "ScreenName", "JoeMayo" },
             };
     string expected = "http://twitter.com/statuses/user_timeline/15411837.xml?user_id=15411837&screen_name=JoeMayo";
     var actual = reqProc.BuildUserUrl(parameters);
     Assert.AreEqual(expected, actual);
 }