Skip to content
GitLab
Explore
Sign in
CIM - Context Information Management
NGSI-LD Test Suite
Compare revisions
05ffa85ba2d8c3a179f189047e8be5be67cd1ed6 to 1b8cdbda875e321d65a9a89c843b2a6852aa8abd
Hide whitespace changes
Inline
Side-by-side
TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_16_02.robot
0 → 100644
View file @
1b8cdbda
*** Settings ***
Documentation
If a subscription defines an entity type selection query, a notification shall be sent whenever an entity matches the query.
Resource
${EXECDIR}
/resources/ApiUtils/ContextInformationSubscription.resource
Resource
${EXECDIR}
/resources/ApiUtils/ContextInformationProvision.resource
Resource
${EXECDIR}
/resources/AssertionUtils.resource
Resource
${EXECDIR}
/resources/JsonUtils.resource
Resource
${EXECDIR}
/resources/NotificationUtils.resource
Suite Setup
Before Test
Suite Teardown
After Test
*** Variables ***
${subscription_id_prefix}
=
urn:ngsi-ld:Subscription:
${subscription_payload_file_path}
=
subscriptions/subscription-building-entities-type-selection.jsonld
${vehicle_id_prefix}
=
urn:ngsi-ld:Vehicle:
${notification_server_send_url}
=
http://
${notification_server_host}
:
${notification_server_port}
/notify
${entity_vehicle_filepath}
=
vehicle-simple-attributes-sample.jsonld
${content_type}
=
application/ld+json
*** Test Cases ***
046_16_02 Check that a notification is not sent if the entity type does not match the entity type selection
[
Documentation
]
If a subscription defines an entity type selection query, a notification shall not be sent if the entity type does not match the query
[
Tags
]
sub-notification
5_8_6
since_v1.5.1
${vehicle_id}
=
Generate Random Entity Id
${vehicle_id_prefix}
${response}
=
Create Entity Selecting Content Type
...
${entity_vehicle_filepath}
...
${vehicle_id}
...
${content_type}
Set Suite Variable
${vehicle_id}
Wait for no notification
*** Keywords ***
Setup Initial Subscription
${subscription_id}
=
Generate Random Entity Id
${subscription_id_prefix}
${subscription_payload}
=
Load Subscription Sample With Reachable Endpoint
...
${subscription_payload_file_path}
...
${subscription_id}
...
${notification_server_send_url}
Create Subscription From Subscription Payload
${subscription_payload}
${CONTENT_TYPE_LD_JSON}
Set Suite Variable
${subscription_id}
Before Test
Start Local Server
${notification_server_host}
${notification_server_port}
Sleep
1s
Setup Initial Subscription
After Test
Delete Subscription
${subscription_id}
Delete Entity by Id
${vehicle_id}
Stop Local Server
TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_01.robot
View file @
1b8cdbda
...
...
@@ -37,7 +37,9 @@ ${subscription_payload_file_path}= csourceSubscriptions/subscription-sample
Check Created Resource Set To
${subscription_payload}
${response1.json()}
${ignored_attributes}
Check Dictionary Might Contain Additional Members of the NotificationParams
${response1.json()}
lastNotification
Check Dictionary Might Contain Additional Members of the NotificationParams
...
${response1.json()}
...
lastNotification
Check Dictionary Might Contain Additional Members of the NotificationParams
${response1.json()}
lastFailure
Check Dictionary Might Contain Additional Members of the NotificationParams
${response1.json()}
lastSuccess
Check Dictionary Might Contain Additional Members of the NotificationParams
${response1.json()}
timesSent
...
...
TP/NGSI-LD/ContextSource/RegistrationSubscription/CreateContextSourceRegistrationSubscription/038_05.robot
View file @
1b8cdbda
...
...
@@ -40,6 +40,7 @@ ${subscription_payload_file_path}= csourceSubscriptions/subscription-expire
...
response_body=
${response1.json()}
...
expected_attribute_value=expired
*** Keywords ***
Generate Random Ids For Context Source Registration Subscriptions
${subscription_id}
=
Generate Random Entity Id
${subscription_id_prefix}
...
...
TP/NGSI-LD/ContextSource/RegistrationSubscription/RetrieveContextSourceRegistrationSubscription/040_01.robot
View file @
1b8cdbda
...
...
@@ -51,7 +51,9 @@ ${expectation_file_path}= csourceSubscriptions/expectations/subscr
...
response_body=
${response.json()}
...
ignored_keys=
${ignored_attributes}
Check Dictionary Might Contain Additional Members of the NotificationParams
${response.json()}
lastNotification
Check Dictionary Might Contain Additional Members of the NotificationParams
...
${response.json()}
...
lastNotification
Check Dictionary Might Contain Additional Members of the NotificationParams
${response.json()}
lastFailure
Check Dictionary Might Contain Additional Members of the NotificationParams
${response.json()}
lastSuccess
Check Dictionary Might Contain Additional Members of the NotificationParams
${response.json()}
timesSent
...
...
data/entities/building-language-property-sample.jsonld
0 → 100644
View file @
1b8cdbda
{
"id": "urn:ngsi-ld:Building:randomUUID",
"type": "Building",
"street": {
"type": "LanguageProperty",
"languageMap": {
"fr": "Grand Place",
"nl": "Grote Markt"
}
},
"@context": [
"https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld"
]
}
\ No newline at end of file
data/entities/building-language-property-sub-property-sample.jsonld
0 → 100644
View file @
1b8cdbda
{
"id": "urn:ngsi-ld:Building:randomUUID",
"type": "Building",
"street": {
"type": "LanguageProperty",
"languageMap": {
"fr": "Grand Place",
"nl": "Grote Markt"
},
"source": {
"type": "Property",
"value": "Speedometer"
}
},
"@context": [
"https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld"
]
}
\ No newline at end of file
data/entities/building-minimal-
without-context-
sample.json
ld
→
data/entities/building-minimal-sample.json
View file @
1b8cdbda
File moved
data/entities/building-minimal-with-many-scopes.json
0 → 100644
View file @
1b8cdbda
{
"id"
:
"urn:ngsi-ld:Building:randomUUID"
,
"type"
:
"Building"
,
"scope"
:
[
"/Madrid/Gardens/ParqueNorte"
,
"/CompanyA/OrganizationB/UnitC"
]
}
data/entities/building-minimal-with-one-scope.json
0 → 100644
View file @
1b8cdbda
{
"id"
:
"urn:ngsi-ld:Building:randomUUID"
,
"type"
:
"Building"
,
"scope"
:
"/Madrid/Gardens/ParqueNorte"
}
\ No newline at end of file
data/entities/building-with-different-type-sample.jsonld
0 → 100644
View file @
1b8cdbda
{
"id": "urn:ngsi-ld:MultiTypes:randomUUID",
"type": ["Parking" ],
"@context": [
"https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld"
]
}
\ No newline at end of file
data/entities/building-with-two-types-sample.jsonld
0 → 100644
View file @
1b8cdbda
{
"id": "urn:ngsi-ld:MultiTypes:randomUUID",
"type": ["Building", "TouristDestination" ],
"@context": [
"https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld"
]
}
\ No newline at end of file
data/entities/expectations/building-language-property-any-language-filter-simplified.jsonld
0 → 100644
View file @
1b8cdbda
{
"id": "urn:ngsi-ld:Building:randomUUID",
"type": "Building",
"street": {
"languageMap": {
"fr": "Grand Place",
"nl": "Grote Markt"
}
},
"@context": [
"https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld"
]
}
\ No newline at end of file
data/entities/expectations/building-language-property-any-language-filter.jsonld
0 → 100644
View file @
1b8cdbda
{
"id": "urn:ngsi-ld:Building:randomUUID",
"type": "Building",
"street": {
"type": "LanguageProperty",
"languageMap": {
"fr": "Grand Place",
"nl": "Grote Markt"
}
},
"@context": [
"https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld"
]
}
\ No newline at end of file
data/entities/expectations/building-language-property-fr-filter-simplified.jsonld
0 → 100644
View file @
1b8cdbda
{
"id": "urn:ngsi-ld:Building:randomUUID",
"type": "Building",
"street": "Grand Place",
"@context": [
"https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld"
]
}
\ No newline at end of file
data/entities/expectations/building-language-property-fr-filter.jsonld
0 → 100644
View file @
1b8cdbda
{
"id": "urn:ngsi-ld:Building:randomUUID",
"type": "Building",
"street": {
"type": "Property",
"value": "Grand Place",
"lang": "fr"
},
"@context": [
"https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld"
]
}
\ No newline at end of file
data/entities/expectations/building-language-property-update-expectation.jsonld
0 → 100644
View file @
1b8cdbda
{
"id": "urn:ngsi-ld:Building:randomUUID",
"type": "Building",
"street": {
"type": "LanguageProperty",
"languageMap": {
"fr": "Grand Place",
"es": "Gran Lugar"
},
"providedBy": {
"type": "Relationship",
"object": "urn:ngsi-ld:Person:JohnDoe"
},
"source": {
"type": "Property",
"value": "Speedometer"
}
},
"@context": [
"https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld"
]
}
\ No newline at end of file
data/entities/expectations/building-minimal-compacted-expectation.json
0 → 100644
View file @
1b8cdbda
{
"id"
:
"urn:ngsi-ld:Building:randomUUID"
,
"type"
:
"Building"
}
\ No newline at end of file
data/entities/expectations/building-minimal-with-one-scope-expectation.json
0 → 100644
View file @
1b8cdbda
{
"id"
:
"urn:ngsi-ld:Building:randomUUID"
,
"type"
:
"Building"
,
"scope"
:
"/CompanyA/OrganizationB/UnitC"
}
\ No newline at end of file
data/entities/expectations/building-minimal-with-two-scopes-expectation.json
0 → 100644
View file @
1b8cdbda
{
"id"
:
"urn:ngsi-ld:Building:randomUUID"
,
"type"
:
"Building"
,
"scope"
:
[
"/Madrid/Gardens/ParqueNorte"
,
"/CompanyA/OrganizationB/UnitC"
]
}
\ No newline at end of file
data/entities/expectations/vehicle-language-property-appended-expectation.jsonld
0 → 100644
View file @
1b8cdbda
{
"id": "urn:ngsi-ld:Vehicle:randomUUID",
"type": "Vehicle",
"brandName": {
"type": "Property",
"value": "Mercedes"
},
"speed": [
{
"type": "Property",
"source": {
"type": "Property",
"value": "Speedometer"
},
"datasetId": "urn:ngsi-ld:Property:speedometer",
"value": 55
},
{
"type": "Property",
"source": {
"type": "Property",
"value": "GPS"
},
"datasetId": "urn:ngsi-ld:Property:gpsBxyz123-speed",
"value": 54.5
}
],
"street": {
"type": "LanguageProperty",
"languageMap": {
"fr": "Grand Place",
"nl": "Grote Markt"
}
},
"isParked": {
"type": "Relationship",
"providedBy": {
"type": "Relationship",
"object": "urn:ngsi-ld:Person:Bob"
},
"object": "urn:ngsi-ld:OffStreetParking:Downtown1",
"observedAt": "2017-07-29T12:00:04Z"
},
"@context": [
"https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld"
]
}
\ No newline at end of file
Prev
1
2
3
4
5
Next