diff options
author | Smokowski, Kevin (ks6305) <kevin.smokowski@att.com> | 2019-12-18 21:29:24 +0000 |
---|---|---|
committer | Smokowski, Kevin (ks6305) <kevin.smokowski@att.com> | 2019-12-18 21:46:54 +0000 |
commit | 767b8eac24dba80a8aa815879c13b721015b7ab4 (patch) | |
tree | 71065a9309de1e2f4410a5d99197526e5ade1dee /restapi-call-node/provider/src/test/resources | |
parent | dffc1fd635470b0fc0e940f78e69d8f0ab0d14f0 (diff) |
RestapiCallNode unit tests
Validate JsonParser in RestapiCallNode
Issue-ID: CCSDK-2008
Signed-off-by: Smokowski, Kevin (ks6305) <kevin.smokowski@att.com>
Change-Id: Idd062d9614b89b1c0142591af600ea8ff61c019a
Diffstat (limited to 'restapi-call-node/provider/src/test/resources')
7 files changed, 136 insertions, 0 deletions
diff --git a/restapi-call-node/provider/src/test/resources/2dArray.json b/restapi-call-node/provider/src/test/resources/2dArray.json new file mode 100644 index 000000000..b473864d8 --- /dev/null +++ b/restapi-call-node/provider/src/test/resources/2dArray.json @@ -0,0 +1,4 @@ +[
+ ["apple", "orange", "banana"],
+ ["squash", "broccoli", "cauliflower"]
+]
\ No newline at end of file diff --git a/restapi-call-node/provider/src/test/resources/3dArray.json b/restapi-call-node/provider/src/test/resources/3dArray.json new file mode 100644 index 000000000..149955596 --- /dev/null +++ b/restapi-call-node/provider/src/test/resources/3dArray.json @@ -0,0 +1,4 @@ +[
+ [["a","b","c"], ["d","e","f"]],
+ [["x","y","z"]]
+]
\ No newline at end of file diff --git a/restapi-call-node/provider/src/test/resources/ArrayMenu.json b/restapi-call-node/provider/src/test/resources/ArrayMenu.json new file mode 100644 index 000000000..b12f16315 --- /dev/null +++ b/restapi-call-node/provider/src/test/resources/ArrayMenu.json @@ -0,0 +1,41 @@ +[{
+ "id": "1",
+ "type": "pizza",
+ "name": "plain",
+ "calories": 1000,
+ "vegetarian": true
+ }, {
+ "id": "2",
+ "type": "pizza",
+ "name": "Tuesday Special",
+ "calories": 2000,
+ "vegetarian": false,
+ "topping":
+ [{
+ "id": "1",
+ "name": "onion"
+ }, {
+ "id": "2",
+ "name": "pepperoni"
+ }
+ ]
+ }, {
+ "id": "3",
+ "type": "pizza",
+ "name": "House Special",
+ "calories": 1500,
+ "vegetarian": true,
+ "topping":
+ [{
+ "id": "3",
+ "name": "basil"
+ }, {
+ "id": "4",
+ "name": "fresh mozzarella"
+ }, {
+ "id": "5",
+ "name": "tomato"
+ }
+ ]
+ }
+]
diff --git a/restapi-call-node/provider/src/test/resources/EmbeddedEscapedJson.json b/restapi-call-node/provider/src/test/resources/EmbeddedEscapedJson.json new file mode 100644 index 000000000..dbb6d8d3a --- /dev/null +++ b/restapi-call-node/provider/src/test/resources/EmbeddedEscapedJson.json @@ -0,0 +1,16 @@ +{
+ "input": {
+ "parameters":
+ [{
+ "name": "escapedJsonObject",
+ "value": "[{\"id\":\"0.2.0.0\/16\"},{\"id\":\"ge04::\/64\"}]"
+ }, {
+ "name": "password",
+ "value": "Hello\/World"
+ }, {
+ "name": "resourceName",
+ "value": "The\t\"Best\"\tName"
+ }
+ ]
+ }
+}
\ No newline at end of file diff --git a/restapi-call-node/provider/src/test/resources/EscapedJson.json b/restapi-call-node/provider/src/test/resources/EscapedJson.json new file mode 100644 index 000000000..a7719e819 --- /dev/null +++ b/restapi-call-node/provider/src/test/resources/EscapedJson.json @@ -0,0 +1 @@ +{\"widget\":{\"debug\":false,\"window\":{\"title\":\"ONAP Widget\",\"name\":\"main_window\",\"width\":200,\"height\":300},\"image\":{\"src\":\"images\/moon.png\",\"name\":\"moon\",\"hOffset\":150,\"vOffset\":150,\"alignment\":\"center\"},\"text\":{\"data\":\"Click Me\",\"size\":21,\"style\":\"bold\",\"name\":\"text1\",\"hOffset\":350,\"vOffset\":200,\"alignment\":\"center\"}}}
\ No newline at end of file diff --git a/restapi-call-node/provider/src/test/resources/ObjectMenu.json b/restapi-call-node/provider/src/test/resources/ObjectMenu.json new file mode 100644 index 000000000..56f842d48 --- /dev/null +++ b/restapi-call-node/provider/src/test/resources/ObjectMenu.json @@ -0,0 +1,43 @@ +{
+ "menu": [{
+ "id": "1",
+ "type": "pizza",
+ "name": "plain",
+ "calories": 1000,
+ "vegetarian": true
+ }, {
+ "id": "2",
+ "type": "pizza",
+ "name": "Tuesday Special",
+ "calories": 2000,
+ "vegetarian": false,
+ "topping":
+ [{
+ "id": "1",
+ "name": "onion"
+ }, {
+ "id": "2",
+ "name": "pepperoni"
+ }
+ ]
+ }, {
+ "id": "3",
+ "type": "pizza",
+ "name": "House Special",
+ "calories": 1500,
+ "vegetarian": true,
+ "topping":
+ [{
+ "id": "3",
+ "name": "basil"
+ }, {
+ "id": "4",
+ "name": "fresh mozzarella"
+ }, {
+ "id": "5",
+ "name": "tomato"
+ }
+ ]
+ }
+ ]
+}
diff --git a/restapi-call-node/provider/src/test/resources/Widget.json b/restapi-call-node/provider/src/test/resources/Widget.json new file mode 100644 index 000000000..1e25282c2 --- /dev/null +++ b/restapi-call-node/provider/src/test/resources/Widget.json @@ -0,0 +1,27 @@ +{
+ "widget": {
+ "debug": false,
+ "window": {
+ "title": "ONAP Widget",
+ "name": "main_window",
+ "width": 200,
+ "height": 300
+ },
+ "image": {
+ "src": "images/moon.png",
+ "name": "moon",
+ "hOffset": 150,
+ "vOffset": 150,
+ "alignment": "center"
+ },
+ "text": {
+ "data": "Click Me",
+ "size": 21,
+ "style": "bold",
+ "name": "text1",
+ "hOffset": 350,
+ "vOffset": 200,
+ "alignment": "center"
+ }
+ }
+}
\ No newline at end of file |