Example #1
0
        public void SendMsg()
        {
            var c = new Crawler(username, pwd);
            var r = c.SendTextMsg("1100424900", "sorry ,just for test");
            
            Debug.WriteLine(r.msg);

            Assert.IsTrue(r.IsSuccess);
        }
        public void SendTextMsg()
        {
            var list = new List<string>
            {
                "2080509240",//弟弟
                "1100424900", //我 
                "1326394260", //晓亮 
                "2740860201" //尹
            };

            var start = DateTime.Now.Ticks;

            var count = 0;
            var c = new Crawler(username, pwd) { NoPreLoginCheck = true };
            while (count++ < 10)
            {
                list.ForEach(s =>
                {
                    var r = c.SendTextMsg(s, string.Format("{0}sorry,just for test at {1}", 1, DateTime.Now));
                    Debug.WriteLine(r.err_msg);
                });
                Thread.Sleep(1 * 1);
            }


            Debug.WriteLine(count);

            var end = DateTime.Now.Ticks;
            Debug.Print("耗时:{0}秒", (end - start) / 10000 / 1000);

            //var r = c.SendTextMsg("1100424900", "sorry ,just for test");

            //Assert.IsTrue(r.IsSuccess);
            //Assert.AreEqual(10, count);
        }
Example #3
0
        public void SendMsg()
        {
            var list = new List<string>
            {
                "2080509240",//弟弟
                "1100424900", //我 
                "2740860201" //尹
            };


            var count = 0;
            while (count++ < 1)
            {
                var c = new Crawler(username, pwd);
                list.ForEach(s =>
                {
                    var r = c.SendTextMsg(s, string.Format("{0}sorry,just for test at {1}", 1, DateTime.Now));
                    Debug.WriteLine(r.msg);
                });
                Thread.Sleep(1 * 1000);
            }


            Debug.WriteLine("");
            //var r = c.SendTextMsg("1100424900", "sorry ,just for test");

            //Assert.IsTrue(r.IsSuccess);
            //Assert.AreEqual(10, count);
        }