@Test
public void testUnexpectedResult() {
thrown.expect(IllegalStateException.class);
thrown.expectMessage(new StringStartsWith("Neither result or error is set in response"));
JsonRpcClient client = new JsonRpcClient(new Transport() {
@NotNull
@Override
public String pass(@NotNull String request) throws IOException {
return "[{\n" +
" \"jsonrpc\": \"2.0\",\n" +
" \"id\": 1\n" +
"}]";
}
});
client.createBatchRequest()
.add(1L, "findPlayer", "Steven", "Stamkos")
.add(2L, "findPlayer", "Vladimir", "Sobotka")
.returnType(Player.class)
.execute();
}
BatchRequestBuilderErrors.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:simple-json-rpc
作者:
评论列表
文章目录