Esempio n. 1
0
        public void HiReadHistoryMessageTest()
        {
            string Response = HTTPUtility.GetResponse(domainUrl + HiReadHistoryMessageUrl, posttemp);

            Assert.IsTrue(Response.Contains("\"success\":true"), Response);
            Console.WriteLine(HTTPUtility.timeSpan.TotalMilliseconds + " ms");
        }
Esempio n. 2
0
        public void HiFindRecentRepliedStaffIdTest()
        {
            string Response = HTTPUtility.GetResponse(domainUrl + HiFindRecentRepliedStaffIdUrl, posttemp);

            Assert.IsTrue(Response.Contains("\"success\":true"), Response);
            Console.WriteLine(HTTPUtility.timeSpan.TotalMilliseconds + " ms");
        }
        public void Propose()
        {
            String Content1 = contenttemplate.Replace("{1}", "求婚").Replace("{2}", "wx431d7a5c91fac96d");
            string Response = HTTPUtility.GetResponse(domainUrl, Content1);

            Assert.IsTrue(HTTPUtility.GetSourceUrl(Response));
            Console.WriteLine(HTTPUtility.timeSpan.TotalMilliseconds + " ms");
        }
        public void LiuBeiTriggerTest()
        {
            String Content1 = contenttemplate.Replace("{1}", "刘备").Replace("{2}", "wx81d59146963e638d");
            string Response = HTTPUtility.GetResponse(domainUrl, Content1);

            Assert.IsTrue(HTTPUtility.GetSourceUrl(Response));
            Console.WriteLine(HTTPUtility.timeSpan.TotalMilliseconds + " ms");
        }
        public void Moshou()
        {
            String Content1 = LongContentTemplate.Replace("{1}", "魔兽");
            string Response = HTTPUtility.GetResponse(domainUrl, Content1);

            Assert.IsTrue(HTTPUtility.GetSourceUrl(Response));
            Console.WriteLine(HTTPUtility.timeSpan.TotalMilliseconds + " ms");
        }
Esempio n. 6
0
        public void Is_SendMessage_equalTo_GetLatestMsg()
        {
            List <string> ids = new List <string>();
            string        HiSendMessageResonse     = HTTPUtility.GetResponse(domainUrl + HiSendMessageUrl, MesTemp);
            double        HiSendMessageResonseTime = HTTPUtility.timeSpan.TotalMilliseconds;
            int           HiSendMessageIndex       = HiSendMessageResonse.IndexOf("id", 0);
            string        Message = HiSendMessageResonse.Substring(HiSendMessageIndex + 4, 10);
            string        HiReadLatestMessagResonse = HTTPUtility.GetResponse(domainUrl + HiReadLatestMessageUrl, posttemp);
            int           index = HiReadLatestMessagResonse.IndexOf("MessageId", 0);

            while (index < HiReadLatestMessagResonse.Length && index > 0)
            {
                ids.Add(HiReadLatestMessagResonse.Substring(index + 11, 10));
                index = HiReadLatestMessagResonse.IndexOf("MessageId", index + 22);
            }
            Assert.IsTrue(ids[ids.Count - 1].Equals(Message), "HiSendMessageResonse:" + ids[ids.Count - 1] + "\tHiReadLatestMessagResonse:" + HiReadLatestMessagResonse);
            Console.WriteLine(HiSendMessageResonseTime + HTTPUtility.timeSpan.TotalMilliseconds + " ms");
        }