diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_01.robot index 2945ae8eae6c75c750a0b7349696b99a6251471d..543cae57315d1eeb4712294cfc534a77273dd438 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_01.robot @@ -10,7 +10,7 @@ ${filename}= vehicle-speed-two-datasetid-sample.jsonld *** Test Cases *** 010_01_01_Append entity attributes - Append Attributes Without Params 204 vehicle-attribute-to-add-fragment.jsonld + Append Attributes Without Params 204 vehicle-new-attribute-fragment.jsonld 010_01_02_Append entity attributes Append Attributes With Params 207 vehicle-attribute-to-add-fragment.jsonld add-attribute-expectation.jsonld 010_01_03_Append entity attributes diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_03.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_03.robot index 7f790698ebf552b49ddc1e611ca587a8b08b32e9..6a44fa90a1999d7f7c9c8450a7a22349c78c05d5 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/010_03.robot @@ -1,5 +1,5 @@ *** Settings *** -Documentation Check that you cannot append entity attributes if the entity id or attributes are not known to the system +Documentation Check that you cannot append entity attributes if the entity id is not known to the system Resource ${EXECDIR}/resources/ApiUtils.resource Resource ${EXECDIR}/resources/AssertionUtils.resource Resource ${EXECDIR}/resources/JsonUtils.resource @@ -10,7 +10,7 @@ ${fragment_filename}= vehicle-attribute-to-add-fragment.jsonld *** Test Cases *** Append entity attributes when the entity id is not known to the system - [Documentation] Check that you cannot append entity attributes if the entity id or attributes are not known to the system + [Documentation] Check that you cannot append entity attributes if the entity id is not known to the system [Tags] /entities/{entityId}/attrs/ 5_6_3 ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_01.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_01.robot index ea7b4ae70e399acd65c1504fc1cc565a7e979f35..ae829b00f9555db9b8648b3c3c7f60d47656cb93 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_01.robot @@ -12,8 +12,8 @@ ${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 +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 *** Keywords *** Update Attributes @@ -25,8 +25,7 @@ Update Attributes ${request} ${response}= Create Entity Selecting Content Type ${filename} ${entity_id} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response['status']} - ${response}= Partial Update Entity Attributes ${entity_id} ${attribute_id} ${fragment_filename} ${CONTENT_TYPE_JSON} + ${response}= Partial Update Entity Attributes ${entity_id} ${attribute_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} Check Response Status Code ${status_code} ${response['status']} - #TODO: check body response is empty [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_02.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_02.robot index 9dd3a92c9694308da1b8ac1e4f70a609b9915cfc..c01c314b5318d50b52fff730ef2e3508dbd2e86d 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_02.robot @@ -13,12 +13,12 @@ ${filename}= vehicle-two-datasetid-attributes-sample.jsonld ${status_code}= 400 *** Test Cases *** ENTITY_ID ATTRIBUTE_ID FRAGMENT_FILENAME -012_02_01_Make a partial attribute update if the Entity Id is not present ${EMPTY} speed vehicle-speed-equal-datasetid-fragment.jsonld -012_02_02_Make a partial attribute update if the Entity Id is not a valid URI thisisaninvaliduri speed vehicle-speed-equal-datasetid-fragment.jsonld +#012_02_01_Make a partial attribute update if the Entity Id is not present ${EMPTY} speed vehicle-speed-equal-datasetid-fragment.jsonld +#012_02_02_Make a partial attribute update if the Entity Id is not a valid URI thisisaninvaliduri speed vehicle-speed-equal-datasetid-fragment.jsonld 012_02_03_Make a partial attribute update if the Attribute Name is not present ${valid_entity_id} speed vehicle-speed-wrong-name-fragment.jsonld -012_02_04_Make a partial attribute update if the Attribute Id is invalid ${valid_entity_id} invalid vehicle-speed-equal-datasetid-fragment.jsonld -012_02_05_Make a partial attribute update if the Attribute type does not match ${valid_entity_id} speed vehicle-speed-equal-datasetid-different-type-fragment.jsonld -012_02_06_Make a partial attribute update if the entity fragment is empty ${valid_entity_id} speed empty-fragment.jsonld +#012_02_04_Make a partial attribute update if the Attribute Id is invalid ${valid_entity_id} invalid vehicle-speed-equal-datasetid-fragment.jsonld +#012_02_05_Make a partial attribute update if the Attribute type does not match ${valid_entity_id} speed vehicle-speed-equal-datasetid-different-type-fragment.jsonld +#012_02_06_Make a partial attribute update if the entity fragment is empty ${valid_entity_id} speed empty-fragment.jsonld *** Keywords *** Update Attributes diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_03.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_03.robot index 8e87253082a37f9aa034fb52cc1540a5051f8b4e..53dd17091f8d7af3f2b9977da1f09b9329340203 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_03.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/012_03.robot @@ -28,7 +28,7 @@ Partial Update Attributes ${request} ${response}= Create Entity Selecting Content Type ${filename} ${valid_entity_id} ${CONTENT_TYPE_LD_JSON} Check Response Status Code 201 ${response['status']} - ${response}= Partial Update Entity Attributes ${entity_id} ${attribute_id} ${fragment_filename} ${CONTENT_TYPE_JSON} + ${response}= Partial Update Entity Attributes ${entity_id} ${attribute_id} ${fragment_filename} ${CONTENT_TYPE_LD_JSON} Check Response Status Code ${status_code} ${response['status']} Check Response Body Containing ProblemDetails Element Containing Type Element set to ${response} ${ERROR_TYPE_RESOURCE_NOT_FOUND} Check Response Body Containing ProblemDetails Element Containing Title Element ${response} diff --git a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_02.robot b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_02.robot index 3b4f3c29c198ec5f84c238488826603fbfc71d92..263fc5e8e154633eea04f0996e1310629d908b8d 100644 --- a/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_02.robot +++ b/TP/NGSI-LD/ContextSource/Registration/UpdateContextSourceRegistration/034_02.robot @@ -12,14 +12,14 @@ ${filename}= context-source-registration-simple-sample.jsonld ${registration_payload_file_path}= context-source-registration-invalid-sample.jsonld *** Test Case *** -#034_02_01_Update a context source registration by id if the Id is not present -# Update Context Source ${EMPTY} fragments/context-source-registration-different-type-sample.jsonld -#034_02_02_Update a context source registration by id if the Id is not a valid URI -# Update Context Source invalidURI fragments/context-source-registration-different-type-sample.jsonld -#034_02_03_Update a context source registration if the request body is not of the same data type -# Update Context Source ${valid_registration_id} fragments/context-source-registration-different-type-sample.jsonld -#034_02_04_Update a context source registration if you attempt to remove a mandatory property -# Update Context Source ${valid_registration_id} context-source-registration-invalid-structure-sample.jsonld +034_02_01_Update a context source registration by id if the Id is not present + Update Context Source ${EMPTY} fragments/context-source-registration-different-type-sample.jsonld +034_02_02_Update a context source registration by id if the Id is not a valid URI + Update Context Source invalidURI fragments/context-source-registration-different-type-sample.jsonld +034_02_03_Update a context source registration if the request body is not of the same data type + Update Context Source ${valid_registration_id} fragments/context-source-registration-different-type-sample.jsonld +034_02_04_Update a context source registration if you attempt to remove a mandatory property + Update Context Source ${valid_registration_id} context-source-registration-invalid-structure-sample.jsonld 034_02_05_Update a context source registration if the request body is invalid Update a context source registration if the request body is invalid diff --git a/data/entities/expectations/add-attribute-expectation.jsonld b/data/entities/expectations/add-attribute-expectation.jsonld index ff23017270851c894d6ebe662fe62e201aeb6aad..1f9522a6f08ae1bcbe2f2795c3b954a0e3739f2f 100644 --- a/data/entities/expectations/add-attribute-expectation.jsonld +++ b/data/entities/expectations/add-attribute-expectation.jsonld @@ -1,14 +1,6 @@ { - "https://uri.etsi.org/ngsi-ld/default-context/attribute_to_be_added": [ - { - "@type": [ - "https://uri.etsi.org/ngsi-ld/Property" - ], - "https://uri.etsi.org/ngsi-ld/hasValue": [ - { - "@value": 23 - } - ] - } - ] -} \ No newline at end of file + "updated":[ + "https://uri.etsi.org/ngsi-ld/default-context/attribute_to_be_added" + ], + "notUpdated":[ ] + } \ No newline at end of file diff --git a/data/entities/fragmentEntities/vehicle-isparked-fragment.jsonld b/data/entities/fragmentEntities/vehicle-isparked-fragment.jsonld index 54c0d1e17018110fbe7dd63e9e283816ddfa820f..1b59b6f2b42e6d30b7b353d5e0573bbea5de2ba1 100644 --- a/data/entities/fragmentEntities/vehicle-isparked-fragment.jsonld +++ b/data/entities/fragmentEntities/vehicle-isparked-fragment.jsonld @@ -7,5 +7,8 @@ "type": "Relationship", "object": "urn:ngsi-ld:Person:JohnDoe" } - } + }, + "@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-new-attribute-fragment.jsonld b/data/entities/fragmentEntities/vehicle-new-attribute-fragment.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..4ed2fd7bbccb653dd742e05d61af0be6cb95d171 --- /dev/null +++ b/data/entities/fragmentEntities/vehicle-new-attribute-fragment.jsonld @@ -0,0 +1,9 @@ +{ + "attribute_to_be_added": { + "type": "Property", + "value": 23 + }, + "@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-equal-datasetid-fragment.jsonld b/data/entities/fragmentEntities/vehicle-speed-equal-datasetid-fragment.jsonld index 5e832e32882cb305972fd58d2651f051525021b3..c61d72cb005a8c2fc9b32aa8729c6b9f63311cc3 100644 --- a/data/entities/fragmentEntities/vehicle-speed-equal-datasetid-fragment.jsonld +++ b/data/entities/fragmentEntities/vehicle-speed-equal-datasetid-fragment.jsonld @@ -7,5 +7,8 @@ "value": "Speedometer" }, "datasetId": "urn:ngsi-ld:Property:speedometer" - } + }, + "@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-invalid-datasetid-fragment.jsonld b/data/entities/fragmentEntities/vehicle-speed-invalid-datasetid-fragment.jsonld index 8368c5bd9981e64cdf7a162fff9ac39620076827..f25aea7c763a2c06fd25d4f8576a9575e16fffef 100644 --- a/data/entities/fragmentEntities/vehicle-speed-invalid-datasetid-fragment.jsonld +++ b/data/entities/fragmentEntities/vehicle-speed-invalid-datasetid-fragment.jsonld @@ -7,5 +7,8 @@ "value": "Speedometer" }, "datasetId": "" - } + }, + "@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-wrong-name-fragment.jsonld b/data/entities/fragmentEntities/vehicle-speed-wrong-name-fragment.jsonld index e5f1135dbd58309301b0265acb54f3fea2f1c82a..a5a4be17e9ac3472c86a7f0328cb109ae09f00d8 100644 --- a/data/entities/fragmentEntities/vehicle-speed-wrong-name-fragment.jsonld +++ b/data/entities/fragmentEntities/vehicle-speed-wrong-name-fragment.jsonld @@ -11,5 +11,8 @@ "brandName": { "type": "Property", "value": "BMW" - } + }, + "@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/fragments/vehicle-temporal-intanceid-update-fragment.jsonld b/data/temporalEntities/fragments/vehicle-temporal-intanceid-update-fragment.jsonld index 60e19dde1f3c5d4d921a60569611ec77d3d4f0ce..d7433ad6a3222dae4338f16ea712745cddd9965c 100644 --- a/data/temporalEntities/fragments/vehicle-temporal-intanceid-update-fragment.jsonld +++ b/data/temporalEntities/fragments/vehicle-temporal-intanceid-update-fragment.jsonld @@ -7,6 +7,6 @@ } ], "@context":[ - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" + "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/fragments/vehicle-temporal-representation-fragment.jsonld b/data/temporalEntities/fragments/vehicle-temporal-representation-fragment.jsonld index 985d962a8708cf1089ce1b14313aa8780c710322..8a4c0af9f54aafa4558de1c30a9df782daea917c 100644 --- a/data/temporalEntities/fragments/vehicle-temporal-representation-fragment.jsonld +++ b/data/temporalEntities/fragments/vehicle-temporal-representation-fragment.jsonld @@ -17,6 +17,6 @@ } ], "@context":[ - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" + "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/fragments/vehicle-temporal-representation-invalid-json-fragment.jsonld b/data/temporalEntities/fragments/vehicle-temporal-representation-invalid-json-fragment.jsonld index 95b7174fb8ed253e2ed0488d79746743b8874623..b7661abf6906603cc8ffde8baafd72539f642e43 100644 --- a/data/temporalEntities/fragments/vehicle-temporal-representation-invalid-json-fragment.jsonld +++ b/data/temporalEntities/fragments/vehicle-temporal-representation-invalid-json-fragment.jsonld @@ -41,7 +41,7 @@ "observedAt":"2020-09-01T14:07:00Z" } ], - "@context":[ - "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" + "@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