Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions code/Test_definitions/device-identifier-matchIdentifier.feature
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier
And the resource "/device-identifier/vwip/match-identifier"
And the header "Content-Type" is set to "application/json"
And the header "Authorization" is set to a valid access token
And the header "x-correlator" complies with the schema at "/components/schemas/XCorrelator"
And the request body is compliant with the MatchRequestBody schema defined by "/components/schemas/MatchRequestBody"
And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator"
And the request body is compliant with the MatchRequestBody schema defined by "#/components/schemas/MatchRequestBody"
And one of the scopes associated with the access token is device-identifier:match-identifier

# Success scenarios
Expand All @@ -48,7 +48,7 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier
And request property "$.providedIdentifier" is set to <providedIdentifier>
When the request "matchIdentifier" is sent
Then the response status code is 200
And the response body complies with the 200MatchIdentifier schema at "/components/schemas/200MatchIdentifier"
And the response body complies with the 200MatchIdentifier schema at "#/components/responses/200MatchIdentifier"
And the response header "x-correlator" has same value as the request header "x-correlator"
And the response header "Content-Type" is "application/json"
And the response property "$.match" exists and is true
Expand All @@ -74,7 +74,7 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier
And request property "$.providedIdentifier" is set to IMEI1
When the request "matchIdentifier" is sent
Then the response status code is 200
And the response body complies with the 200MatchIdentifier schema at "/components/schemas/200MatchIdentifier"
And the response body complies with the 200MatchIdentifier schema at "#/components/responses/200MatchIdentifier"
And the response header "x-correlator" has same value as the request header "x-correlator"
And the response header "Content-Type" is "application/json"
And the response property "$.match" exists and is true
Expand All @@ -94,7 +94,7 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier
And request property "$.providedIdentifier" is set to IMEI2
When the request "matchIdentifier" is sent
Then the response status code is 200
And the response body complies with the 200MatchIdentifier schema at "/components/schemas/200MatchIdentifier"
And the response body complies with the 200MatchIdentifier schema at "#/components/responses/200MatchIdentifier"
And the response header "x-correlator" has same value as the request header "x-correlator"
And the response header "Content-Type" is "application/json"
And the response property "$.match" exists and is false
Expand All @@ -115,7 +115,7 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier
And request property "$.providedIdentifier" is set to TAC1
When the request "matchIdentifier" is sent
Then the response status code is 200
And the response body complies with the 200MatchIdentifier schema at "/components/schemas/200MatchIdentifier"
And the response body complies with the 200MatchIdentifier schema at "#/components/responses/200MatchIdentifier"
And the response header "x-correlator" has same value as the request header "x-correlator"
And the response header "Content-Type" is "application/json"
And the response property "$.match" exists and is true
Expand All @@ -136,7 +136,7 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier
And request property "$.providedIdentifier" is set to TAC2
When the request "matchIdentifier" is sent
Then the response status code is 200
And the response body complies with the 200MatchIdentifier schema at "/components/schemas/200MatchIdentifier"
And the response body complies with the 200MatchIdentifier schema at "#/components/responses/200MatchIdentifier"
And the response header "x-correlator" has same value as the request header "x-correlator"
And the response header "Content-Type" is "application/json"
And the response property "$.match" exists and is false
Expand All @@ -158,7 +158,7 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier
And request property "$.providedIdentifier" is set to IMEISV1
When the request "matchIdentifier" is sent
Then the response status code is 200
And the response body complies with the 200MatchIdentifier schema at "/components/schemas/200MatchIdentifier"
And the response body complies with the 200MatchIdentifier schema at "#/components/responses/200MatchIdentifier"
And the response header "x-correlator" has same value as the request header "x-correlator"
And the response header "Content-Type" is "application/json"
And the response property "$.match" exists and is true
Expand All @@ -180,7 +180,7 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier
And request property "$.providedIdentifier" is set to IMEISV2
When the request "matchIdentifier" is sent
Then the response status code is 200
And the response body complies with the 200MatchIdentifier schema at "/components/schemas/200MatchIdentifier"
And the response body complies with the 200MatchIdentifier schema at "#/components/responses/200MatchIdentifier"
And the response header "x-correlator" has same value as the request header "x-correlator"
And the response header "Content-Type" is "application/json"
And the response property "$.match" exists and is false
Expand All @@ -200,7 +200,7 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier
And request property "$.providedIdentifier" is set to <providedIdentifier>
When the request "matchIdentifier" is sent
Then the response status code is 200
And the response body complies with the 200MatchIdentifier schema at "/components/schemas/200MatchIdentifier"
And the response body complies with the 200MatchIdentifier schema at "#/components/responses/200MatchIdentifier"
And the response header "x-correlator" has same value as the request header "x-correlator"
And the response header "Content-Type" is "application/json"
And the response property "$.match" exists and is false
Expand All @@ -226,7 +226,7 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier
And request property "$.providedIdentifier" is set to <providedIdentifier>
When the request "matchIdentifier" is sent
Then the response status code is 200
And the response body complies with the 200MatchIdentifier schema at "/components/schemas/200MatchIdentifier"
And the response body complies with the 200MatchIdentifier schema at "#/components/responses/200MatchIdentifier"
And the response header "x-correlator" has same value as the request header "x-correlator"
And the response header "Content-Type" is "application/json"
And the response property "$.match" exists and is true
Expand All @@ -252,7 +252,7 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier
And request property "$.providedIdentifier" is set to IMEI1
When the request "matchIdentifier" is sent
Then the response status code is 200
And the response body complies with the 200MatchIdentifier schema at "/components/schemas/200MatchIdentifier"
And the response body complies with the 200MatchIdentifier schema at "#/components/responses/200MatchIdentifier"
And the response header "x-correlator" has same value as the request header "x-correlator"
And the response header "Content-Type" is "application/json"
And the response property "$.match" exists and is true
Expand All @@ -267,7 +267,7 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier
# This scenario is valid for both 2-legged and 3-legged access tokens
@DeviceIdentifier_matchIdentifier_400.1_schema_not_compliant
Scenario: Invalid Argument. Generic Syntax Exception
Given the request body is set to any value which is not compliant with the schema at "/components/schemas/MatchRequestBody"
Given the request body is set to any value which is not compliant with the schema at "#/components/schemas/MatchRequestBody"
When the request "matchIdentifier" is sent
Then the response status code is 400
And the response header "x-correlator" has same value as the request header "x-correlator"
Expand Down Expand Up @@ -319,10 +319,10 @@ Feature: Camara Mobile Device Identifier API, vwip - Operation: matchIdentifier
And the response property "$.message" contains a user friendly text

Examples:
| device_identifier | oas_spec_schema |
| $.device.phoneNumber | /components/schemas/PhoneNumber |
| $.device.ipv4Address | /components/schemas/DeviceIpv4Addr |
| $.device.ipv6Address | /components/schemas/DeviceIpv6Address |
| device_identifier | oas_spec_schema |
| $.device.phoneNumber | /components/schemas/PhoneNumber |
| $.device.ipv4Address | /components/schemas/DeviceIpv4Address |
| $.device.ipv6Address | /components/schemas/DeviceIpv6Address |
| $.device.networkAccessIdentifier | /components/schemas/NetworkAccessIdentifier |

# This scenario is valid for both 2-legged and 3-legged access tokens
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ Feature: Camara Mobile Device Identifer API, vwip - Operation: retrieveIdentifie
And the resource "/device-identifier/vwip/retrieve-identifier"
And the header "Content-Type" is set to "application/json"
And the header "Authorization" is set to a valid access token
And the header "x-correlator" complies with the schema at "/components/schemas/XCorrelator"
And the request body is compliant with the RequestBody schema defined by "/components/schemas/RequestBody"
And the header "x-correlator" complies with the schema at "#/components/schemas/XCorrelator"
And the request body is compliant with the RequestBody schema defined by "#/components/schemas/RequestBody"
And one of the scopes associated with the access token is device-identifier:retrieve-identifier

# Success scenarios
Expand All @@ -47,7 +47,7 @@ Feature: Camara Mobile Device Identifer API, vwip - Operation: retrieveIdentifie
And request property "$.device" does not exist
When the request "retrieveIdentifier" is sent
Then the response status code is 200
And the response body complies with the 200RetrieveIdentifier schema at "/components/schemas/200RetrieveIdentifier"
And the response body complies with the 200RetrieveIdentifier schema at "#/components/responses/200RetrieveIdentifier"
And the response header "x-correlator" has same value as the request header "x-correlator"
And the response header "Content-Type" is "application/json"
And the response property "$.imei" exists and is equal to IMEI1
Expand All @@ -65,7 +65,7 @@ Feature: Camara Mobile Device Identifer API, vwip - Operation: retrieveIdentifie
And request property "$.device.phoneNumber" is set to PHONENUMBER1
When the request "retrieveIdentifier" is sent
Then the response status code is 200
And the response body complies with the 200RetrieveIdentifier schema at "/components/schemas/200RetrieveIdentifier"
And the response body complies with the 200RetrieveIdentifier schema at "#/components/responses/200RetrieveIdentifier"
And the response header "x-correlator" has same value as the request header "x-correlator"
And the response header "Content-Type" is "application/json"
And the response property "$.imei" exists and is equal to IMEI1
Expand All @@ -84,7 +84,7 @@ Feature: Camara Mobile Device Identifer API, vwip - Operation: retrieveIdentifie
And request property "$.device.ipv4Address.publicPort" is set to PUBLICPORT
When the request "retrieveIdentifier" is sent
Then the response status code is 200
And the response body complies with the 200RetrieveIdentifier schema at "/components/schemas/200RetrieveIdentifier"
And the response body complies with the 200RetrieveIdentifier schema at "#/components/responses/200RetrieveIdentifier"
And the response header "x-correlator" has same value as the request header "x-correlator"
And the response header "Content-Type" is "application/json"
And the response property "$.imei" exists and is equal to IMEI1
Expand All @@ -102,7 +102,7 @@ Feature: Camara Mobile Device Identifer API, vwip - Operation: retrieveIdentifie
And request property "$.device" does not exist
When the request "retrieveIdentifier" is sent
Then the response status code is 200
And the response body complies with the 200RetrieveIdentifier schema at "/components/schemas/200RetrieveIdentifier"
And the response body complies with the 200RetrieveIdentifier schema at "#/components/responses/200RetrieveIdentifier"
And the response header "x-correlator" has same value as the request header "x-correlator"
And the response header "Content-Type" is "application/json"
And the response property "$.imei" exists and is equal to IMEI1
Expand All @@ -120,7 +120,7 @@ Feature: Camara Mobile Device Identifer API, vwip - Operation: retrieveIdentifie
And request property "$.device.phoneNumber" is set to PHONENUMBER2
When the request "retrieveIdentifier" is sent
Then the response status code is 200
And the response body complies with the 200RetrieveIdentifier schema at "/components/schemas/200RetrieveIdentifier"
And the response body complies with the 200RetrieveIdentifier schema at "#/components/responses/200RetrieveIdentifier"
And the response header "x-correlator" has same value as the request header "x-correlator"
And the response header "Content-Type" is "application/json"
And the response property "$.imei" exists and is equal to IMEI1
Expand All @@ -138,7 +138,7 @@ Feature: Camara Mobile Device Identifer API, vwip - Operation: retrieveIdentifie
And request property "$.device" does not exist
When the request "retrieveIdentifier" is sent
Then the response status code is 200
And the response body complies with the 200RetrieveIdentifier schema at "/components/schemas/200RetrieveIdentifier"
And the response body complies with the 200RetrieveIdentifier schema at "#/components/responses/200RetrieveIdentifier"
And the response header "x-correlator" has same value as the request header "x-correlator"
And the response header "Content-Type" is "application/json"
And the response property "$.imei" exists and is equal to IMEI2
Expand All @@ -156,7 +156,7 @@ Feature: Camara Mobile Device Identifer API, vwip - Operation: retrieveIdentifie
And request property "$.device.phoneNumber" is set to PHONENUMBER1
When the request "retrieveIdentifier" is sent
Then the response status code is 200
And the response body complies with the 200RetrieveIdentifier schema at "/components/schemas/200RetrieveIdentifier"
And the response body complies with the 200RetrieveIdentifier schema at "#/components/responses/200RetrieveIdentifier"
And the response header "x-correlator" has same value as the request header "x-correlator"
And the response header "Content-Type" is "application/json"
And the response property "$.imei" exists and is equal to IMEI2
Expand All @@ -171,7 +171,7 @@ Feature: Camara Mobile Device Identifer API, vwip - Operation: retrieveIdentifie
# This scenario is valid for both 2-legged and 3-legged access tokens
@DeviceIdentifier_retrieveIdentifier_400.1_schema_not_compliant
Scenario: Invalid Argument. Generic Syntax Exception
Given the request body is set to any value which is not compliant with the schema at "/components/schemas/RequestBody"
Given the request body is set to any value which is not compliant with the schema at "#/components/schemas/RequestBody"
When the request "retrieveIdentifier" is sent
Then the response status code is 400
And the response header "x-correlator" has same value as the request header "x-correlator"
Expand Down Expand Up @@ -222,7 +222,7 @@ Feature: Camara Mobile Device Identifer API, vwip - Operation: retrieveIdentifie
Examples:
| device_identifier | oas_spec_schema |
| $.device.phoneNumber | /components/schemas/PhoneNumber |
| $.device.ipv4Address | /components/schemas/DeviceIpv4Addr |
| $.device.ipv4Address | /components/schemas/DeviceIpv4Address |
| $.device.ipv6Address | /components/schemas/DeviceIpv6Address |
| $.device.networkAccessIdentifier | /components/schemas/NetworkAccessIdentifier |

Expand Down
Loading
Loading