mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 12:56:28 +08:00
4.3.4
This commit is contained in:
@@ -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>
|
||||
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user