示例#1
0
        public void HCCheckResultTestErr()
        {
            HttpResponseMessage rsp = new HttpResponseMessage(System.Net.HttpStatusCode.BadGateway);

            rsp.Content =
                new StringContent("{\"code\":0,\"data\":\"bfec0163 - dd56 - 473e-b11f - 6d5845e1b684\", \"description\":\"Operation success.\"}"
                                  , Encoding.UTF8, "application/json");
            JObject jObject = _esSession.HCCheckResult("https://127.0.0.1", rsp);

            Console.WriteLine(jObject);
            // Assert.AreEqual(CoreUtil.GetObjTranNull<int>(jObject.Property("code")), 0);
        }