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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }
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); }