...
Data Used for Testing
# | xpath | attributes |
---|---|---|
1 | /dmi-registry/cm-handles[@id='PNFDemo']/public-properties[@name='Contact2'] | {"name": "Contact2", "value": "storeemail2@bookstore.com"} |
2 | /dmi-registry/cm-handles[@id='PNFDemo']/public-properties[@name='Contact'] | {"name": "Contact", "value": "newemailforstore@bookstore.com"} |
3 | /dmi-registry/cm-handles[@id='Bookstore5']/public-properties[@name='color'] | {"name": "color", "value": "won't match"} |
24 | /dmi-registry/cm-handles[@id='Bookstore4']/public-properties[@name='color'] | {"name": "color", "value": ""} |
35 | /dmi-registry/cm-handles[@id='Bookstore3']/public-properties[@name='color'] | {"name": "color", "value": "red"} |
46 | /dmi-registry/cm-handles[@id='Bookstore2']/public-properties[@name='Contact'] | {"name": "Contact", "value": "newemailforstore2@newemailforstore2@bookstore.com"} |
57 | /dmi-registry/cm-handles[@id='Bookstore1']/public-properties[@name='Contact'] | {"name": "Contact", "value": "newemailforstore@bookstore.com"} |
68 | /dmi-registry/cm-handles[@id='Bookstore6']/public-properties[@name='color'] | {"name": "color", "value": "12345"} |
79 | /dmi-registry/cm-handles[@id='Bookstore7']/public-properties[@name='color'] | {"name": "color", "value": "12345"} |
810 | /dmi-registry/cm-handles[@id='Bookstore8']/public-properties[@name='size'] | {"name": "size", "value": "large"} |
911 | /dmi-registry/cm-handles[@id='Bookstore8']/public-properties[@name='color'] | {"name": "color", "value": "red"} |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{ "dmiPlugin": "http://172.24.170.77:8783", "createdCmHandles": [ { "cmHandle": "Bookstore1", "publicCmHandleProperties": { "Contact": "newemailforstore@bookstore.com" } }, { "cmHandle": "Bookstore2", "publicCmHandleProperties": { "Contact": "newemailforstore2@bookstore.com" } }, { "cmHandle": "Bookstore3", "publicCmHandleProperties": { "color": "red" } }, { "cmHandle": "Bookstore4", "publicCmHandleProperties": { "color": "" } }, { "cmHandle": "Bookstore5", "publicCmHandleProperties": { "color": "won't match" } }, { "cmHandle": "Bookstore6", "publicCmHandleProperties": { "color": 12345 } }, { "cmHandle": "Bookstore7", "publicCmHandleProperties": { "color": "12345" } }, { "cmHandle": "Bookstore8", "publicCmHandleProperties": { "color": "red", "size": "large" } } ] } |
...
# | Scenario | Request | Response | Notes/Decisions |
---|---|---|---|---|
1 | Both properties match (Return CM Handles that Match) | { | [ | |
2 | Multiple Entries - both properties match (Return CM Handles that Match) | { | [ | |
3 | No properties given (Return All CM Handles which contain public properties) | { "publicCmHandleProperties": { | [ |
Results - Edge Cases
# | Scenario | Request | Response | Notes/Decisions | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Value doesn't match (Return Empty Response) | { | [ ] | ||||||||||||
2 | Unknown properties given (Return Empty Response) | { | [ ] | ||||||||||||
3 | Empty value (valid) (Return CM Handles Returned that Match) | { "publicCmHandleProperties": { | [ | ||||||||||||
4 | Empty property (invalid) (BAD_REQUEST) | { "publicCmHandleProperties": { | { | ||||||||||||
5 | Multiple entries with one empty property (invalid) (BAD_REQUEST) | { | { | ||||||||||||
6 | |||||||||||||||
7 | Apostrophe in cm handle (Exception) *** CPS can create a cm handle with a public property value that has an apostrophe but throws exception when queried *** | { | { | Will handle this as and when it arises | |||||||||||
78 | CPS stores Integers as Strings. | Given the public properties below
When stored in CPS Integers are stored as Strings.
Therefore the two requests below return both cm handles regardless of wanting Integer or String. { { | [ "Bookstore6", "Bookstore7" ] |
...