BatchRequestBuilderErrors.java 文件源码

java
阅读 27 收藏 0 点赞 0 评论 0

项目:simple-json-rpc 作者:
@Test
public void testNotJsonResponse() {
    thrown.expect(IllegalStateException.class);
    thrown.expectMessage(new StringStartsWith("Unable parse a JSON response"));

    JsonRpcClient client = new JsonRpcClient(new Transport() {
        @NotNull
        @Override
        public String pass(@NotNull String request) throws IOException {
            return "test data";
        }
    });
    client.createBatchRequest()
            .add(1L, "findPlayer", "Steven", "Stamkos")
            .add(2L, "findPlayer", "Vladimir", "Sobotka")
            .returnType(Player.class)
            .execute();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号