Exemple #1
0
        public void Add_A_Status_With_Picture_Test()
        {
            // Arrange
            var text = "���Է�ͼƬ΢�� " + DateTime.Now.ToLongTimeString();
            var request = new SinaStatusUploadRequest(text, "c:\\Unnamed.jpg");

            // Act
            var status = WeiboClient.Post(request).Status;

            // Assert
            Assert.IsNotNull(status);
            Assert.AreEqual(text, status.Text);
        }
Exemple #2
0
        public void Add_A_Status_With_Picture_Test()
        {
            // Arrange
            var text    = "▓Р╩ниб═╝кг╬б▓Е " + DateTime.Now.ToLongTimeString();
            var request = new SinaStatusUploadRequest(text, "c:\\Unnamed.jpg");

            // Act
            var status = WeiboClient.Post(request).Status;

            // Assert
            Assert.IsNotNull(status);
            Assert.AreEqual(text, status.Text);
        }
Exemple #3
0
 /// <summary>
 /// 发送一条带图片的微博
 /// </summary>
 /// <param name="weibo">微博内容</param>
 /// <param name="pic">图片本地地址</param>
 public void SendWeiboWithPicture(string weibo, string pic)
 {
     var requst = new SinaStatusUploadRequest(weibo, pic);
     _weiboClient.Post(requst);
 }