Esempio n. 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (TweetTextBox.Text == "")
     {
         MessageBox.Show("Please enter some text to tweet");
     }
     else
     {
         mytwitter.SendTweet(TweetTextBox.Text);
         TweetTextBox.Text = "";
     }
 }
Esempio n. 2
0
        //Expect no exceptions with valid credentials
        public void SendTweetUsingValidCredentialsTest()
        {
            MyTwitter twitter = new MyTwitter(MyTwitter.consumerKey2, MyTwitter.consumerSecret2, MyTwitter.accessToken2, MyTwitter.accessTokenSecret2);

            twitter.SendTweet(string.Empty);
        }
Esempio n. 3
0
        public void SendTweetUsingNullCredentialsTest()
        {
            MyTwitter twitter = new MyTwitter(MyTwitter.consumerKeyNull, MyTwitter.consumerSecretNull, MyTwitter.accessTokenNull, MyTwitter.accessTokenSecretNull);

            Assert.Throws <InvalidOperationException>(() => twitter.SendTweet(string.Empty));
        }