Refactor response generation and xmls
This commit is contained in:
parent
ba63d36fa0
commit
0bfa0d91b4
8 changed files with 50 additions and 36 deletions
|
@ -29,10 +29,10 @@ class ServerMockPT extends Specification {
|
|||
int port = 9000 + (current % 7)
|
||||
controlServerClient.addMock(new AddMockRequestData(
|
||||
name: "testRest$current",
|
||||
path: "/testEndpoint$endpointNumber",
|
||||
path: "testEndpoint$endpointNumber",
|
||||
port: port,
|
||||
predicate: """{xml -> xml.name() == 'request$current'}""",
|
||||
response: """{xml -> "<goodResponse$current/>"}"""
|
||||
predicate: """{req -> req.xml.name() == 'request$current'}""",
|
||||
response: """{req -> "<goodResponse$current/>"}"""
|
||||
))
|
||||
HttpPost restPost = new HttpPost("http://localhost:$port/testEndpoint$endpointNumber")
|
||||
restPost.entity = new StringEntity("<request$current/>", ContentType.create("text/xml", "UTF-8"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue