diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_01.robot index 543cae57315d1eeb4712294cfc534a77273dd438..bf47e81fb38088a9152335455748e66d100545aa 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_01.robot @@ -10,17 +10,17 @@ ${filename}= vehicle-speed-two-datasetid-sample.jsonld *** Test Cases *** 010_01_01_Append entity attributes - Append Attributes Without Params 204 vehicle-new-attribute-fragment.jsonld + Append Attributes Without Params 204 vehicle-new-attribute-fragment.jsonld vehicle-speed-appended-expectation.jsonld 010_01_02_Append entity attributes - Append Attributes With Params 207 vehicle-attribute-to-add-fragment.jsonld add-attribute-expectation.jsonld + Append Attributes With Params 207 vehicle-attribute-to-add-fragment.jsonld add-attribute-expectation.jsonld vehicle-speed-appended-expectation.jsonld 010_01_03_Append entity attributes - Append Attributes Without Params 204 vehicle-speed-different-datasetid-fragment.jsonld + Append Attributes Without Params 204 vehicle-speed-different-datasetid-fragment.jsonld vehicle-speed-different-datasetid-expectation.jsonld 010_01_04_Append entity attributes - Append Attributes With Params 204 vehicle-speed-different-datasetid-fragment.jsonld ${EMPTY} + Append Attributes With Params 204 vehicle-speed-different-datasetid-fragment.jsonld ${EMPTY} vehicle-speed-different-datasetid-expectation.jsonld *** Keywords *** Append Attributes Without Params - [Arguments] ${status_code} ${fragment_filename} + [Arguments] ${status_code} ${fragment_filename} ${expectation_filename} [Documentation] Check that you can append entity attributes [Tags] /entities/{entityId}/attrs/ 5_6_3 @@ -31,10 +31,15 @@ Append Attributes Without Params ${response}= Append Entity Attributes ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} Check Response Status Code ${status_code} ${response['status']} + ${entity_expectation_payload}= Load Test Sample entities/expectations/${expectation_filename} ${entity_id} + Retrieve Entity by Id ${entity_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} + ${ignored_attributes}= Create List ${status_regex_expr} + Check Updated Resource Set To ${entity_expectation_payload} + [Teardown] Delete Entity by Id Returning Response ${entity_id} Append Attributes With Params - [Arguments] ${status_code} ${fragment_filename} ${expectation_filename} + [Arguments] ${status_code} ${fragment_filename} ${expectation_response_body} ${expectation_filename} [Documentation] Check that you can append entity attributes [Tags] /entities/{entityId}/attrs/ 5_6_3 @@ -44,6 +49,11 @@ Append Attributes With Params ${response}= Append Entity Attributes With Parameters ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} noOverwrite Check Response Status Code ${status_code} ${response['status']} - Run Keyword If "${expectation_filename}"!="${EMPTY}" Check Response Body Content ${expectation_filename} ${response['body']} + Run Keyword If "${expectation_response_body}"!="${EMPTY}" Check Response Body Content ${expectation_response_body} ${response['body']} + + ${entity_expectation_payload}= Load Test Sample entities/expectations/${expectation_filename} ${entity_id} + Retrieve Entity by Id ${entity_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} + ${ignored_attributes}= Create List ${status_regex_expr} @context + Check Updated Resource Set To ${entity_expectation_payload} [Teardown] Delete Entity by Id Returning Response ${entity_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011_01.robot index b24087315c90b942639560fb3a54b4926c287671..e9a6610246cb4fe9b1e5e0d48fc67f070cc3fa83 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/011_01.robot @@ -10,15 +10,15 @@ Test Template Update Attributes ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-two-datasetid-attributes-sample.jsonld -*** Test Cases *** STATUS_CODE FRAGMENT_FILENAME EXPECTATION_FILENAME -011_01_01_Check that you can update existing attributes with no datasetId 204 vehicle-speed-two-datasetid-01-fragment.jsonld ${EMPTY} -011_01_02_Check that you can update existing attributes with the datasetId 204 vehicle-speed-two-datasetid-02-fragment.jsonld ${EMPTY} -011_01_03_Check that you can update only some attributes while others failed 207 vehicle-speed-two-datasetid-03-fragment.jsonld vehicle-speed-datasetid-expectation.jsonld -011_01_04_Check that you cannot change the type of the attribute 204 vehicle-speed-two-datasetid-04-fragment.jsonld ${EMPTY} +*** Test Cases *** STATUS_CODE FRAGMENT_FILENAME EXPECTATION_RESPONSE_FILENAME EXPECTATION_FILENAME +011_01_01_Check that you can update existing attributes with no datasetId 204 fragments/vehicle-speed-two-datasetid-01-fragment.jsonld ${EMPTY} expectations/vehicle-update-attributes-expectation.jsonld +011_01_02_Check that you can update existing attributes with the datasetId 204 vehicle-speed-two-datasetid-02-fragment.jsonld ${EMPTY} expectations/vehicle-update-datasetid-attributes-expectation.jsonld +011_01_03_Check that you can update only some attributes while others failed 207 vehicle-speed-two-datasetid-03-fragment.jsonld vehicle-speed-datasetid-expectation.jsonld expectations/vehicle-multi-attributes-expectation.jsonld +011_01_04_Check that you cannot change the type of the attribute 204 vehicle-speed-two-datasetid-04-fragment.jsonld ${EMPTY} vehicle-two-datasetid-attributes-sample.jsonld *** Keywords *** Update Attributes - [Arguments] ${status_code} ${fragment_filename} ${expectation_filename} + [Arguments] ${status_code} ${fragment_filename} ${expectation_response_filename} ${expectation_filename} [Documentation] Check that you can update entity attributes [Tags] /entities/{entityId}/attrs/ 5_6_2 @@ -28,6 +28,11 @@ Update Attributes ${response}= Update Entity Attributes ${entity_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} Check Response Status Code ${status_code} ${response['status']} - Run Keyword If "${expectation_filename}"!="${EMPTY}" Check Response Body Content ${expectation_filename} ${response['body']} + Run Keyword If "${expectation_response_filename}"!="${EMPTY}" Check Response Body Content ${expectation_response_filename} ${response['body']} + + ${entity_expectation_payload}= Load Test Sample entities/${expectation_filename} ${entity_id} + Retrieve Entity by Id ${entity_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} + ${ignored_attributes}= Create List ${status_regex_expr} @context + Check Updated Resource Set To ${entity_expectation_payload} [Teardown] Delete Entity by Id Returning Response ${entity_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_01.robot index ae829b00f9555db9b8648b3c3c7f60d47656cb93..3d58d8d197416ab14b977a54a7fb781feaba2521 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_01.robot @@ -11,13 +11,13 @@ ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-speed-two-datasetid-sample.jsonld ${status_code}= 204 -*** Test Cases *** FRAGMENT_FILENAME ATTRIBUTE_ID -012_01_01_Check that you can partially update an attribute vehicle-isparked-fragment.jsonld isParked -012_01_02_Check that you can partially update an attribute by specifying the datasetId vehicle-speed-equal-datasetid-fragment.jsonld speed +*** Test Cases *** FRAGMENT_FILENAME ATTRIBUTE_ID EXPECTATION_FILENAME +012_01_01_Check that you can partially update an attribute vehicle-isparked-fragment.jsonld isParked vehicle-isparked-update-expectation.jsonld +012_01_02_Check that you can partially update an attribute by specifying the datasetId vehicle-speed-equal-datasetid-fragment.jsonld speed vehicle-update-speed-expectation.jsonld *** Keywords *** Update Attributes - [Arguments] ${fragment_filename} ${attribute_id} + [Arguments] ${fragment_filename} ${attribute_id} ${expectation_filename} [Documentation] Check that you can perform a partial update on an entity attribute [Tags] /entities/{entityId}/attrs/{attrId} 5_6_4 @@ -28,4 +28,10 @@ Update Attributes ${response}= Partial Update Entity Attributes ${entity_id} ${attribute_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} Check Response Status Code ${status_code} ${response['status']} + ${entity_expectation_payload}= Load Test Sample entities/expectations/${expectation_filename} ${entity_id} + Retrieve Entity by Id ${entity_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} + ${ignored_attributes}= Create List ${status_regex_expr} @context + Check Updated Resource Set To ${entity_expectation_payload} + + [Teardown] Delete Entity by Id Returning Response ${entity_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/013_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/013_01.robot index d9e1bacd19e2111919c17002c349b59603276a67..839a04c8e1c1c6914f9220a94bf183e857d0f6a1 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/013_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/013_01.robot @@ -12,14 +12,14 @@ ${status_code}= 204 ${filename}= vehicle-two-datasetid-attributes-sample.jsonld ${attribute_id}= speed -*** Test Cases *** DATASETID DELETEALL -013_01_01_delete an attribute with the id ${EMPTY} false -013_01_02_delete an attribute with the datasetId urn:ngsi-ld:Property:gpsBxyz123-speed false -013_01_03_delete all target attribute instances with a datasetId urn:ngsi-ld:Property:gpsBxyz123-speed true +*** Test Cases *** DATASETID DELETEALL EXPECTATION_FILENAME +013_01_01_delete an attribute with the id ${EMPTY} false vehicle-delete-default-speed-expectation.jsonld +013_01_02_delete an attribute with the datasetId urn:ngsi-ld:Property:gpsBxyz123-speed false vehicle-delete-datasetid-speed-expectation.jsonld +013_01_03_delete all target attribute instances with a datasetId urn:ngsi-ld:Property:gpsBxyz123-speed true vehicle-delete-deleteall-speed-expectation.jsonld *** Keywords *** Delete Attributes - [Arguments] ${datasetId} ${deleteAll} + [Arguments] ${datasetId} ${deleteAll} ${expectation_filename} [Documentation] Check that you can delete an attribute from an entity [Tags] /entities/{entityId}/attrs/{attrId} 5_6_5 @@ -30,4 +30,9 @@ Delete Attributes ${response}= Delete Entity Attributes ${entity_id} ${attribute_id} ${datasetId} ${deleteAll} Check Response Status Code ${status_code} ${response['status']} + ${entity_expectation_payload}= Load Test Sample entities/expectations/${expectation_filename} ${entity_id} + Retrieve Entity by Id ${entity_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} + ${ignored_attributes}= Create List ${status_regex_expr} @context + Check Updated Resource Set To ${entity_expectation_payload} + [Teardown] Delete Entity by Id Returning Response ${entity_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/007_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/007_01.robot index 7c05ccbb95aa75b0d698f80208ffba1eb1fe147f..9f686e75f54a79bbf3505b588e7428ffbb3d7e02 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/007_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/007_01.robot @@ -23,4 +23,8 @@ Create Temporal Entity ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ${temporal_entity_representation_id} ${filename} ${content_type} Check Response Status Code 201 ${response['status']} + ${created_temporal_entity}= Load Test Sample temporalEntities/${filename} ${temporal_entity_representation_id} + Set Test Variable ${response} + Check Created Resource Set To ${created_temporal_entity} + [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/008_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/008_01.robot index 68dd8cf822048da347f2103c4edbf1a348ad5089..0afda983168f1fa30f7f27bf6f68c498452f76c3 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/008_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/008_01.robot @@ -8,6 +8,7 @@ Resource ${EXECDIR}/resources/JsonUtils.resource ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-temporal-representation-sample.jsonld ${update_filename}= vehicle-temporal-representation-update-sample.jsonld +${expectation_filename}= vehicle-temporal-representation-update-expectation.jsonld *** Test Cases *** 008_01_Update a temporal representation of an entity with simple temporal properties @@ -21,5 +22,9 @@ ${update_filename}= vehicle-temporal-representation-update-sample.jsonld ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ${temporal_entity_representation_id} ${update_filename} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 204 ${response['status']} + ${temporal_entity_expectation_payload}= Load Test Sample temporalEntities/expectations/${expectation_filename} ${temporal_entity_representation_id} + Retrieve Temporal Representation Of Entity ${temporal_entity_representation_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} + ${ignored_attributes}= Create List ${status_regex_expr} instanceId @context + Check Updated Resource Set To ${temporal_entity_expectation_payload} [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/009_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/009_01.robot index 2f87e8dd4d5c53fe3f7cc4dce36f86e4ef6a8ffa..31e14452dfc05eb2b827fdfd4caacaee8090f00d 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/009_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/009_01.robot @@ -18,4 +18,7 @@ Delete a temporal representation of an entity with simple temporal properties Check Response Status Code 201 ${response['status']} ${response}= Delete Temporal Representation Of Entity With Returning Response ${temporal_entity_representation_id} - Check Response Status Code 204 ${response['status']} \ No newline at end of file + Check Response Status Code 204 ${response['status']} + + Retrieve Temporal Representation Of Entity ${temporal_entity_representation_id} context=${ngsild_test_suite_context} + Check SUT Not Containing Resource \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/014_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/014_01.robot index 254950a77ad62420649384104cc95cb94536431f..4faf3c8bb1d62d536146cf15e954b346f3296a8e 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/014_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/014_01.robot @@ -8,6 +8,7 @@ Resource ${EXECDIR}/resources/JsonUtils.resource ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-temporal-representation-sample.jsonld ${fragment_filename}= vehicle-temporal-representation-fragment.jsonld +${expectation_filename}= vehicle-temporal-representation-added-attribute-expectation.jsonld *** Test Cases *** 014_01_02_Add an attribute to a temporal entity with simple temporal properties @@ -21,4 +22,9 @@ ${fragment_filename}= vehicle-temporal-representation-fragment.jsonld ${response}= Append Attribute To Temporal Entity ${temporal_entity_representation_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 204 ${response['status']} + ${temporal_entity_expectation_payload}= Load Test Sample temporalEntities/expectations/${expectation_filename} ${temporal_entity_representation_id} + Retrieve Temporal Representation Of Entity ${temporal_entity_representation_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} + ${ignored_attributes}= Create List ${status_regex_expr} instanceId @context + Check Updated Resource Set To ${temporal_entity_expectation_payload} + [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/015_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/015_01.robot index aeb72a1b35744f2781e719e9d44beed3166c50d2..9ab31c23ecaba3023da0e839a4a45b18794881d8 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/015_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/015_01.robot @@ -12,14 +12,14 @@ ${filename}= vehicle-temporal-representation-sample.jsonld ${status_code}= 204 ${attribute_id}= fuelLevel -*** Test Cases *** DELETEALL DATASETID -015_01_01_Delete an attribute from a temporal representation of an entity without deleteALL/datasetID false ${EMPTY} -015_01_02_Delete an attribute from a temporal representation of an entity with datasetId false urn:ngsi-ld:Vehicle:12345-fuel -015_01_03_Delete an attribute from a temporal representation of an entity with deleteALL/datasetID true urn:ngsi-ld:Vehicle:12345-fuel +*** Test Cases *** DELETEALL DATASETID EXPECTATION_FILE +015_01_01_Delete an attribute from a temporal representation of an entity without deleteALL/datasetID false ${EMPTY} vehicle-temporal-representation-delete-fuelLevel-expectation.jsonld +015_01_02_Delete an attribute from a temporal representation of an entity with datasetId false urn:ngsi-ld:Vehicle:12345-fuel vehicle-temporal-representation-delete-fuelLevel-datasetid-expectation.jsonld +015_01_03_Delete an attribute from a temporal representation of an entity with deleteALL/datasetID true urn:ngsi-ld:Vehicle:12345-fuel vehicle-temporal-representation-deleteall-fuelLevel-expectation.jsonld *** Keywords *** Delete Attribute From A Temporal Entity - [Arguments] ${deleteAll} ${datasetId} + [Arguments] ${deleteAll} ${datasetId} ${expectation_filename} [Documentation] Check that you can delete an attribute of a temporal representation of an entity with simple temporal properties [Tags] mandatory @@ -30,4 +30,9 @@ Delete Attribute From A Temporal Entity ${response}= Delete Attribute From Temporal Entity ${temporal_entity_representation_id} ${attribute_id} ${CONTENT_TYPE_LD_JSON} ${datasetId} ${deleteAll} Check Response Status Code ${status_code} ${response['status']} + ${temporal_entity_expectation_payload}= Load Test Sample temporalEntities/expectations/${expectation_filename} ${temporal_entity_representation_id} + Retrieve Temporal Representation Of Entity ${temporal_entity_representation_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} + ${ignored_attributes}= Create List ${status_regex_expr} instanceId @context + Check Updated Resource Set To ${temporal_entity_expectation_payload} + [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/016_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/016_01.robot index 53df2e11c35da76be49fe7b91068bdc029d15bd4..68ceb69795417bc629cbd1c6670adc66e68d7d8a 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/016_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/016_01.robot @@ -7,7 +7,8 @@ Resource ${EXECDIR}/resources/JsonUtils.resource *** Variable *** ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-temporal-representation-sample.jsonld -${fragment_filename}= vehicle-temporal-intanceid-update-fragment.jsonld +${fragment_filename}= vehicle-temporal-instanceid-update-fragment.jsonld +${expectation_filename}= vehicle-temporal-representation-update-expectation.jsonld ${attributeId}= speed *** Test Cases *** @@ -37,4 +38,9 @@ ${attributeId}= speed ${modifiedAt_after_update_date}= Convert Date ${modifiedAt_after_update} epoch Should Be True ${modifiedAt_before_update_date}<${modifiedAt_after_update_date} + ${temporal_entity_expectation_payload}= Load Test Sample temporalEntities/expectations/${expectation_filename} ${temporal_entity_representation_id} + Retrieve Temporal Representation Of Entity ${temporal_entity_representation_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} + ${ignored_attributes}= Create List ${status_regex_expr} instanceId @context + Check Updated Resource Set To ${temporal_entity_expectation_payload} + [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/016_02.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/016_02.robot index d53614c836f964dbfb1a4f5ab82d87f081008f6b..436e9a8a43143dfa2f7f75083c04db74ffa513ee 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/016_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/016_02.robot @@ -10,7 +10,7 @@ Test Template Partially Update Temporal Entity *** Variable *** ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-temporal-representation-sample.jsonld -${fragment_filename}= vehicle-temporal-intanceid-update-fragment.jsonld +${fragment_filename}= vehicle-temporal-instanceid-update-fragment.jsonld ${status_code}= 400 *** Test Cases *** TEMPORAL_ENTITY_ID ATTRIBUTE_ID INSTANCE_ID diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/016_03.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/016_03.robot index 8037375f623b4734ba3477f0abd82ad675087384..ccb1005e420e3798ca984ce34ae710ab23305855 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/016_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/016_03.robot @@ -10,7 +10,7 @@ Test Template Partially Update Temporal Entity *** Variable *** ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-temporal-representation-sample.jsonld -${fragment_filename}= vehicle-temporal-intanceid-update-fragment.jsonld +${fragment_filename}= vehicle-temporal-instanceid-update-fragment.jsonld ${status_code}= 404 *** Test Cases *** TEMPORAL_ENTITY_ID ATTRIBUTE_ID INSTANCE_ID diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/017_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/017_01.robot index b6b727c83763f8d2c4b7123ee418e2c8dc0449c7..4ddd57c3f8170d90721272db6a7448dd8041113c 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/017_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/017_01.robot @@ -8,6 +8,7 @@ Resource ${EXECDIR}/resources/JsonUtils.resource ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-temporal-representation-sample.jsonld ${attributeId}= speed +${expectation_filename}= vehicle-temporal-representation-delete-speed-instanceid-sample.jsonld *** Test Cases *** 017_01_Delete an attribute instance in temporal representation of an entity @@ -25,4 +26,9 @@ ${attributeId}= speed ${response}= Delete Attribute Instance From Temporal Entity ${temporal_entity_representation_id} ${attributeId} ${instanceId} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 204 ${response['status']} + ${temporal_entity_expectation_payload}= Load Test Sample temporalEntities/expectations/${expectation_filename} ${temporal_entity_representation_id} + Retrieve Temporal Representation Of Entity ${temporal_entity_representation_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} + ${ignored_attributes}= Create List ${status_regex_expr} instanceId @context + Check Updated Resource Set To ${temporal_entity_expectation_payload} + [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_01.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_01.robot index 897e492ed6d882495d4526189ab98f1f9f704779..8b55bf46323e0132e3257863ce7c9272cb8fca2c 100644 --- a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_01.robot +++ b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_01.robot @@ -16,9 +16,13 @@ Create Context Source Registration With Specific Date Expiration Date ${registration_id}= Generate Random Entity Id ${registration_id_prefix} ${payload}= Load Json From File ${EXECDIR}/data/${registration_payload_file_path} - ${updated_payload}= Update Value To Json ${payload} $..id ${registration_id} - ${request} ${response}= Create Context Source Registration With Return ${updated_payload} + ${registration_payload}= Update Value To Json ${payload} $..id ${registration_id} + ${request} ${response}= Create Context Source Registration With Return ${registration_payload} Check Response Status Code 201 ${response['status']} Check Response Headers Containing URI set to ${request['path']}/ ${registration_id} ${response} + Retrieve Context Source Registration ${registration_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} + ${ignored_attributes}= Create List ${status_regex_expr} + Check Created Resource Set To ${registration_payload} ${ignored_attributes} + [Teardown] Delete Context Source Registration ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_02.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_02.robot index 1d38410775da61811a38d6c123f2ec982a5c152b..6df8fa4be4b671955d5c3c9410cafac660cb756e 100644 --- a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_02.robot +++ b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_02.robot @@ -16,9 +16,13 @@ Create Context Source Registration That Never Expires ${registration_id}= Generate Random Entity Id ${registration_id_prefix} ${payload}= Load Json From File ${EXECDIR}/data/${registration_payload_file_path} - ${updated_payload}= Update Value To Json ${payload} $..id ${registration_id} - ${request} ${response}= Create Context Source Registration With Return ${updated_payload} + ${registration_payload}= Update Value To Json ${payload} $..id ${registration_id} + ${request} ${response}= Create Context Source Registration With Return ${registration_payload} Check Response Status Code 201 ${response['status']} Check Response Headers Containing URI set to ${request['path']}/ ${registration_id} ${response} + Retrieve Context Source Registration ${registration_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} + ${ignored_attributes}= Create List ${status_regex_expr} + Check Created Resource Set To ${registration_payload} ${ignored_attributes} + [Teardown] Delete Context Source Registration ${registration_id} diff --git a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_03.robot b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_03.robot index 97fe3165ab6391fe9e9de732d9efd1490c4c65c9..ef0aec239f155cb6159cd163cec0ce7e95594b65 100644 --- a/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_03.robot +++ b/TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_01_03.robot @@ -4,7 +4,6 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource - *** Variable *** ${registration_id_prefix}= urn:ngsi-ld:Registration: ${registration_payload_file_path}= csourceRegistrations/context-source-registration-no-id-sample.jsonld @@ -18,5 +17,10 @@ Create Context Source Registration Without A Sprecified ID ${request} ${response}= Create Context Source Registration With Return ${payload} Check Response Status Code 201 ${response['status']} ${registration_id}= Check Response Headers ID Not Empty ${response} + + ${registration_payload}= Update Value To Json ${payload} $..id ${registration_id} + Retrieve Context Source Registration ${registration_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} + ${ignored_attributes}= Create List ${status_regex_expr} + Check Created Resource Set To ${registration_payload} ${ignored_attributes} [Teardown] Delete Context Source Registration ${registration_id} \ No newline at end of file diff --git a/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_01.robot b/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_01.robot index a5febdfa594fa3a67b764c19a3d10ce390d95b46..fc8f250237c85930284f3189cfd0b46ad8e4f25f 100644 --- a/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_01.robot +++ b/TP/NGSI-LD/ContextSource/Registration/DeleteContextSourceRegistration/035_01.robot @@ -13,6 +13,7 @@ ${registration_payload_file_path}= context-source-registration-simple-sample.j Delete a context source registration by id [Documentation] Check that you can delete a context source registration by id [Tags] /csourceRegistrations/{registrationId} 5_9_4 + ${registration_id}= Generate Random Entity Id ${registration_id_prefix} ${payload}= Load Json From File ${EXECDIR}/data/csourceRegistrations/${registration_payload_file_path} ${updated_payload}= Update Value To Json ${payload} $..id ${registration_id} @@ -21,3 +22,6 @@ Delete a context source registration by id ${response}= Delete Context Source Registration With Return ${registration_id} Check Response Status Code 204 ${response['status']} + + Retrieve Context Source Registration ${registration_id} context=${ngsild_test_suite_context} + Check SUT Not Containing Resource \ No newline at end of file diff --git a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_01.robot b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_01.robot index 76961327c978841b9245fe587b80f2cb75074439..59cc777359b56b8b3835042bbb257cd5e7fea92e 100644 --- a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_01.robot +++ b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_01.robot @@ -9,24 +9,30 @@ Test Template Update Context Source *** Variable *** ${registration_id_prefix}= urn:ngsi-ld:Registration: -*** Test Case *** FILENAME UPDATE_FILENAME -034_01_01_Update a context source registration by id context-source-registration-simple-sample.jsonld context-source-registration-with-expiration-sample.jsonld -034_01_02_Update a context source registration to never expire context-source-registration-with-expiration-sample.jsonld context-source-registration-simple-sample.jsonld +*** Test Case *** FILENAME UPDATE_FILENAME +034_01_01_Update a context source registration by id context-source-registration-sample.jsonld context-source-registration-with-expiration-sample.jsonld +034_01_02_Update a context source registration to never expire context-source-registration-with-expiration-sample.jsonld context-source-registration-simple-sample.jsonld *** Keywords *** Update Context Source [Arguments] ${filename} ${update_filename} [Documentation] Check that you can update a context source registration by id [Tags] /csourceRegistrations/{registrationId} 5_9_3 + ${registration_id}= Generate Random Entity Id ${registration_id_prefix} ${payload}= Load Json From File ${EXECDIR}/data/csourceRegistrations/${filename} - ${updated_payload}= Update Value To Json ${payload} $..id ${registration_id} - ${request} ${response}= Create Context Source Registration With Return ${updated_payload} + ${registration_payload}= Update Value To Json ${payload} $..id ${registration_id} + ${request} ${response}= Create Context Source Registration With Return ${registration_payload} Check Response Status Code 201 ${response['status']} ${fragment}= Load Json From File ${EXECDIR}/data/csourceRegistrations/${update_filename} - ${fragment_with_id}= Update Value To Json ${fragment} $..id ${registration_id} - ${response}= Update Context Source Registration With Return ${registration_id} ${fragment_with_id} ${CONTENT_TYPE_LD_JSON} + ${registration_update_fragment}= Update Value To Json ${fragment} $..id ${registration_id} + ${response}= Update Context Source Registration With Return ${registration_id} ${registration_update_fragment} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 204 ${response['status']} + Retrieve Context Source Registration ${registration_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} + ${ignored_attributes}= Create List ${status_regex_expr} @context + Check Updated Resource Set To ${registration_payload} + + [Teardown] Delete Context Source Registration ${registration_id} diff --git a/data/csourceRegistrations/context-source-registration-sample.jsonld b/data/csourceRegistrations/context-source-registration-sample.jsonld index 2c8aeeae08dbd85a0401baf53c7698292f7604ea..4f37b16e0d4f7b1a3a894dc41fcbee04d50f4d7f 100644 --- a/data/csourceRegistrations/context-source-registration-sample.jsonld +++ b/data/csourceRegistrations/context-source-registration-sample.jsonld @@ -1,17 +1,43 @@ { - "id":"urn:ngsi-ld:ContextSourceRegistration:randomUUID", - "type":"ContextSourceRegistration", - "information":[ - { - "entities":[ - { - "type":"Building" - } - ] - } + "id": "urn:ngsi-ld:ContextSourceRegistration:randomUUID", + "type": "ContextSourceRegistration", + "information": [ + { + "entities": [ + { + "id": "urn:ngsi-ld:Vehicle:A456", + "type": "Vehicle" + } + ], + "propertyNames": ["brandName","speed"], + "relationshipNames": ["isParked"] + }, + { + "entities": [ + { + "idPattern": ".*downtown$", + "type": "OffStreetParking" + }, + { + "idPattern": ".*47$", + "type": "OffStreetParking" + } + ], + "propertyNames": ["availableSpotNumber","totalSpotNumber"], + "relationshipNames": ["isNextToBuilding"] + } ], - "endpoint":"http://my.csource.org:1026", - "@context":[ - "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" + "endpoint": "http://my.csource.org:1026", + "location": { + "type": "Polygon", + "coordinates": [ + [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], + [100.0, 1.0], [100.0, 0.0]] ] + }, + "timestamp": { + "startAt": "2017-11-29T14:53:15Z" + }, + "@context": [ + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" ] } \ No newline at end of file diff --git a/data/csourceRegistrations/context-source-registration-with-expiration-sample.jsonld b/data/csourceRegistrations/context-source-registration-with-expiration-sample.jsonld index 6e0a40b5e46b8487a3a27ec72b55503d1c860f2b..3ec95d3bab8976b5ec8965efe9c307734c4f747f 100644 --- a/data/csourceRegistrations/context-source-registration-with-expiration-sample.jsonld +++ b/data/csourceRegistrations/context-source-registration-with-expiration-sample.jsonld @@ -35,9 +35,9 @@ [100.0, 1.0], [100.0, 0.0]] ] }, "timestamp": { - "startAt": " 2017-11-29T14:53:15Z" + "startAt": "2017-11-29T14:53:15Z" }, - "expiresAt": " 2025-11-29T14:53:15Z", + "expiresAt": "2025-11-29T14:53:15Z", "@context": [ "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" ] diff --git a/data/entities/expectations/vehicle-delete-datasetid-speed-expectation.jsonld b/data/entities/expectations/vehicle-delete-datasetid-speed-expectation.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..98f1b6524774d94a76dee27d5fa7931a1fb68b25 --- /dev/null +++ b/data/entities/expectations/vehicle-delete-datasetid-speed-expectation.jsonld @@ -0,0 +1,31 @@ +{ + "id": "urn:ngsi-ld:Vehicle:randomUUID", + "type": "Vehicle", + "brandName": { + "type": "Property", + "value": "Mercedes" + }, + "isParked": { + "type": "Relationship", + "object": "urn:ngsi-ld:OffStreetParking:Downtown1", + "observedAt": "2017-07-29T12:00:04Z", + "providedBy": { + "type": "Relationship", + "object": "urn:ngsi-ld:Person:Bob" + }, + "datasetId": "urn:ngsi-ld:Relationship:parked12345" + }, + "speed": + { + "type": "Property", + "value": 54.5, + "source": { + "type": "Property", + "value": "GPS" + }, + "datasetId": "urn:ngsi-ld:Property:gpsBxyz123-speed" + }, + "@context": [ + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/expectations/vehicle-delete-default-speed-expectation.jsonld b/data/entities/expectations/vehicle-delete-default-speed-expectation.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..98f1b6524774d94a76dee27d5fa7931a1fb68b25 --- /dev/null +++ b/data/entities/expectations/vehicle-delete-default-speed-expectation.jsonld @@ -0,0 +1,31 @@ +{ + "id": "urn:ngsi-ld:Vehicle:randomUUID", + "type": "Vehicle", + "brandName": { + "type": "Property", + "value": "Mercedes" + }, + "isParked": { + "type": "Relationship", + "object": "urn:ngsi-ld:OffStreetParking:Downtown1", + "observedAt": "2017-07-29T12:00:04Z", + "providedBy": { + "type": "Relationship", + "object": "urn:ngsi-ld:Person:Bob" + }, + "datasetId": "urn:ngsi-ld:Relationship:parked12345" + }, + "speed": + { + "type": "Property", + "value": 54.5, + "source": { + "type": "Property", + "value": "GPS" + }, + "datasetId": "urn:ngsi-ld:Property:gpsBxyz123-speed" + }, + "@context": [ + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/expectations/vehicle-delete-deleteall-speed-expectation.jsonld b/data/entities/expectations/vehicle-delete-deleteall-speed-expectation.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..df8c093f086d92abaf45d654484634f43d2dbd2f --- /dev/null +++ b/data/entities/expectations/vehicle-delete-deleteall-speed-expectation.jsonld @@ -0,0 +1,21 @@ +{ + "id": "urn:ngsi-ld:Vehicle:randomUUID", + "type": "Vehicle", + "brandName": { + "type": "Property", + "value": "Mercedes" + }, + "isParked": { + "type": "Relationship", + "object": "urn:ngsi-ld:OffStreetParking:Downtown1", + "observedAt": "2017-07-29T12:00:04Z", + "providedBy": { + "type": "Relationship", + "object": "urn:ngsi-ld:Person:Bob" + }, + "datasetId": "urn:ngsi-ld:Relationship:parked12345" + }, + "@context": [ + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/expectations/vehicle-isparked-update-expectation.jsonld b/data/entities/expectations/vehicle-isparked-update-expectation.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..18cc1e9f79b2004bee45ef1574adcabefad4a250 --- /dev/null +++ b/data/entities/expectations/vehicle-isparked-update-expectation.jsonld @@ -0,0 +1,38 @@ +{ + "id": "urn:ngsi-ld:Vehicle:randomUUID", + "type": "Vehicle", + "brandName": { + "type": "Property", + "value": "Mercedes" + }, + "isParked": { + "type": "Relationship", + "object": "urn:ngsi-ld:OffStreetParking:Downtown1", + "observedAt": "2017-07-29T12:00:04Z", + "providedBy": { + "type": "Relationship", + "object": "urn:ngsi-ld:Person:JohnDoe" + } + }, + "speed": [{ + "type": "Property", + "value": 55, + "source": { + "type": "Property", + "value": "Speedometer" + }, + "datasetId": "urn:ngsi-ld:Property:speedometer" + }, + { + "type": "Property", + "value": 54.5, + "source": { + "type": "Property", + "value": "GPS" + }, + "datasetId": "urn:ngsi-ld:Property:gpsBxyz123-speed" + }], + "@context": [ + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/expectations/vehicle-multi-attributes-expectation.jsonld b/data/entities/expectations/vehicle-multi-attributes-expectation.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..08921f209a248a920ffa52d1c313ec0cc1019cf7 --- /dev/null +++ b/data/entities/expectations/vehicle-multi-attributes-expectation.jsonld @@ -0,0 +1,38 @@ +{ + "id": "urn:ngsi-ld:Vehicle:randomUUID", + "type": "Vehicle", + "brandName": { + "type": "Property", + "value": "Mercedes" + }, + "isParked": { + "type": "Relationship", + "object": "urn:ngsi-ld:OffStreetParking:Downtown1", + "observedAt": "2017-07-29T12:00:04Z", + "providedBy": { + "type": "Relationship", + "object": "urn:ngsi-ld:Person:Bob" + }, + "datasetId": "urn:ngsi-ld:Relationship:parked12345" + }, + "speed": [{ + "type": "Property", + "value": 55, + "source": { + "type": "Property", + "value": "Speedometer" + } + }, + { + "type": "Property", + "value": 99, + "source": { + "type": "Property", + "value": "GPS" + }, + "datasetId": "urn:ngsi-ld:Property:gpsBxyz123-speed" + }], + "@context": [ + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/expectations/vehicle-speed-appended-expectation.jsonld b/data/entities/expectations/vehicle-speed-appended-expectation.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..9732320d13c8e18048af66544e0d9b693f8d529b --- /dev/null +++ b/data/entities/expectations/vehicle-speed-appended-expectation.jsonld @@ -0,0 +1,44 @@ +{ + "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 + } + ], + "attribute_to_be_added": { + "type": "Property", + "value": 23 + }, + "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://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/expectations/vehicle-speed-different-datasetid-expectation.jsonld b/data/entities/expectations/vehicle-speed-different-datasetid-expectation.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..887175ed6d1d3bcf573663c72eccacd888b127e5 --- /dev/null +++ b/data/entities/expectations/vehicle-speed-different-datasetid-expectation.jsonld @@ -0,0 +1,33 @@ +{ + "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:speedometerA4567-speed2", + "value": 56 + }, + "attribute_to_be_added": { + "type": "Property", + "value": 23 + }, + "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://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/expectations/vehicle-update-attributes-expectation.jsonld b/data/entities/expectations/vehicle-update-attributes-expectation.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..7d74f1b8a12370c37a3eee10008182b74904a205 --- /dev/null +++ b/data/entities/expectations/vehicle-update-attributes-expectation.jsonld @@ -0,0 +1,38 @@ +{ + "id": "urn:ngsi-ld:Vehicle:randomUUID", + "type": "Vehicle", + "brandName": { + "type": "Property", + "value": "Mercedes" + }, + "isParked": { + "type": "Relationship", + "object": "urn:ngsi-ld:OffStreetParking:Downtown1", + "observedAt": "2017-07-29T12:00:04Z", + "providedBy": { + "type": "Relationship", + "object": "urn:ngsi-ld:Person:Bob" + }, + "datasetId": "urn:ngsi-ld:Relationship:parked12345" + }, + "speed": [{ + "type": "Property", + "value": 99, + "source": { + "type": "Property", + "value": "Speedometer" + } + }, + { + "type": "Property", + "value": 54.5, + "source": { + "type": "Property", + "value": "GPS" + }, + "datasetId": "urn:ngsi-ld:Property:gpsBxyz123-speed" + }], + "@context": [ + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/expectations/vehicle-update-datasetid-attributes-expectation.jsonld b/data/entities/expectations/vehicle-update-datasetid-attributes-expectation.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..2c2c11f99cbd8f71a0c0e9546f8b6362265492ce --- /dev/null +++ b/data/entities/expectations/vehicle-update-datasetid-attributes-expectation.jsonld @@ -0,0 +1,38 @@ +{ + "id": "urn:ngsi-ld:Vehicle:randomUUID", + "type": "Vehicle", + "brandName": { + "type": "Property", + "value": "Mercedes" + }, + "isParked": { + "type": "Relationship", + "object": "urn:ngsi-ld:OffStreetParking:Downtown1", + "observedAt": "2017-07-29T12:00:04Z", + "providedBy": { + "type": "Relationship", + "object": "urn:ngsi-ld:Person:JohnDoe" + }, + "datasetId": "urn:ngsi-ld:Relationship:parked12345" + }, + "speed": [{ + "type": "Property", + "value": 55, + "source": { + "type": "Property", + "value": "Speedometer" + } + }, + { + "type": "Property", + "value": 54.5, + "source": { + "type": "Property", + "value": "GPS" + }, + "datasetId": "urn:ngsi-ld:Property:gpsBxyz123-speed" + }], + "@context": [ + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/expectations/vehicle-update-speed-expectation.jsonld b/data/entities/expectations/vehicle-update-speed-expectation.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..b44a810c9fa3ae00a300331b16219e3fadd0eadf --- /dev/null +++ b/data/entities/expectations/vehicle-update-speed-expectation.jsonld @@ -0,0 +1,38 @@ +{ + "id": "urn:ngsi-ld:Vehicle:randomUUID", + "type": "Vehicle", + "brandName": { + "type": "Property", + "value": "Mercedes" + }, + "isParked": { + "type": "Relationship", + "object": "urn:ngsi-ld:OffStreetParking:Downtown1", + "observedAt": "2017-07-29T12:00:04Z", + "providedBy": { + "type": "Relationship", + "object": "urn:ngsi-ld:Person:Bob" + } + }, + "speed": [{ + "type": "Property", + "value": 55, + "source": { + "type": "Property", + "value": "Speedometer" + }, + "datasetId": "urn:ngsi-ld:Property:speedometer" + }, + { + "type": "Property", + "value": 54.5, + "source": { + "type": "Property", + "value": "GPS" + }, + "datasetId": "urn:ngsi-ld:Property:gpsBxyz123-speed" + }], + "@context": [ + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/entities/fragmentEntities/vehicle-speed-two-datasetid-03-fragment.jsonld b/data/entities/fragmentEntities/vehicle-speed-two-datasetid-03-fragment.jsonld index a1cfae904943e779c292a8786bc57ff1056cb6f7..375db48993c2234c73c9d08e6503b87e506ce7be 100644 --- a/data/entities/fragmentEntities/vehicle-speed-two-datasetid-03-fragment.jsonld +++ b/data/entities/fragmentEntities/vehicle-speed-two-datasetid-03-fragment.jsonld @@ -16,7 +16,7 @@ "type": "Property", "value": "Speedometer" }, - "datasetId": "urn:ngsi-ld:Property:speedometerA4567-speed" + "datasetId": "urn:ngsi-ld:Property:gpsBxyz123-speed" }, "@context": [ "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" diff --git a/data/entities/fragmentEntities/vehicle-speed-two-datasetid-04-fragment.jsonld b/data/entities/fragmentEntities/vehicle-speed-two-datasetid-04-fragment.jsonld index 6794ae23c1f19347959c540dfb78906ba36265cb..addf83fbde54f71eb7533a616f6118b0e7258b0b 100644 --- a/data/entities/fragmentEntities/vehicle-speed-two-datasetid-04-fragment.jsonld +++ b/data/entities/fragmentEntities/vehicle-speed-two-datasetid-04-fragment.jsonld @@ -1,16 +1,6 @@ { - "isParked2": { + "speed": { "type": "Relationship", - "object": "urn:ngsi-ld:OffStreetParking:Downtown1", - "observedAt": "2017-07-29T12:00:04Z", - "providedBy": { - "type": "Relationship", - "object": "urn:ngsi-ld:Person:JohnDoe" - }, - "datasetId": "urn:ngsi-ld:Relationship:parked12345" - }, - "speed2": { - "type": "Property", "value": 99, "source": { "type": "Property", diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-added-attribute-expectation.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-added-attribute-expectation.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..bac6a5d2e55882fb07b74de418af384a5b3dba94 --- /dev/null +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-added-attribute-expectation.jsonld @@ -0,0 +1,60 @@ +{ + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":[ + { + "type":"Property", + "value":"BMW" + } + ], + "speed":[ + { + "type":"Property", + "value":120, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-09-01T12:05:00Z" + } + ], + "fuelLevel":[ + { + "type":"Property", + "value":67, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":53, + "observedAt":"2020-09-01T13:05:00Z" + }, + { + "type":"Property", + "value":40, + "observedAt":"2020-09-01T14:07:00Z", + "datasetId":"urn:ngsi-ld:Vehicle:12345-fuel" + } + ], + "added_attribute":[ + { + "type":"Property", + "value":120, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-09-01T12:05:00Z" + }, + { + "type":"Property", + "value":100, + "observedAt":"2020-09-01T12:07:00Z" + } + ], + "@context":[ + "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-delete-fuelLevel-datasetid-expectation.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-delete-fuelLevel-datasetid-expectation.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..595adf93a812cdd8fba3ec6c6632f9eca039551d --- /dev/null +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-delete-fuelLevel-datasetid-expectation.jsonld @@ -0,0 +1,37 @@ +{ + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":[ + { + "type":"Property", + "value":"BMW" + } + ], + "speed":[ + { + "type":"Property", + "value":120, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-09-01T12:05:00Z" + } + ], + "fuelLevel":[ + { + "type":"Property", + "value":67, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":53, + "observedAt":"2020-09-01T13:05:00Z" + } + ], + "@context":[ + "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-delete-fuelLevel-expectation.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-delete-fuelLevel-expectation.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..a918430141b17b84c93d71aac4d7b159dce0adf0 --- /dev/null +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-delete-fuelLevel-expectation.jsonld @@ -0,0 +1,33 @@ +{ + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":[ + { + "type":"Property", + "value":"BMW" + } + ], + "speed":[ + { + "type":"Property", + "value":120, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-09-01T12:05:00Z" + } + ], + "fuelLevel":[ + { + "type":"Property", + "value":40, + "observedAt":"2020-09-01T14:07:00Z", + "datasetId":"urn:ngsi-ld:Vehicle:12345-fuel" + } + ], + "@context":[ + "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-delete-speed-instanceid-sample.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-delete-speed-instanceid-sample.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..6a3ff6d6f5fdfd817ec725ec8812f8e58bbe4227 --- /dev/null +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-delete-speed-instanceid-sample.jsonld @@ -0,0 +1,38 @@ +{ + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":[ + { + "type":"Property", + "value":"BMW" + } + ], + "speed":[ + { + "type":"Property", + "value":80, + "observedAt":"2020-09-01T12:05:00Z" + } + ], + "fuelLevel":[ + { + "type":"Property", + "value":67, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":53, + "observedAt":"2020-09-01T13:05:00Z" + }, + { + "type":"Property", + "value":40, + "observedAt":"2020-09-01T14:07:00Z", + "datasetId":"urn:ngsi-ld:Vehicle:12345-fuel" + } + ], + "@context":[ + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-deleteall-fuelLevel-expectation.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-deleteall-fuelLevel-expectation.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..21f9b9a4b8bf7a8ac32f90fce4c744e2b59c8aad --- /dev/null +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-deleteall-fuelLevel-expectation.jsonld @@ -0,0 +1,25 @@ +{ + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":[ + { + "type":"Property", + "value":"BMW" + } + ], + "speed":[ + { + "type":"Property", + "value":120, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-09-01T12:05:00Z" + } + ], + "@context":[ + "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-update-expectation.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-update-expectation.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..5fd7bd2663fda9c1e35ec3525848b326fd690ce1 --- /dev/null +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-update-expectation.jsonld @@ -0,0 +1,43 @@ + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":[ + { + "type":"Property", + "value":"BMW" + } + ], + "speed":[ + { + "type":"Property", + "value":129, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-09-01T12:05:00Z" + } + ], + "fuelLevel":[ + { + "type":"Property", + "value":67, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":53, + "observedAt":"2020-09-01T13:05:00Z" + }, + { + "type":"Property", + "value":40, + "observedAt":"2020-09-01T14:07:00Z", + "datasetId":"urn:ngsi-ld:Vehicle:12345-fuel" + } + ], + "@context":[ + "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" + ] + } \ No newline at end of file diff --git a/data/temporalEntities/fragments/vehicle-temporal-intanceid-update-fragment.jsonld b/data/temporalEntities/fragments/vehicle-temporal-instanceid-update-fragment.jsonld similarity index 100% rename from data/temporalEntities/fragments/vehicle-temporal-intanceid-update-fragment.jsonld rename to data/temporalEntities/fragments/vehicle-temporal-instanceid-update-fragment.jsonld diff --git a/data/temporalEntities/fragments/vehicle-temporal-intanceid-update-sample.jsonld b/data/temporalEntities/fragments/vehicle-temporal-intanceid-update-sample.jsonld deleted file mode 100644 index d7433ad6a3222dae4338f16ea712745cddd9965c..0000000000000000000000000000000000000000 --- a/data/temporalEntities/fragments/vehicle-temporal-intanceid-update-sample.jsonld +++ /dev/null @@ -1,12 +0,0 @@ -{ - "speed":[ - { - "type":"Property", - "value":129, - "observedAt":"2020-09-01T12:03:00Z" - } - ], - "@context":[ - "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld" - ] -} \ No newline at end of file