use of cn.beecloud.entity.BCQueryCountResult in project ttdj by soonphe.
the class BCQueryTest method testQueryRefundsCountAsyncTestMode.
/**
* #4
* test mode
* @throws Exception
*/
@Test
public void testQueryRefundsCountAsyncTestMode() throws Exception {
BeeCloud.setSandbox(true);
BCQuery.QueryParams queryParams = new BCQuery.QueryParams();
queryParams.channel = BCReqParams.BCChannelTypes.WX;
query.queryRefundsCountAsync(queryParams, new BCCallback() {
@Override
public void done(BCResult result) {
Assert.assertTrue(result instanceof BCQueryCountResult);
BCQueryCountResult countResult = (BCQueryCountResult) result;
Assert.assertEquals(BCRestfulCommonResult.APP_INNER_FAIL_NUM, countResult.getResultCode());
Assert.assertEquals("该功能暂不支持测试模式", countResult.getErrDetail());
latch.countDown();
}
});
latch.await(2000, TimeUnit.MILLISECONDS);
}
use of cn.beecloud.entity.BCQueryCountResult in project ttdj by soonphe.
the class BCQueryTest method testQueryBillsCountAsyncChannelInvalid.
/**
* #1
* 测试channel为null
* @throws Exception
*/
@Test
public void testQueryBillsCountAsyncChannelInvalid() throws Exception {
BCQuery.QueryParams queryParams = new BCQuery.QueryParams();
queryParams.channel = null;
query.queryBillsCountAsync(queryParams, new BCCallback() {
@Override
public void done(BCResult result) {
Assert.assertTrue(result instanceof BCQueryCountResult);
BCQueryCountResult countResult = (BCQueryCountResult) result;
Assert.assertEquals(BCRestfulCommonResult.APP_INNER_FAIL_NUM, countResult.getResultCode());
latch.countDown();
}
});
latch.await(2000, TimeUnit.MILLISECONDS);
}
Aggregations