Example #1
0
        public async void Test_JdUnionOpenOrderQuery()
        {
            var req = new JdUnionOpenOrderQueryRequest(_appKey, _appSecret)
            {
                Type     = 1,
                Time     = DateTime.Now.ToString("yyyyMMddHHmm"),
                PageSize = 10,
                PageNo   = 1
            };
            var res = await req.InvokeAsync();

            _output.WriteLine(JsonConvert.SerializeObject(req.DebugInfo, Formatting.Indented));
            Assert.True(res.Code == 200);
        }
Example #2
0
        public async void Test_JdUnionOpenOrderQuery_Config()
        {
            var req = new JdUnionOpenOrderQueryRequest
            {
                Type     = 1,
                Time     = DateTime.Now.ToString("yyyyMMddHHmm"),
                PageSize = 10,
                PageNo   = 1
            };

            try
            {
                await req.InvokeAsync();
            }
            finally
            {
                var json = JsonConvert.SerializeObject(req.DebugInfo, Formatting.Indented);
                _output.WriteLine(json);
                Assert.Contains("无效app_key:todo", json); // 配置了无效的appkey ,此处断言app_key读取就ok了
            }
        }