*** Test Cases *** STATUS_CODE FRAGMENT_FILENAME EXPECTATION_FILENAME
011_01_01_Check that you can update existing attributes with no datasetId204vehicle-speed-two-datasetid-01-fragment.jsonld${EMPTY}
011_01_02_Check that you can update existing attributes with the datasetId204vehicle-speed-two-datasetid-02-fragment.jsonld${EMPTY}
011_01_03_Check that you can update only some attributes while others failed207vehicle-speed-two-datasetid-03-fragment.jsonldvehicle-speed-datasetid-expectation.jsonld
011_01_04_Check that you cannot change the type of the attribute204vehicle-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 datasetId204fragments/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 datasetId204vehicle-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 failed207vehicle-speed-two-datasetid-03-fragment.jsonldvehicle-speed-datasetid-expectation.jsonldexpectations/vehicle-multi-attributes-expectation.jsonld
011_01_04_Check that you cannot change the type of the attribute204vehicle-speed-two-datasetid-04-fragment.jsonld${EMPTY}vehicle-two-datasetid-attributes-sample.jsonld
012_01_01_Check that you can partially update an attributevehicle-isparked-fragment.jsonldisParked
012_01_02_Check that you can partially update an attribute by specifying the datasetIdvehicle-speed-equal-datasetid-fragment.jsonldspeed
*** Test Cases *** FRAGMENT_FILENAME ATTRIBUTE_ID EXPECTATION_FILENAME
012_01_01_Check that you can partially update an attributevehicle-isparked-fragment.jsonldisParkedvehicle-isparked-update-expectation.jsonld
012_01_02_Check that you can partially update an attribute by specifying the datasetIdvehicle-speed-equal-datasetid-fragment.jsonldspeedvehicle-update-speed-expectation.jsonld
013_01_01_delete an attribute with the id${EMPTY}false
013_01_02_delete an attribute with the datasetIdurn:ngsi-ld:Property:gpsBxyz123-speedfalse
013_01_03_delete all target attribute instances with a datasetIdurn:ngsi-ld:Property:gpsBxyz123-speedtrue
*** Test Cases *** DATASETID DELETEALL EXPECTATION_FILENAME
013_01_01_delete an attribute with the id${EMPTY}falsevehicle-delete-default-speed-expectation.jsonld
013_01_02_delete an attribute with the datasetIdurn:ngsi-ld:Property:gpsBxyz123-speedfalsevehicle-delete-datasetid-speed-expectation.jsonld
013_01_03_delete all target attribute instances with a datasetIdurn:ngsi-ld:Property:gpsBxyz123-speedtruevehicle-delete-deleteall-speed-expectation.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 Code204${response['status']}
${temporal_entity_expectation_payload}=Load Test SampletemporalEntities/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}
015_01_01_Delete an attribute from a temporal representation of an entity without deleteALL/datasetIDfalse${EMPTY}
015_01_02_Delete an attribute from a temporal representation of an entity with datasetIdfalseurn:ngsi-ld:Vehicle:12345-fuel
015_01_03_Delete an attribute from a temporal representation of an entity with deleteALL/datasetIDtrueurn: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/datasetIDfalse${EMPTY}vehicle-temporal-representation-delete-fuelLevel-expectation.jsonld
015_01_02_Delete an attribute from a temporal representation of an entity with datasetIdfalseurn:ngsi-ld:Vehicle:12345-fuelvehicle-temporal-representation-delete-fuelLevel-datasetid-expectation.jsonld
015_01_03_Delete an attribute from a temporal representation of an entity with deleteALL/datasetIDtrueurn:ngsi-ld:Vehicle:12345-fuelvehicle-temporal-representation-deleteall-fuelLevel-expectation.jsonld
034_01_01_Update a context source registration by idcontext-source-registration-simple-sample.jsonldcontext-source-registration-with-expiration-sample.jsonld
034_01_02_Update a context source registration to never expirecontext-source-registration-with-expiration-sample.jsonldcontext-source-registration-simple-sample.jsonld
*** Test Case *** FILENAME UPDATE_FILENAME
034_01_01_Update a context source registration by idcontext-source-registration-sample.jsonldcontext-source-registration-with-expiration-sample.jsonld
034_01_02_Update a context source registration to never expirecontext-source-registration-with-expiration-sample.jsonldcontext-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 Code201${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 Code204${response['status']}