This commit is contained in:
tanghc
2021-04-01 18:11:07 +08:00
parent ef0c09cb02
commit 31202908a4
23 changed files with 57 additions and 24 deletions

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee.sop</groupId>
<artifactId>sop-parent</artifactId>
<version>4.3.3-SNAPSHOT</version>
<version>4.3.4-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <!-- lookup parent from repository -->
</parent>

View File

@@ -404,6 +404,24 @@ public class AllInOneTest extends TestBase {
client.execute(requestBuilder);
}
public void testParamBind() {
Client.RequestBuilder requestBuilder = new Client.RequestBuilder()
.method("story.system.param.get4")
.version("1.0")
.bizContent(new BizContent().add("id", "1").add("name", "葫芦娃"))
.postJson(true)
.httpMethod(HttpTool.HTTPMethod.POST)
.callback((requestInfo, responseData) -> {
System.out.println(responseData);
String node = requestInfo.getDataNode();
JSONObject jsonObject = JSON.parseObject(responseData).getJSONObject(node);
Assert.assertEquals(1L, jsonObject.getLongValue("id"));
Assert.assertEquals("葫芦娃", jsonObject.getString("name"));
});
client.execute(requestBuilder);
}
static class BizContent extends HashMap<String, Object> {
public BizContent add(String key, Object value) {
this.put(key, value);