Esempio n. 1
0
 public void Common_Correct()
 {
     GetStat.Username = Settings.username;
     Api.Send(GetStat, false).Wait();
     Assert.IsTrue(GetStat.IsOk, "get fails");
     PostTweet.Status = MakeUnique(GetStat.StatTextForTweet);
     Api.Send(PostTweet, false).Wait();
     Assert.IsTrue(PostTweet.IsOk, "post fails");
 }
Esempio n. 2
0
        public void PostTweetWrongKeys_ErrorMessage()
        {
            var Api_backup = Api;

            Api = new TwitterApi(Settings.oauth_consumer_key, Settings.oauth_token, Settings.consumer_secret, "");
            PostTweet.Status = MakeUnique("NoToken");
            Api.Send(PostTweet, false).Wait();
            Api = Api_backup;
            Assert.IsTrue(PostTweet.Error == "Unauthorized. Please check keys");
        }
Esempio n. 3
0
        public void GetStatWrongKeys_ErrorMessage()
        {
            var Api_backup = Api;

            Api = new TwitterApi(Settings.oauth_consumer_key, Settings.oauth_token, Settings.consumer_secret, "");
            GetStat.Username = Settings.username;
            Api.Send(GetStat, false).Wait();
            Api = Api_backup;
            Assert.IsTrue(GetStat.Error == "Unauthorized. Please check keys");
        }
Esempio n. 4
0
        public async Task SignedStatusesUpdate_GotContent()
        {
            var query = new StatusesUpdate()
            {
                Status = String.Format("{0}{2}{1}", "@Mike__Void", TwitterOAuth.NewNonce(), Environment.NewLine), InReplyId = "996346241826131969"
            };
            await Api.Send(query, false);

            Assert.IsTrue(!string.IsNullOrEmpty(query.RawContent));
        }