diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_01.robot index 4206061e53c89dae7230635c1ca4f0d2777d8936..b0b0ed18b8cf304a84935c73fc26aef744c71fe1 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_01.robot @@ -18,7 +18,7 @@ ${expectation_filename}= vehicle-temporal-representation-delete-speed-instanc Set Suite Variable ${temporal_entity_representation_id} ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ${temporal_entity_representation_id} ${filename} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response['status']} - ${response}= Get Temporal Representation Of Entity ${temporal_entity_representation_id} ${CONTENT_TYPE_LD_JSON} sysAttrs ${ngsild_test_suite_context} + Retrieve Temporal Representation Of Entity ${temporal_entity_representation_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} ${instanceId}= Set Variable ${response['body']['speed'][0]['instanceId']} ${response}= Delete Attribute Instance From Temporal Entity ${temporal_entity_representation_id} ${attributeId} ${instanceId} ${CONTENT_TYPE_JSON} ${ngsild_test_suite_context} Check Response Status Code 204 ${response['status']} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_03.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_03.robot index e4e72ea913841576363119c0d54f175245713254..4aadafe9e2df894edbe8ce47151ac52b22bec06b 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/DeleteAttributeInstance/017_03.robot @@ -4,7 +4,7 @@ Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Suite Setup Create Id -Test Template Partially Update Temporal Entity +Test Template Delete Attribute Instance *** Variable *** ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: @@ -22,7 +22,7 @@ ${status_code}= 404 ${temporal_entity_representation_id} speed urn:ngsi-ld:01234567890123456789 *** Keywords *** -Partially Update Temporal Entity +Delete Attribute Instance [Arguments] ${temporal_entity_id} ${attributeId} ${instanceId} [Documentation] Check that you cannot delete an attribute instance in temporal representation of an entity if the entity/attribute/instance id is not found [Tags] tea-instance-delete 5_6_15 diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/ModifyAttributeInstance/016_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/ModifyAttributeInstance/016_01.robot new file mode 100644 index 0000000000000000000000000000000000000000..f75abc6c64572fb6ddb83b98577586b7762eafda --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/ModifyAttributeInstance/016_01.robot @@ -0,0 +1,39 @@ +*** Settings *** +Documentation Check that you can modify an attribute instance in temporal representation of an entity +Resource ${EXECDIR}/resources/ApiUtils.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +*** Variable *** +${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: +${filename}= vehicle-temporal-representation-sample.jsonld +${fragment_filename}= vehicle-temporal-modify-attribute-instance-fragment.jsonld +${expectation_filename}= vehicle-temporal-representation-modify-attribute-instance-expectation.jsonld +${attributeId}= speed + +*** Test Cases *** +016_01_Modify attribute instance in temporal representation of an entity + [Documentation] Check that you can partially update an attribute instance of a temporal representation of an entity + [Tags] tea-partial-update 5_6_14 + ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + Set Suite Variable ${temporal_entity_representation_id} + + ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ${temporal_entity_representation_id} ${filename} ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${response['status']} + + Retrieve Temporal Representation Of Entity ${temporal_entity_representation_id} context=${ngsild_test_suite_context} accept=${CONTENT_TYPE_LD_JSON} + ${instanceId_before_update}= Set Variable ${response['body']['speed'][0]['instanceId']} + + ${response}= Modify Attribute Instance From Temporal Entity ${temporal_entity_representation_id} ${attributeId} ${instanceId_before_update} ${fragment_filename} ${CONTENT_TYPE_JSON} ${ngsild_test_suite_context} + 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} + ${instanceId_after_update}= Set Variable ${response['body']['speed'][0]['instanceId']} + + Should Be Equal As Strings ${instanceId_before_update} ${instanceId_after_update} + + ${temporal_entity_expectation_payload}= Load Test Sample temporalEntities/expectations/${expectation_filename} ${temporal_entity_representation_id} + ${ignored_attributes}= Create List instanceId @context modifiedAt + Check Updated Resource Set To ${temporal_entity_expectation_payload} ${ignored_attributes} + [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/PartialUpdateAttributeInstance/016_02.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/ModifyAttributeInstance/016_02.robot similarity index 56% rename from TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/PartialUpdateAttributeInstance/016_02.robot rename to TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/ModifyAttributeInstance/016_02.robot index fbae4f066d7d7cc4a1231c89eccd02d5a8533f76..2bfdfe95b705d1ae4028e68c59c063ca303cdb40 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/PartialUpdateAttributeInstance/016_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/ModifyAttributeInstance/016_02.robot @@ -1,44 +1,44 @@ *** Settings *** -Documentation Check that you cannot partially update an attribute instance in temporal representation of an entity if the entityId/attributeId/instanceId is not right +Documentation Check that you cannot modify an attribute instance in temporal representation of an entity if the entityId/attributeId/instanceId is not right Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Suite Setup Create Id -Test Template Partially Update Temporal Entity +Suite Teardown Delete Temporal Entity +Test Template Modify Attribute Instance Temporal Entity *** Variable *** ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-temporal-representation-sample.jsonld -${fragment_filename}= vehicle-temporal-instanceid-update-fragment.jsonld +${fragment_filename}= vehicle-temporal-modify-attribute-instance-fragment.jsonld ${status_code}= 400 *** Test Cases *** TEMPORAL_ENTITY_ID ATTRIBUTE_ID INSTANCE_ID -016_02_01_update an attribute instance in temporal representation of an entity if the entity id is not valid +016_02_01_modify attribute instance in temporal representation of an entity if the entity id is not valid invalidId speed ${valid_instanceId} -016_02_02_update an attribute instance in temporal representation of an entity if the entity id is not present +016_02_02_modify attribute instance in temporal representation of an entity if the entity id is not present ${EMPTY} speed ${valid_instanceId} -016_02_03_update an attribute instance in temporal representation of an entity if the instance id is not valid +016_02_03_modify attribute instance in temporal representation of an entity if the instance id is not valid ${temporal_entity_representation_id} speed invalidId -016_02_04_update an attribute instance in temporal representation of an entity if the instance id is not present +016_02_04_modify attribute instance in temporal representation of an entity if the instance id is not present ${temporal_entity_representation_id} speed ${EMPTY} -016_02_05_update an attribute instance in temporal representation of an entity if the attribute name is not a valid name +016_02_05_modify attribute instance in temporal representation of an entity if the attribute name is not a valid name ${temporal_entity_representation_id} invalid(Id ${valid_instanceId} -016_02_06_update an attribute instance in temporal representation of an entity if the attribute name is not present +016_02_06_modify attribute instance in temporal representation of an entity if the attribute name is not present ${temporal_entity_representation_id} ${EMPTY} ${valid_instanceId} *** Keywords *** -Partially Update Temporal Entity +Modify Attribute Instance Temporal Entity [Arguments] ${temporal_entity_id} ${attributeId} ${instanceId} - [Documentation] Check that you cannot partially update an attribute instance in temporal representation of an entity if the entityId/attributeId/instanceId is not right + [Documentation] Check that you cannot partially modify attribute instance in temporal representation of an entity if the entityId/attributeId/instanceId is not right [Tags] tea-partial-update 5_6_14 - ${response}= Partial Update Attribute From Temporal Entity ${temporal_entity_id} ${attributeId} ${instanceId} ${fragment_filename} ${CONTENT_TYPE_JSON} ${ngsild_test_suite_context} + ${response}= Modify Attribute Instance From Temporal Entity ${temporal_entity_id} ${attributeId} ${instanceId} ${fragment_filename} ${CONTENT_TYPE_JSON} ${ngsild_test_suite_context} Check Response Status Code ${status_code} ${response['status']} - [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} Create Id ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} @@ -48,3 +48,6 @@ Create Id ${response}= Get Temporal Representation Of Entity ${temporal_entity_representation_id} ${CONTENT_TYPE_LD_JSON} sysAttrs ${ngsild_test_suite_context} ${valid_instanceId}= Set Variable ${response['body']['speed'][0]['instanceId']} Set Suite Variable ${valid_instanceId} + +Delete Temporal Entity + Delete Temporal Representation Of Entity ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/PartialUpdateAttributeInstance/016_03.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/ModifyAttributeInstance/016_03.robot similarity index 60% rename from TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/PartialUpdateAttributeInstance/016_03.robot rename to TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/ModifyAttributeInstance/016_03.robot index 7e4dc05b23b722f1bd23ca46dc719f407e1d006b..168d40401b0d0ad5a74fc9b9298c89287c920bd6 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/PartialUpdateAttributeInstance/016_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/ModifyAttributeInstance/016_03.robot @@ -1,35 +1,35 @@ *** Settings *** -Documentation Check that you cannot partially update an attribute instance in temporal representation of an entity if the entityId/attributeId/instanceId is not right +Documentation Check that you cannot modify an attribute instance in temporal representation of an entity if the entityId/attributeId/instanceId is not right Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource Suite Setup Create Id -Test Template Partially Update Temporal Entity +Suite Teardown Delete Temporal Entity +Test Template Modify Attribute Instance Temporal Entity *** Variable *** ${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: ${filename}= vehicle-temporal-representation-sample.jsonld -${fragment_filename}= vehicle-temporal-instanceid-update-fragment.jsonld +${fragment_filename}= vehicle-temporal-modify-attribute-instance-fragment.jsonld ${status_code}= 404 *** Test Cases *** TEMPORAL_ENTITY_ID ATTRIBUTE_ID INSTANCE_ID -016_03_01_update an attribute instance in temporal representation of an entity if the entity with given id is not found +016_03_01_modify attribute instance in temporal representation of an entity if the entity with given id is not found ${unknown_temporal_entity_id} speed ${valid_instanceId} -016_03_02_update an attribute instance in temporal representation of an entity if the target attribute is not found +016_03_02_modify attribute instance in temporal representation of an entity if the target attribute is not found ${temporal_entity_representation_id} speed2 ${valid_instanceId} -016_03_03_update an attribute instance in temporal representation of an entity if the target attribute instance is not found +016_03_03_modify attribute instance in temporal representation of an entity if the target attribute instance is not found ${temporal_entity_representation_id} speed urn:ngsi-ld:01234567890123456789 *** Keywords *** -Partially Update Temporal Entity +Modify Attribute Instance Temporal Entity [Arguments] ${temporal_entity_id} ${attributeId} ${instanceId} - [Documentation] Check that you cannot partially update an attribute instance in temporal representation of an entity if the entity/attribute/instance id is not found + [Documentation] Check that you cannot partially modify attribute instance in temporal representation of an entity if the entity/attribute/instance id is not found [Tags] tea-partial-update 5_6_14 - ${response}= Partial Update Attribute From Temporal Entity ${temporal_entity_id} ${attributeId} ${instanceId} ${fragment_filename} ${CONTENT_TYPE_JSON} ${ngsild_test_suite_context} + ${response}= Modify Attribute Instance From Temporal Entity ${temporal_entity_id} ${attributeId} ${instanceId} ${fragment_filename} ${CONTENT_TYPE_JSON} ${ngsild_test_suite_context} Check Response Status Code ${status_code} ${response['status']} - [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} Create Id ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} @@ -41,3 +41,6 @@ Create Id ${response}= Get Temporal Representation Of Entity ${temporal_entity_representation_id} ${CONTENT_TYPE_LD_JSON} sysAttrs ${ngsild_test_suite_context} ${valid_instanceId}= Set Variable ${response['body']['speed'][0]['instanceId']} Set Suite Variable ${valid_instanceId} + +Delete Temporal Entity + Delete Temporal Representation Of Entity ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/PartialUpdateAttributeInstance/016_01.robot b/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/PartialUpdateAttributeInstance/016_01.robot deleted file mode 100644 index 9a9f58639a9ee2d7fe00ca93a03bed8a66c12373..0000000000000000000000000000000000000000 --- a/TP/NGSI-LD/ContextInformation/Provision/TemporalEntityAttributes/PartialUpdateAttributeInstance/016_01.robot +++ /dev/null @@ -1,40 +0,0 @@ -*** Settings *** -Documentation Check that you can partially update an attribute instance of a temporal representation of an entity -Resource ${EXECDIR}/resources/ApiUtils.resource -Resource ${EXECDIR}/resources/AssertionUtils.resource -Resource ${EXECDIR}/resources/JsonUtils.resource - -*** Variable *** -${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: -${filename}= vehicle-temporal-representation-sample.jsonld -${fragment_filename}= vehicle-temporal-instanceid-update-fragment.jsonld -${expectation_filename}= vehicle-temporal-representation-partial-update-attribute-expectation.jsonld -${attributeId}= speed - -*** Test Cases *** -016_01_Partially update an attribute instance of a temporal representation of an entity - [Documentation] Check that you can partially update an attribute instance of a temporal representation of an entity - [Tags] tea-partial-update 5_6_14 - ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} - Set Suite Variable ${temporal_entity_representation_id} - ${response}= Create Or Update Temporal Representation Of Entity Selecting Content Type ${temporal_entity_representation_id} ${filename} ${CONTENT_TYPE_LD_JSON} - Check Response Status Code 201 ${response['status']} - ${response}= Get Temporal Representation Of Entity ${temporal_entity_representation_id} ${CONTENT_TYPE_LD_JSON} sysAttrs ${ngsild_test_suite_context} - ${createdAt_before_update}= Set Variable ${response['body']['speed'][0]['createdAt']} - ${modifiedAt_before_update}= Set Variable ${response['body']['speed'][0]['modifiedAt']} - ${instanceId}= Set Variable ${response['body']['speed'][0]['instanceId']} - ${response}= Partial Update Attribute From Temporal Entity ${temporal_entity_representation_id} ${attributeId} ${instanceId} ${fragment_filename} ${CONTENT_TYPE_JSON} ${ngsild_test_suite_context} - Check Response Status Code 204 ${response['status']} - ${response}= Get Temporal Representation Of Entity ${temporal_entity_representation_id} ${CONTENT_TYPE_LD_JSON} sysAttrs - ${createdAt_after_update}= Set Variable ${response['body']['speed'][0]['createdAt']} - ${modifiedAt_after_update}= Set Variable ${response['body']['speed'][0]['modifiedAt']} - Should Be Equal As Strings ${createdAt_before_update} ${modifiedAt_before_update} - Should Be Equal As Strings ${createdAt_before_update} ${createdAt_after_update} - ${modifiedAt_before_update_date}= Convert Date ${modifiedAt_before_update} epoch - ${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 instanceId @context - Check Updated Resource Set To ${temporal_entity_expectation_payload} ${ignored_attributes} - [Teardown] Delete Temporal Representation Of Entity ${temporal_entity_representation_id} diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-added-attribute-expectation.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-added-attribute-expectation.jsonld index e369877c3e86dc09f09762523b7ab16d0e5a8396..c4089b8ef2dc66b8de98e9a55b0f1da237ab5fa7 100644 --- a/data/temporalEntities/expectations/vehicle-temporal-representation-added-attribute-expectation.jsonld +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-added-attribute-expectation.jsonld @@ -49,6 +49,6 @@ } ], "@context":[ - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" + "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 diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-create-expectation.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-create-expectation.jsonld index 22b52c9fb5551d7d5f018a5d17616d1604210233..7c89313049b5bda15bd762ea25a842f76bcb65d7 100644 --- a/data/temporalEntities/expectations/vehicle-temporal-representation-create-expectation.jsonld +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-create-expectation.jsonld @@ -30,5 +30,8 @@ "observedAt":"2020-09-01T14:07:00Z", "datasetId":"urn:ngsi-ld:Vehicle:12345-fuel" } - ] + ], + "@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 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 index bdf28c38adf82dfb12198a7395c18a0b8f3acd9a..ad6ecbd1f2aee3c42f0417e9a2f35df774709150 100644 --- a/data/temporalEntities/expectations/vehicle-temporal-representation-delete-fuelLevel-datasetid-expectation.jsonld +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-delete-fuelLevel-datasetid-expectation.jsonld @@ -26,6 +26,6 @@ } ], "@context":[ - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" + "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 diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-delete-fuelLevel-expectation.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-delete-fuelLevel-expectation.jsonld index 9687c225d8952a8f183bd6e756f56b6033a01f95..6b84b98c1180e563eb16660da830bacc6ae66a59 100644 --- a/data/temporalEntities/expectations/vehicle-temporal-representation-delete-fuelLevel-expectation.jsonld +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-delete-fuelLevel-expectation.jsonld @@ -22,6 +22,6 @@ } ], "@context":[ - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" + "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 diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-deleteall-fuelLevel-expectation.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-deleteall-fuelLevel-expectation.jsonld index 90083d35851d91cf41f2e87bcc7ea287e710af36..29f7c5645dd652363a509b575f937d06b1bfb779 100644 --- a/data/temporalEntities/expectations/vehicle-temporal-representation-deleteall-fuelLevel-expectation.jsonld +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-deleteall-fuelLevel-expectation.jsonld @@ -14,6 +14,6 @@ } ], "@context":[ - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" + "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 diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-modify-attribute-instance-expectation.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-modify-attribute-instance-expectation.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..375f5a3130b0f78c3364a82245c634bb0629c9f5 --- /dev/null +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-modify-attribute-instance-expectation.jsonld @@ -0,0 +1,37 @@ +{ + "id": "urn:ngsi-ld:Vehicle:randomUUID", + "type": "Vehicle", + "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://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 diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-partial-update-attribute-expectation.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-partial-update-attribute-expectation.jsonld deleted file mode 100644 index 0fbbb7c0ff6a751b962e1400bad76a32ff7e8533..0000000000000000000000000000000000000000 --- a/data/temporalEntities/expectations/vehicle-temporal-representation-partial-update-attribute-expectation.jsonld +++ /dev/null @@ -1,37 +0,0 @@ -{ - "id":"urn:ngsi-ld:Vehicle:randomUUID", - "type":"Vehicle", - "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/expectations/vehicle-temporal-representation-update-expectation.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-update-expectation.jsonld index e2bf75b9b28775928f15c8022d932910a83ed937..33fb63cd0ec4099b3aeb49fb3740eefed9581557 100644 --- a/data/temporalEntities/expectations/vehicle-temporal-representation-update-expectation.jsonld +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-update-expectation.jsonld @@ -42,6 +42,6 @@ } ], "@context":[ - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" + "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 diff --git a/data/temporalEntities/fragments/vehicle-temporal-instanceid-update-fragment.jsonld b/data/temporalEntities/fragments/vehicle-temporal-instanceid-update-fragment.jsonld deleted file mode 100644 index df735987814e3c86bea5cd4486b59cf69614438a..0000000000000000000000000000000000000000 --- a/data/temporalEntities/fragments/vehicle-temporal-instanceid-update-fragment.jsonld +++ /dev/null @@ -1,4 +0,0 @@ -{ - "value":129, - "observedAt":"2020-09-01T12:03:00Z" -} \ No newline at end of file diff --git a/data/temporalEntities/fragments/vehicle-temporal-modify-attribute-instance-fragment.jsonld b/data/temporalEntities/fragments/vehicle-temporal-modify-attribute-instance-fragment.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..f9261a4598009ad85546502ec40763a9db3601af --- /dev/null +++ b/data/temporalEntities/fragments/vehicle-temporal-modify-attribute-instance-fragment.jsonld @@ -0,0 +1,7 @@ +[ + { + "type":"Property", + "value":129, + "observedAt":"2020-09-01T12:03:00Z" + } +] \ No newline at end of file diff --git a/resources/ApiUtils.resource b/resources/ApiUtils.resource index 68d3f6de66c1726b42bacbc0ac0dacaeca2f08db..6176176bedbd42f24c5b372994c963c5bd82c4d2 100755 --- a/resources/ApiUtils.resource +++ b/resources/ApiUtils.resource @@ -349,7 +349,7 @@ Append Attribute To Temporal Entity Using Session Set Test Variable ${response} [return] ${response} -Partial Update Attribute From Temporal Entity +Modify Attribute Instance From Temporal Entity [Arguments] ${temporal_entity_id} ${attributeId} ${instanceId} ${fragment_filename} ${content_type} ${context}=${EMPTY} &{headers}= Create Dictionary Content-Type=${content_type} Run Keyword If '${context}'!='' Set To Dictionary ${headers} Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json"