@Test public void testQueryRefundsAsyncByBean() throws Exception { final BCHttpClientUtil.Response response = new BCHttpClientUtil.Response(); response.code = 200; response.content = "{\"result_msg\":\"OK\",\"err_detail\":\"\",\"result_code\":0,\"refunds\":[{\"refund_no\":\"201511141447430832000\"}]}"; PowerMockito.stub(PowerMockito.method(BCHttpClientUtil.class, "httpGet", String.class)).toReturn(response); BCQuery.QueryParams queryParams = new BCQuery.QueryParams(); queryParams.channel = BCReqParams.BCChannelTypes.UN; queryParams.refundNum = "refundnum"; queryParams.billNum = "billnum"; query.queryRefundsAsync(queryParams, new BCCallback() { @Override public void done(BCResult result) { Assert.assertTrue(result instanceof BCQueryRefundsResult); BCQueryRefundsResult refundsResult = (BCQueryRefundsResult) result; Assert.assertEquals((Integer) 0, refundsResult.getResultCode()); Assert.assertEquals((int) refundsResult.getCount(), refundsResult.getRefunds().size()); BCRefundOrder refundOrder = refundsResult.getRefunds().get(0); Assert.assertEquals("201511141447430832000", refundOrder.getRefundNum()); latch.countDown(); } }); latch.await(2000, TimeUnit.MILLISECONDS); }
public void queryRefundsAsync(final BCReqParams.BCChannelTypes channel, final String billNum, final String refundNum, final Long startTime, final Long endTime, final Integer skip, final Integer limit, final BCCallback callback) { queryOrdersAsync(channel, QueryOrderType.QUERY_REFUNDS, billNum, null, refundNum, null, startTime, endTime, skip, limit, null, callback); }
BCQuery { public void queryRefundsAsync(final BCReqParams.BCChannelTypes channel, final String billNum, final String refundNum, final Long startTime, final Long endTime, final Integer skip, final Integer limit, final BCCallback callback) { queryOrdersAsync(channel, QueryOrderType.QUERY_REFUNDS, billNum, null, refundNum, null, startTime, endTime, skip, limit, null, callback); } }
BCQuery { public void queryRefundsAsync(final BCReqParams.BCChannelTypes channel, final String billNum, final String refundNum, final Long startTime, final Long endTime, final Integer skip, final Integer limit, final BCCallback callback) { queryOrdersAsync(channel, QueryOrderType.QUERY_REFUNDS, billNum, null, refundNum, null, startTime, endTime, skip, limit, null, callback); } private  BCQuery(); }
BCQuery { public void queryRefundsAsync(final BCReqParams.BCChannelTypes channel, final String billNum, final String refundNum, final Long startTime, final Long endTime, final Integer skip, final Integer limit, final BCCallback callback) { queryOrdersAsync(channel, QueryOrderType.QUERY_REFUNDS, billNum, null, refundNum, null, startTime, endTime, skip, limit, null, callback); } private  BCQuery(); synchronized static BCQuery getInstance(); void queryBillsAsync(final BCReqParams.BCChannelTypes channel, final String billNum,
                                final Long startTime, final Long endTime,
                                final Integer skip, final Integer limit, final BCCallback callback); void queryBillsAsync(final BCReqParams.BCChannelTypes channel, final BCCallback callback); void queryBillsAsync(final BCReqParams.BCChannelTypes channel, final String billNum, final BCCallback callback); void queryBillsAsync(final QueryParams queryParams, final BCCallback callback); void queryRefundsAsync(final BCReqParams.BCChannelTypes channel, final String billNum, final String refundNum,
                                final Long startTime, final Long endTime,
                                final Integer skip, final Integer limit, final BCCallback callback); void queryRefundsAsync(final BCReqParams.BCChannelTypes channel, final BCCallback callback); void queryRefundsAsync(final BCReqParams.BCChannelTypes channel, final String billNum,
                                  final String refundNum, final BCCallback callback); void queryRefundsAsync(final QueryParams queryParams, final BCCallback callback); void queryBillsCountAsync(final QueryParams queryParams, final BCCallback callback); void queryRefundsCountAsync(final QueryParams queryParams, final BCCallback callback); void queryRefundStatusAsync(final BCReqParams.BCChannelTypes channel, final String refundNum,
                                       final BCCallback callback); void queryBillByIDAsync(final String id, final BCCallback callback); void queryRefundByIDAsync(final String id, final BCCallback callback); void queryOfflineBillStatusAsync(final BCReqParams.BCChannelTypes channelType,
                                          final String billNum,
                                          final BCCallback callback); void subscriptionSupportedBanks(final BCCallback callback); void queryPlans(final BCPlanCriteria criteria, final BCCallback callback); void querySubscriptions(final BCSubscriptionCriteria criteria, final BCCallback callback); }
BCQuery { public void queryRefundsAsync(final BCReqParams.BCChannelTypes channel, final String billNum, final String refundNum, final Long startTime, final Long endTime, final Integer skip, final Integer limit, final BCCallback callback) { queryOrdersAsync(channel, QueryOrderType.QUERY_REFUNDS, billNum, null, refundNum, null, startTime, endTime, skip, limit, null, callback); } private  BCQuery(); synchronized static BCQuery getInstance(); void queryBillsAsync(final BCReqParams.BCChannelTypes channel, final String billNum,
                                final Long startTime, final Long endTime,
                                final Integer skip, final Integer limit, final BCCallback callback); void queryBillsAsync(final BCReqParams.BCChannelTypes channel, final BCCallback callback); void queryBillsAsync(final BCReqParams.BCChannelTypes channel, final String billNum, final BCCallback callback); void queryBillsAsync(final QueryParams queryParams, final BCCallback callback); void queryRefundsAsync(final BCReqParams.BCChannelTypes channel, final String billNum, final String refundNum,
                                final Long startTime, final Long endTime,
                                final Integer skip, final Integer limit, final BCCallback callback); void queryRefundsAsync(final BCReqParams.BCChannelTypes channel, final BCCallback callback); void queryRefundsAsync(final BCReqParams.BCChannelTypes channel, final String billNum,
                                  final String refundNum, final BCCallback callback); void queryRefundsAsync(final QueryParams queryParams, final BCCallback callback); void queryBillsCountAsync(final QueryParams queryParams, final BCCallback callback); void queryRefundsCountAsync(final QueryParams queryParams, final BCCallback callback); void queryRefundStatusAsync(final BCReqParams.BCChannelTypes channel, final String refundNum,
                                       final BCCallback callback); void queryBillByIDAsync(final String id, final BCCallback callback); void queryRefundByIDAsync(final String id, final BCCallback callback); void queryOfflineBillStatusAsync(final BCReqParams.BCChannelTypes channelType,
                                          final String billNum,
                                          final BCCallback callback); void subscriptionSupportedBanks(final BCCallback callback); void queryPlans(final BCPlanCriteria criteria, final BCCallback callback); void querySubscriptions(final BCSubscriptionCriteria criteria, final BCCallback callback);  }