Skip to content

Commit efc8a59

Browse files
committed
Merge pull request #2 from mooreds/issue_32_put_breaks_on_escaped_chars
test case that illuminates issue 32
2 parents 021b7d8 + 1b62315 commit efc8a59

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<tc:testcase xmlns:tc="http://restsql.org/schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://restsql.org/schema ServiceTestCaseDefinition.xsd ">
4+
<setup>
5+
<sql>INSERT INTO actor (actor_id,first_name,last_name) VALUES (1000,'John','Smith')</sql>
6+
<sql>INSERT INTO actor (actor_id,first_name,last_name) VALUES (1001,'Sally','Johnson')</sql>
7+
</setup>
8+
<step name="execute">
9+
<request method="PUT" uri="res/SingleTable" contentType="application/json" accept="application/xml">
10+
<body>
11+
<![CDATA[
12+
{ "actors": [
13+
{ "id": "1000", "first_name": "_Jack", "surname": "%3CDaniels" },
14+
{ "id": "1001", "first_name": "_Jack", "surname": "Smith" }
15+
]
16+
}
17+
]]>
18+
</body>
19+
</request>
20+
<response>
21+
<body>
22+
<![CDATA[
23+
<writeResponse rowsAffected="2" />
24+
]]>
25+
</body>
26+
</response>
27+
</step>
28+
29+
<step name="verify">
30+
<request method="GET" uri="res/SingleTable?first_name=_Jack" accept="application/json" />
31+
<response>
32+
<body>
33+
<![CDATA[
34+
{ "actors": [
35+
{ "id": 1000, "first_name": "_Jack", "surname": "%3CDaniels" },
36+
{ "id": 1001, "first_name": "_Jack", "surname": "Smith" }
37+
]
38+
}
39+
]]>
40+
</body>
41+
</response>
42+
</step>
43+
44+
<teardown>
45+
<sql>DELETE FROM actor where actor_id between 1000 and 1100</sql>
46+
</teardown>
47+
</tc:testcase>

0 commit comments

Comments
 (0)