Skip to content

Commit

Permalink
Merge pull request #3822 from SanojPunchihewa/payload-test-update
Browse files Browse the repository at this point in the history
Update payload mediator tests for inline expressions
  • Loading branch information
SanojPunchihewa authored Dec 13, 2024
2 parents 6d45b9d + 3ed170e commit 8db70a0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ public void testPayloadFactoryXMLToJson() throws IOException {
String expectedResponse = "{\n" +
" \"string\": \"John<\",\n" +
" \"escapedObject\": \"<pet><type>cat</type><name>emily\\\\ntini</name></pet>\",\n" +
" \"escapedObject2\": \"<pet2>\\n <type>dog&lt;</type>\\n <name>John\\\\nWayne</name>\\n </pet2>\",\n" +
" \"object\": {\n" +
" \"pet\": {\n" +
" \"type\": \"cat\",\n" +
Expand All @@ -160,6 +161,10 @@ public void testPayloadFactoryXMLToJson() throws IOException {
String requestPayload = "<root>\n" +
" <customer_name>John&lt;</customer_name>\n" +
" <pet><type>cat</type><name>emily\\\\ntini</name></pet>\n" +
" <pet2>\n" +
" <type>dog&lt;</type>\n" +
" <name>John\\\\nWayne</name>\n" +
" </pet2>\n" +
" <path>true</path>\n" +
"</root>";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
<format>{
"string": "${xpath('//root/customer_name/text()')}",
"escapedObject": "${xpath('//root/pet')}",
"escapedObject2": "${xpath('//root/pet2')}",
"object": ${xpath('//root/pet')},
"xml": "${var.id}",
"json": "${var.special_json}"
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1606,7 +1606,7 @@
<version.jaxb.api>2.4.0-b180830.0359</version.jaxb.api>
<com.sun.jaxb.version>2.3.0</com.sun.jaxb.version>
<com.sun.jaxb.impl.version>2.3.1</com.sun.jaxb.impl.version>
<synapse.version>4.0.0-wso2v151</synapse.version>
<synapse.version>4.0.0-wso2v154</synapse.version>
<imp.pkg.version.synapse>[4.0.0, 4.0.1)</imp.pkg.version.synapse>
<carbon.mediation.version>4.7.215</carbon.mediation.version>
<carbon.crypto.version>1.1.3</carbon.crypto.version>
Expand Down

0 comments on commit 8db70a0

Please sign in to comment.