diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_17.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_17.robot new file mode 100644 index 0000000000000000000000000000000000000000..cf3a12ae67dc8b5e1b533694c953c544278509fb --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_17.robot @@ -0,0 +1,66 @@ +*** Settings *** +Documentation Check that one can retrieve the temporal evolution of an entity following the deletedAt temporal property + +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Test Setup Create Temporal Entity +Test Teardown Delete Initial Temporal Entity +Test Template Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute + + +*** Variables *** +${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: +${vehicle_payload_file}= vehicle-temporal-representation-different-attributes-types.jsonld + + +*** Test Cases *** ATTR_NAME EXPECTATION_FILENAME +020_17_01 With a Property + [Tags] te-retrieve 5_7_3 since_v1.6.1 + fuelLevel vehicle-temporal-representation-property-020-17.jsonld +020_17_02 With a Relationship + [Tags] te-retrieve 5_7_3 since_v1.6.1 + isParkedIn vehicle-temporal-representation-relationship-020-17.jsonld +020_17_03 With a LanguageProperty + [Tags] te-retrieve 5_7_3 4_5_18 since_v1.6.1 + name vehicle-temporal-representation-languageproperty-020-17.jsonld + + +*** Keywords *** +Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute + [Documentation] Check that one can retrieve the temporal evolution of an entity following the deletedAt temporal property + [Arguments] ${attr_name} ${expectation_filename} + ${response}= Delete Entity Attributes + ... entityId=${temporal_entity_representation_id} + ... attributeId=${attr_name} + ... datasetId=${EMPTY} + ... deleteAll=false + ... context=${ngsild_test_suite_context} + + ${response2}= Retrieve Temporal Representation Of Entity + ... temporal_entity_representation_id=${temporal_entity_representation_id} + ... timeproperty=deletedAt + ... context=${ngsild_test_suite_context} + Check Response Status Code 200 ${response2.status_code} + Check Response Body Containing EntityTemporal element + ... filename=${expectation_filename} + ... temporal_entity_representation_id=${temporal_entity_representation_id} + ... response_body=${response2.json()} + ... excluded_regex=deletedAt + Should Have Value In Json + ... json_object=${response2.json()} + ... json_path=['${attr_name}']['deletedAt'] + +Create Temporal Entity + ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${create_response}= Create Temporal Representation Of Entity + ... ${vehicle_payload_file} + ... ${temporal_entity_representation_id} + Check Response Status Code 201 ${create_response.status_code} + Set Suite Variable ${temporal_entity_representation_id} + +Delete Initial Temporal Entity + Delete Temporal Representation Of Entity ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_18.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_18.robot new file mode 100644 index 0000000000000000000000000000000000000000..71ad4dc79a570c1e95aec4cd6c3e1ef706032445 --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_18.robot @@ -0,0 +1,69 @@ +*** Settings *** +Documentation Check that one can retrieve the temporal evolution of an entity following the deletedAt temporal property with temporal values + +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Test Setup Create Temporal Entity +Test Teardown Delete Initial Temporal Entity +Test Template Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute + + +*** Variables *** +${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: +${vehicle_payload_file}= vehicle-temporal-representation-different-attributes-types.jsonld + + +*** Test Cases *** ATTR_NAME SIMPLIFIED_TEMPORAL_KEY EXPECTATION_FILENAME +020_18_01 With a Property + [Tags] te-retrieve 5_7_3 since_v1.6.1 + fuelLevel values vehicle-temporal-values-representation-property-020-18.jsonld +020_18_02 With a Relationship + [Tags] te-retrieve 5_7_3 since_v1.6.1 + isParkedIn objects vehicle-temporal-values-representation-relationship-020-18.jsonld +020_18_03 With a LanguageProperty + [Tags] te-retrieve 5_7_3 4_5_18 since_v1.6.1 + name languageMaps vehicle-temporal-values-representation-languageproperty-020-18.jsonld + + +*** Keywords *** +Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute + [Documentation] Check that one can retrieve the temporal evolution of an entity following the deletedAt temporal property with temporal values + [Arguments] ${attr_name} ${simplified_temporal_key} ${expectation_filename} + ${response}= Delete Entity Attributes + ... entityId=${temporal_entity_representation_id} + ... attributeId=${attr_name} + ... datasetId=${EMPTY} + ... deleteAll=false + ... context=${ngsild_test_suite_context} + + ${response2}= Retrieve Temporal Representation Of Entity + ... temporal_entity_representation_id=${temporal_entity_representation_id} + ... timeproperty=deletedAt + ... options=temporalValues + ... context=${ngsild_test_suite_context} + Check Response Status Code 200 ${response2.status_code} + # Ignore the deletedAt value when checking the response body + Check Response Body Containing EntityTemporal element + ... filename=${expectation_filename} + ... temporal_entity_representation_id=${temporal_entity_representation_id} + ... response_body=${response2.json()} + ... excluded_regex=root\\['${attr_name}'\\]\\['${simplified_temporal_key}'\\]\\[0\\]\\[1\\] + # Check the deletedAt value is present in the response body + Should Have Value In Json + ... json_object=${response2.json()} + ... json_path=['${attr_name}']['${simplified_temporal_key}'][0][1] + +Create Temporal Entity + ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${create_response}= Create Temporal Representation Of Entity + ... ${vehicle_payload_file} + ... ${temporal_entity_representation_id} + Check Response Status Code 201 ${create_response.status_code} + Set Suite Variable ${temporal_entity_representation_id} + +Delete Initial Temporal Entity + Delete Temporal Representation Of Entity ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_19.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_19.robot new file mode 100644 index 0000000000000000000000000000000000000000..ce06dcfc4e52c51e455a0a492e94c3512f46bbad --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_19.robot @@ -0,0 +1,60 @@ +*** Settings *** +Documentation Check that one can retrieve the temporal evolution of a scope following the deletedAt temporal property + +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Test Setup Create Temporal Entity +Test Teardown Delete Initial Temporal Entity +Test Template Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute + + +*** Variables *** +${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: +${vehicle_payload_file}= vehicle-temporal-representation-scope.jsonld + + +*** Test Cases *** EXPECTATION_FILENAME +020_19_01 With a Scope + [Tags] te-retrieve 4_18 5_7_3 6_19_3_1 since_v1.6.1 + vehicle-temporal-representation-property-020-19.jsonld + + +*** Keywords *** +Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute + [Documentation] Check that one can retrieve the temporal evolution of a scope following the deletedAt temporal property + [Arguments] ${expectation_filename} + ${response}= Delete Entity Attributes + ... entityId=${temporal_entity_representation_id} + ... attributeId=scope + ... datasetId=${EMPTY} + ... deleteAll=false + ... context=${ngsild_test_suite_context} + + ${response2}= Retrieve Temporal Representation Of Entity + ... temporal_entity_representation_id=${temporal_entity_representation_id} + ... timeproperty=deletedAt + ... context=${ngsild_test_suite_context} + Check Response Status Code 200 ${response2.status_code} + Check Response Body Containing EntityTemporal element + ... filename=${expectation_filename} + ... temporal_entity_representation_id=${temporal_entity_representation_id} + ... response_body=${response2.json()} + ... excluded_regex=deletedAt + Should Have Value In Json + ... json_object=${response2.json()} + ... json_path=['scope']['deletedAt'] + +Create Temporal Entity + ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${create_response}= Create Temporal Representation Of Entity + ... ${vehicle_payload_file} + ... ${temporal_entity_representation_id} + Check Response Status Code 201 ${create_response.status_code} + Set Suite Variable ${temporal_entity_representation_id} + +Delete Initial Temporal Entity + Delete Temporal Representation Of Entity ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_20.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_20.robot new file mode 100644 index 0000000000000000000000000000000000000000..5ecf2beb410e23cb187157276430363cf0b3c84f --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_20.robot @@ -0,0 +1,61 @@ +*** Settings *** +Documentation Check that one can retrieve the temporal evolution of a scope following the deletedAt temporal property with temporal values + +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationConsumption.resource +Resource ${EXECDIR}/resources/ApiUtils/TemporalContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Test Setup Create Temporal Entity +Test Teardown Delete Initial Temporal Entity +Test Template Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute + + +*** Variables *** +${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: +${vehicle_payload_file}= vehicle-temporal-representation-scope.jsonld + + +*** Test Cases *** EXPECTATION_FILENAME +020_20_01 With a Scope + [Tags] te-retrieve 4_18 5_7_3 6_19_3_1 since_v1.6.1 + vehicle-temporal-representation-property-020-20.jsonld + + +*** Keywords *** +Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute + [Documentation] Check that one can retrieve the temporal evolution of a scope following the deletedAt temporal property with temporal values + [Arguments] ${expectation_filename} + ${response}= Delete Entity Attributes + ... entityId=${temporal_entity_representation_id} + ... attributeId=scope + ... datasetId=${EMPTY} + ... deleteAll=false + ... context=${ngsild_test_suite_context} + + ${response2}= Retrieve Temporal Representation Of Entity + ... temporal_entity_representation_id=${temporal_entity_representation_id} + ... timeproperty=deletedAt + ... options=temporalValues + ... context=${ngsild_test_suite_context} + Check Response Status Code 200 ${response2.status_code} + Check Response Body Containing EntityTemporal element + ... filename=${expectation_filename} + ... temporal_entity_representation_id=${temporal_entity_representation_id} + ... response_body=${response2.json()} + ... excluded_regex=root\\['scope'\\]\\['values'\\]\\[0\\]\\[1\\] + Should Have Value In Json + ... json_object=${response2.json()} + ... json_path=['scope']['values'][0][1] + +Create Temporal Entity + ${temporal_entity_representation_id}= Generate Random Entity Id ${vehicle_id_prefix} + ${create_response}= Create Temporal Representation Of Entity + ... ${vehicle_payload_file} + ... ${temporal_entity_representation_id} + Check Response Status Code 201 ${create_response.status_code} + Set Suite Variable ${temporal_entity_representation_id} + +Delete Initial Temporal Entity + Delete Temporal Representation Of Entity ${temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_01.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_01.robot new file mode 100644 index 0000000000000000000000000000000000000000..72c4959ceec92922e36c6b0de379ac82cc0b6c75 --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_01.robot @@ -0,0 +1,60 @@ +*** Settings *** +Documentation Check that one can merge an entity + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Test Setup Setup Initial Entity +Test Teardown Delete Initial Entity +Test Template Merge Entity Scenarios + + +*** Variables *** +${building_id_prefix}= urn:ngsi-ld:Building: +${entity_payload_filename}= merge/building-merge-data.jsonld + + +*** Test Cases *** FILENAME EXPECTATION_FILENAME +056_01_01 MergeAnEmptyEntity + [Tags] e-merge 5_6_17 6_5_3_4 since_v1.6.1 + building-minimal.jsonld merge/building-non-edited.jsonld +056_01_02 MergeSimpleProperties + [Tags] e-merge 5_6_17 6_5_3_4 since_v1.6.1 + building-simple-attributes-second.jsonld merge/building-attributes-edited.jsonld +056_01_03 MergeSimpleRelationship + [Tags] e-merge 5_6_17 6_5_3_4 since_v1.6.1 + building-relationship.jsonld merge/building-with-relationship.jsonld +056_01_04 MergePropertyWithPartialData + [Tags] e-merge 5_6_17 6_5_3_4 since_v1.6.1 + merge/building-only-airQualityLevel-value.jsonld merge/building-with-changed-airQualityLevel.jsonld + + +*** Keywords *** +Merge Entity Scenarios + [Documentation] Check that one can merge an entity + [Arguments] ${filename} ${expectation_filename} + ${response}= Merge Entity + ... entity_id=${entity_id} + ... entity_filename=${filename} + ... content_type=${CONTENT_TYPE_LD_JSON} + Check Response Status Code 204 ${response.status_code} + + ${response1}= Query Entity + ... id=${entity_id} + ... context=${ngsild_test_suite_context} + ... accept=${CONTENT_TYPE_LD_JSON} + Check Response Body Containing Entity element + ... expectation_filename=${expectation_filename} + ... entity_id=${entity_id} + ... response_body=${response1.json()} + +Setup Initial Entity + ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${response}= Create Entity ${entity_payload_filename} ${entity_id} + Set Test Variable ${entity_id} + Check Response Status Code 201 ${response.status_code} + +Delete Initial Entity + Delete Entity by Id ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_02.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_02.robot new file mode 100644 index 0000000000000000000000000000000000000000..f277ea3076d7459c75b7240e6f9dee9b1b1fa589 --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_02.robot @@ -0,0 +1,56 @@ +*** Settings *** +Documentation Check that if the target entity ID is faulty an error is raised + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Test Setup Setup Initial Entity +Test Teardown Delete Initial Entity +Test Template Merge an existing entity with a faulty ID + + +*** Variables *** +${building_id_prefix} urn:ngsi-ld:Building: +${entity_filename} building-simple-attributes.json +${entity_replacement_filename} building-locatedAt-and-name.json + + +*** Test Cases *** FAULTY_ENTITY_ID EXPECTED_STATUS_CODE +056_02_01 Merge an existing entity giving an invalid Id + [Tags] e-merge 5_6_17 6_5_3_4 since_v1.6.1 + invalidUri 400 +056_02_02 Merge an existing entity without giving an Id + [Tags] e-merge 5_6_17 6_5_3_4 since_v1.6.1 + ${EMPTY} 400 +056_02_03 Merge an existing entity giving a nonexistent Id + [Tags] e-merge 5_6_17 6_5_3_4 since_v1.6.1 + urn:ngsi-ld:Building:Nonexistent 404 + + +*** Keywords *** +Merge an existing entity with a faulty ID + [Documentation] Check that if the target entity ID is faulty an error is raised + [Arguments] ${faulty_entity_id} ${expected_status_code} + + ${response}= Merge Entity + ... entity_id=${faulty_entity_id} + ... entity_filename=${entity_replacement_filename} + ... context=${ngsild_test_suite_context} + ... content_type=${CONTENT_TYPE_JSON} + + Check Response Status Code ${expected_status_code} ${response.status_code} + +Setup Initial Entity + ${entity_id}= Generate Random Entity Id ${building_id_prefix} + Set Test Variable ${entity_id} + ${response}= Create Entity Selecting Content Type + ... ${entity_filename} + ... ${entity_id} + ... ${CONTENT_TYPE_JSON} + ... ${ngsild_test_suite_context} + Check Response Status Code 201 ${response.status_code} + +Delete Initial Entity + Delete Entity by Id ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_03.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_03.robot new file mode 100644 index 0000000000000000000000000000000000000000..3e878bec52c1194265754f9f27216d13af6e7ef5 --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_03.robot @@ -0,0 +1,60 @@ +*** Settings *** +Documentation Check that one can delete an attribute using NGSI-LD Null in a Merge Entity operation + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Test Setup Setup Initial Entity +Test Teardown Delete Initial Entity +Test Template Merge Entity Scenarios + + +*** Variables *** +${building_id_prefix}= urn:ngsi-ld:Building: +${entity_payload_filename}= building-different-attributes-types.jsonld + + +*** Test Cases *** FILENAME EXPECTATION_FILENAME +056_03_01 Delete a Property + [Tags] e-merge 5_6_17 6_5_3_4 4_5_5 since_v1.6.1 + fragmentEntities/ngsild-null/building-null-property.jsonld ngsild-null/building-deleted-property.jsonld +056_03_02 Delete a Relationship + [Tags] e-merge 5_6_17 6_5_3_4 since_v1.6.1 + fragmentEntities/ngsild-null/building-null-relationship.jsonld ngsild-null/building-deleted-relationship.jsonld +056_03_03 Delete a GeoProperty + [Tags] e-merge 5_6_17 6_5_3_4 since_v1.6.1 + fragmentEntities/ngsild-null/building-null-geoproperty.jsonld ngsild-null/building-deleted-geoproperty.jsonld +056_03_04 Delete a LanguageProperty + [Tags] e-merge 5_6_17 6_5_3_4 4_5_18 since_v1.6.1 + fragmentEntities/ngsild-null/building-null-languageproperty.jsonld ngsild-null/building-deleted-languageproperty.jsonld + + +*** Keywords *** +Merge Entity Scenarios + [Documentation] Check that one can delete an attribute using NGSI-LD Null in a Merge Entity operation + [Arguments] ${filename} ${expectation_filename} + ${response}= Merge Entity + ... entity_id=${entity_id} + ... entity_filename=${filename} + ... content_type=${CONTENT_TYPE_LD_JSON} + Check Response Status Code 204 ${response.status_code} + + ${response1}= Query Entity + ... id=${entity_id} + ... context=${ngsild_test_suite_context} + ... accept=${CONTENT_TYPE_LD_JSON} + Check Response Body Containing Entity element + ... expectation_filename=${expectation_filename} + ... entity_id=${entity_id} + ... response_body=${response1.json()} + +Setup Initial Entity + ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${response}= Create Entity ${entity_payload_filename} ${entity_id} + Set Test Variable ${entity_id} + Check Response Status Code 201 ${response.status_code} + +Delete Initial Entity + Delete Entity by Id ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_04.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_04.robot new file mode 100644 index 0000000000000000000000000000000000000000..a2bda14cb761fd10ead887460750998724f45bd0 --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_04.robot @@ -0,0 +1,60 @@ +*** Settings *** +Documentation Check that one can delete a specific attribute instance using NGSI-LD Null in a Merge Entity operation + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Test Setup Setup Initial Entity +Test Teardown Delete Initial Entity +Test Template Merge Entity Scenarios + + +*** Variables *** +${building_id_prefix}= urn:ngsi-ld:Building: +${entity_payload_filename}= building-different-attributes-instances-and-types.jsonld + + +*** Test Cases *** FILENAME EXPECTATION_FILENAME +056_04_01 Delete a Property instance + [Tags] e-merge 5_6_17 6_5_3_4 4_5_5 since_v1.6.1 + fragmentEntities/ngsild-null/building-null-property-instance.jsonld ngsild-null/building-deleted-property-instance.jsonld +056_04_02 Delete a Relationship instance + [Tags] e-merge 5_6_17 6_5_3_4 4_5_5 since_v1.6.1 + fragmentEntities/ngsild-null/building-null-relationship-instance.jsonld ngsild-null/building-deleted-relationship-instance.jsonld +056_04_03 Delete a GeoProperty instance + [Tags] e-merge 5_6_17 6_5_3_4 4_5_5 since_v1.6.1 + fragmentEntities/ngsild-null/building-null-geoproperty-instance.jsonld ngsild-null/building-deleted-geoproperty-instance.jsonld +056_04_04 Delete a LanguageProperty instance + [Tags] e-merge 5_6_17 6_5_3_4 4_5_18 4_5_5 since_v1.6.1 + fragmentEntities/ngsild-null/building-null-languageproperty-instance.jsonld ngsild-null/building-deleted-languageproperty-instance.jsonld + + +*** Keywords *** +Merge Entity Scenarios + [Documentation] Check that one can delete a specific attribute instance using NGSI-LD Null in a Merge Entity operation + [Arguments] ${filename} ${expectation_filename} + ${response}= Merge Entity + ... entity_id=${entity_id} + ... entity_filename=${filename} + ... content_type=${CONTENT_TYPE_LD_JSON} + Check Response Status Code 204 ${response.status_code} + + ${response1}= Query Entity + ... id=${entity_id} + ... context=${ngsild_test_suite_context} + ... accept=${CONTENT_TYPE_LD_JSON} + Check Response Body Containing Entity element + ... expectation_filename=${expectation_filename} + ... entity_id=${entity_id} + ... response_body=${response1.json()} + +Setup Initial Entity + ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${response}= Create Entity ${entity_payload_filename} ${entity_id} + Set Test Variable ${entity_id} + Check Response Status Code 201 ${response.status_code} + +Delete Initial Entity + Delete Entity by Id ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_05.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_05.robot new file mode 100644 index 0000000000000000000000000000000000000000..027e63d08395987b33552015610a0a47c1bc19de --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/MergeEntity/056_05.robot @@ -0,0 +1,60 @@ +*** Settings *** +Documentation Check that one can delete the default attribute instance using NGSI-LD Null in a Merge Entity operation + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Test Setup Setup Initial Entity +Test Teardown Delete Initial Entity +Test Template Merge Entity Scenarios + + +*** Variables *** +${building_id_prefix}= urn:ngsi-ld:Building: +${entity_payload_filename}= building-different-default-attributes-instances-and-types.jsonld + + +*** Test Cases *** FILENAME EXPECTATION_FILENAME +056_05_01 Delete a Property instance + [Tags] e-merge 5_6_17 6_5_3_4 4_5_5 since_v1.6.1 + fragmentEntities/ngsild-null/building-null-property.jsonld ngsild-null/building-deleted-property-default-instance.jsonld +056_05_02 Delete a Relationship instance + [Tags] e-merge 5_6_17 6_5_3_4 4_5_5 since_v1.6.1 + fragmentEntities/ngsild-null/building-null-relationship.jsonld ngsild-null/building-deleted-relationship-default-instance.jsonld +056_05_03 Delete a GeoProperty instance + [Tags] e-merge 5_6_17 6_5_3_4 4_5_5 since_v1.6.1 + fragmentEntities/ngsild-null/building-null-geoproperty.jsonld ngsild-null/building-deleted-geoproperty-default-instance.jsonld +056_05_04 Delete a LanguageProperty instance + [Tags] e-merge 5_6_17 6_5_3_4 4_5_18 4_5_5 since_v1.6.1 + fragmentEntities/ngsild-null/building-null-languageproperty.jsonld ngsild-null/building-deleted-languageproperty-default-instance.jsonld + + +*** Keywords *** +Merge Entity Scenarios + [Documentation] Check that one can delete the default attribute instance using NGSI-LD Null in a Merge Entity operation + [Arguments] ${filename} ${expectation_filename} + ${response}= Merge Entity + ... entity_id=${entity_id} + ... entity_filename=${filename} + ... content_type=${CONTENT_TYPE_LD_JSON} + Check Response Status Code 204 ${response.status_code} + + ${response1}= Query Entity + ... id=${entity_id} + ... context=${ngsild_test_suite_context} + ... accept=${CONTENT_TYPE_LD_JSON} + Check Response Body Containing Entity element + ... expectation_filename=${expectation_filename} + ... entity_id=${entity_id} + ... response_body=${response1.json()} + +Setup Initial Entity + ${entity_id}= Generate Random Entity Id ${building_id_prefix} + ${response}= Create Entity ${entity_payload_filename} ${entity_id} + Set Test Variable ${entity_id} + Check Response Status Code 201 ${response.status_code} + +Delete Initial Entity + Delete Entity by Id ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/ReplaceEntity/054_02.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/ReplaceEntity/054_02.robot index f60447e8a01c9490c6c82c411d5ee7efdd403a55..47b262fe70fa74f29ad5fc59955b8c16e9baabda 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/ReplaceEntity/054_02.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/ReplaceEntity/054_02.robot @@ -24,7 +24,7 @@ ${entity_replacement_filename} building-locatedAt-and-name.json 054_02_02 Replace an existing entity without giving an Id [Tags] e-replace 5_6_18 6_5_3_3 since_v1.6.1 ${EMPTY} 400 -054_02_03 Replace an existing entity giving a nonexsitent Id +054_02_03 Replace an existing entity giving a nonexistent Id [Tags] e-replace 5_6_18 6_5_3_3 since_v1.6.1 urn:ngsi-ld:Building:Nonexistent 404 diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_05.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_05.robot new file mode 100644 index 0000000000000000000000000000000000000000..48bd9fb88fbbef1f8d95a3716981731c69f20712 --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_05.robot @@ -0,0 +1,68 @@ +*** Settings *** +Documentation Check that one can delete an attribute using NGSI-LD Null in an Partial Attribute Update operation + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Test Setup Setup Initial Entity +Test Teardown Delete Initial Entity +Test Template Update Attributes + + +*** Variables *** +${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: +${filename}= building-different-attributes-types.jsonld + + +*** Test Cases *** STATUS_CODE ATTR_NAME FRAGMENT_FILENAME EXPECTATION_FILENAME +012_05_01 Delete a Property + [Tags] ea-partial-update 5_6_4 6_7_3_1 since_v1.6.1 + 204 name ngsild-null/null-property-fragment.jsonld ngsild-null/building-deleted-property.jsonld +012_05_02 Delete a Relationship + [Tags] ea-partial-update 5_6_4 6_7_3_1 since_v1.6.1 + 204 locatedAt ngsild-null/null-relationship-fragment.jsonld ngsild-null/building-deleted-relationship.jsonld +012_05_03 Delete a GeoProperty + [Tags] ea-partial-update 5_6_4 6_7_3_1 since_v1.6.1 + 204 location ngsild-null/null-geoproperty-fragment.jsonld ngsild-null/building-deleted-geoproperty.jsonld +012_05_04 Delete a LanguageProperty + [Tags] ea-partial-update 5_6_4 6_7_3_1 4_5_18 since_v1.6.1 + 204 street ngsild-null/null-languageproperty-fragment.jsonld ngsild-null/building-deleted-languageproperty.jsonld + + +*** Keywords *** +Update Attributes + [Documentation] Check that one can delete an attribute using NGSI-LD Null in an Partial Attribute Update operation + [Arguments] + ... ${status_code} + ... ${attr_name} + ... ${fragment_filename} + ... ${expectation_filename} + ${response}= Partial Update Entity Attributes + ... entityId=${entity_id} + ... attributeId=${attr_name} + ... fragment_filename=${fragment_filename} + ... content_type=${CONTENT_TYPE_LD_JSON} + + Check Response Status Code ${status_code} ${response.status_code} + ${response1}= Retrieve Entity by Id + ... id=${entity_id} + ... context=${ngsild_test_suite_context} + ... accept=${CONTENT_TYPE_LD_JSON} + Check Response Body Containing Entity element + ... expectation_filename=${expectation_filename} + ... entity_id=${entity_id} + ... response_body=${response1.json()} + +Delete Initial Entity + Delete Entity by Id ${entity_id} + +Setup Initial Entity + ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + Set Test Variable ${entity_id} + ${response}= Create Entity Selecting Content Type + ... ${filename} + ... ${entity_id} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${response.status_code} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_06.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_06.robot new file mode 100644 index 0000000000000000000000000000000000000000..3f9beead5a4e28ff6e255bc9c62c827d46c77a52 --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_06.robot @@ -0,0 +1,68 @@ +*** Settings *** +Documentation Check that one can delete a specific attribute instance using NGSI-LD Null in an Partial Attribute Update operation + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Test Setup Setup Initial Entity +Test Teardown Delete Initial Entity +Test Template Update Attributes + + +*** Variables *** +${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: +${filename}= building-different-attributes-instances-and-types.jsonld + + +*** Test Cases *** STATUS_CODE ATTR_NAME FRAGMENT_FILENAME EXPECTATION_FILENAME +012_06_01 Delete a Property + [Tags] ea-partial-update 5_6_4 6_7_3_1 since_v1.6.1 + 204 name ngsild-null/null-property-instance-fragment.jsonld ngsild-null/building-deleted-property-instance.jsonld +012_06_02 Delete a Relationship + [Tags] ea-partial-update 5_6_4 6_7_3_1 since_v1.6.1 + 204 locatedAt ngsild-null/null-relationship-instance-fragment.jsonld ngsild-null/building-deleted-relationship-instance.jsonld +012_06_03 Delete a GeoProperty + [Tags] ea-partial-update 5_6_4 6_7_3_1 since_v1.6.1 + 204 location ngsild-null/null-geoproperty-instance-fragment.jsonld ngsild-null/building-deleted-geoproperty-instance.jsonld +012_06_04 Delete a LanguageProperty + [Tags] ea-partial-update 5_6_4 6_7_3_1 4_5_18 since_v1.6.1 + 204 street ngsild-null/null-languageproperty-instance-fragment.jsonld ngsild-null/building-deleted-languageproperty-instance.jsonld + + +*** Keywords *** +Update Attributes + [Documentation] Check that one can delete a specific attribute instance using NGSI-LD Null in an Partial Attribute Update operation + [Arguments] + ... ${status_code} + ... ${attr_name} + ... ${fragment_filename} + ... ${expectation_filename} + ${response}= Partial Update Entity Attributes + ... entityId=${entity_id} + ... attributeId=${attr_name} + ... fragment_filename=${fragment_filename} + ... content_type=${CONTENT_TYPE_LD_JSON} + + Check Response Status Code ${status_code} ${response.status_code} + ${response1}= Retrieve Entity by Id + ... id=${entity_id} + ... context=${ngsild_test_suite_context} + ... accept=${CONTENT_TYPE_LD_JSON} + Check Response Body Containing Entity element + ... expectation_filename=${expectation_filename} + ... entity_id=${entity_id} + ... response_body=${response1.json()} + +Delete Initial Entity + Delete Entity by Id ${entity_id} + +Setup Initial Entity + ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + Set Test Variable ${entity_id} + ${response}= Create Entity Selecting Content Type + ... ${filename} + ... ${entity_id} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${response.status_code} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_07.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_07.robot new file mode 100644 index 0000000000000000000000000000000000000000..c2a477cbe8cba788518bd1ccb10faa19b718c60a --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_07.robot @@ -0,0 +1,68 @@ +*** Settings *** +Documentation Check that one can delete the default attribute instance using NGSI-LD Null in an Partial Attribute Update operation + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Test Setup Setup Initial Entity +Test Teardown Delete Initial Entity +Test Template Update Attributes + + +*** Variables *** +${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: +${filename}= building-different-default-attributes-instances-and-types.jsonld + + +*** Test Cases *** STATUS_CODE ATTR_NAME FRAGMENT_FILENAME EXPECTATION_FILENAME +012_07_01 Delete a Property + [Tags] ea-partial-update 5_6_4 6_7_3_1 since_v1.6.1 + 204 name ngsild-null/null-property-fragment.jsonld ngsild-null/building-deleted-property-default-instance.jsonld +012_07_02 Delete a Relationship + [Tags] ea-partial-update 5_6_4 6_7_3_1 since_v1.6.1 + 204 locatedAt ngsild-null/null-relationship-fragment.jsonld ngsild-null/building-deleted-relationship-default-instance.jsonld +012_07_03 Delete a GeoProperty + [Tags] ea-partial-update 5_6_4 6_7_3_1 since_v1.6.1 + 204 location ngsild-null/null-geoproperty-fragment.jsonld ngsild-null/building-deleted-geoproperty-default-instance.jsonld +012_07_04 Delete a LanguageProperty + [Tags] ea-partial-update 5_6_4 6_7_3_1 4_5_18 since_v1.6.1 + 204 street ngsild-null/null-languageproperty-fragment.jsonld ngsild-null/building-deleted-languageproperty-default-instance.jsonld + + +*** Keywords *** +Update Attributes + [Documentation] Check that one can delete the default attribute instance using NGSI-LD Null in an Partial Attribute Update operation + [Arguments] + ... ${status_code} + ... ${attr_name} + ... ${fragment_filename} + ... ${expectation_filename} + ${response}= Partial Update Entity Attributes + ... entityId=${entity_id} + ... attributeId=${attr_name} + ... fragment_filename=${fragment_filename} + ... content_type=${CONTENT_TYPE_LD_JSON} + + Check Response Status Code ${status_code} ${response.status_code} + ${response1}= Retrieve Entity by Id + ... id=${entity_id} + ... context=${ngsild_test_suite_context} + ... accept=${CONTENT_TYPE_LD_JSON} + Check Response Body Containing Entity element + ... expectation_filename=${expectation_filename} + ... entity_id=${entity_id} + ... response_body=${response1.json()} + +Delete Initial Entity + Delete Entity by Id ${entity_id} + +Setup Initial Entity + ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + Set Test Variable ${entity_id} + ${response}= Create Entity Selecting Content Type + ... ${filename} + ... ${entity_id} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${response.status_code} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_07.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_07.robot new file mode 100644 index 0000000000000000000000000000000000000000..c38f31ee89061946bba1167070459a71ca05deb9 --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_07.robot @@ -0,0 +1,66 @@ +*** Settings *** +Documentation Check that one can delete an attribute using NGSI-LD Null in an Update Attributes operation + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Test Setup Setup Initial Entity +Test Teardown Delete Initial Entity +Test Template Update Attributes + + +*** Variables *** +${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: +${filename}= building-different-attributes-types.jsonld + + +*** Test Cases *** STATUS_CODE FRAGMENT_FILENAME EXPECTATION_FILENAME +011_07_01 Delete a Property + [Tags] ea-update 5_6_2 6_6_3_2 since_v1.6.1 + 204 ngsild-null/null-property.jsonld ngsild-null/building-deleted-property.jsonld +011_07_02 Delete a Relationship + [Tags] ea-update 5_6_2 6_6_3_2 since_v1.6.1 + 204 ngsild-null/null-relationship.jsonld ngsild-null/building-deleted-relationship.jsonld +011_07_03 Delete a GeoProperty + [Tags] ea-update 5_6_2 6_6_3_2 since_v1.6.1 + 204 ngsild-null/null-geoproperty.jsonld ngsild-null/building-deleted-geoproperty.jsonld +011_07_04 Delete a LanguageProperty + [Tags] ea-update 5_6_2 6_6_3_2 4_5_18 since_v1.6.1 + 204 ngsild-null/null-languageproperty.jsonld ngsild-null/building-deleted-languageproperty.jsonld + + +*** Keywords *** +Update Attributes + [Documentation] Check that one can delete an attribute using NGSI-LD Null in an Update Attributes operation + [Arguments] + ... ${status_code} + ... ${fragment_filename} + ... ${expectation_filename} + ${response}= Update Entity Attributes + ... ${entity_id} + ... ${fragment_filename} + ... ${CONTENT_TYPE_LD_JSON} + + Check Response Status Code ${status_code} ${response.status_code} + ${response1}= Retrieve Entity by Id + ... id=${entity_id} + ... context=${ngsild_test_suite_context} + ... accept=${CONTENT_TYPE_LD_JSON} + Check Response Body Containing Entity element + ... expectation_filename=${expectation_filename} + ... entity_id=${entity_id} + ... response_body=${response1.json()} + +Delete Initial Entity + Delete Entity by Id ${entity_id} + +Setup Initial Entity + ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + Set Test Variable ${entity_id} + ${response}= Create Entity Selecting Content Type + ... ${filename} + ... ${entity_id} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${response.status_code} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_08.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_08.robot new file mode 100644 index 0000000000000000000000000000000000000000..a170a794bf25cce73d5d8a5ff74d0fbcecf18176 --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_08.robot @@ -0,0 +1,66 @@ +*** Settings *** +Documentation Check that one can delete a specific attribute instance using NGSI-LD Null in an Update Attributes operation + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Test Setup Setup Initial Entity +Test Teardown Delete Initial Entity +Test Template Update Attributes + + +*** Variables *** +${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: +${filename}= building-different-attributes-instances-and-types.jsonld + + +*** Test Cases *** STATUS_CODE FRAGMENT_FILENAME EXPECTATION_FILENAME +011_08_01 Delete a Property + [Tags] ea-update 5_6_2 6_6_3_2 since_v1.6.1 + 204 ngsild-null/null-property-instance.jsonld ngsild-null/building-deleted-property-instance.jsonld +011_08_02 Delete a Relationship + [Tags] ea-update 5_6_2 6_6_3_2 since_v1.6.1 + 204 ngsild-null/null-relationship-instance.jsonld ngsild-null/building-deleted-relationship-instance.jsonld +011_08_03 Delete a GeoProperty + [Tags] ea-update 5_6_2 6_6_3_2 since_v1.6.1 + 204 ngsild-null/null-geoproperty-instance.jsonld ngsild-null/building-deleted-geoproperty-instance.jsonld +011_08_04 Delete a LanguageProperty + [Tags] ea-update 5_6_2 6_6_3_2 4_5_18 since_v1.6.1 + 204 ngsild-null/null-languageproperty-instance.jsonld ngsild-null/building-deleted-languageproperty-instance.jsonld + + +*** Keywords *** +Update Attributes + [Documentation] Check that one can delete a specific attribute instance using NGSI-LD Null in an Update Attributes operation + [Arguments] + ... ${status_code} + ... ${fragment_filename} + ... ${expectation_filename} + ${response}= Update Entity Attributes + ... ${entity_id} + ... ${fragment_filename} + ... ${CONTENT_TYPE_LD_JSON} + + Check Response Status Code ${status_code} ${response.status_code} + ${response1}= Retrieve Entity by Id + ... id=${entity_id} + ... context=${ngsild_test_suite_context} + ... accept=${CONTENT_TYPE_LD_JSON} + Check Response Body Containing Entity element + ... expectation_filename=${expectation_filename} + ... entity_id=${entity_id} + ... response_body=${response1.json()} + +Delete Initial Entity + Delete Entity by Id ${entity_id} + +Setup Initial Entity + ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + Set Test Variable ${entity_id} + ${response}= Create Entity Selecting Content Type + ... ${filename} + ... ${entity_id} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${response.status_code} diff --git a/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_09.robot b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_09.robot new file mode 100644 index 0000000000000000000000000000000000000000..f5dd1fb7c9b297feace1ef97feb2fdff84eb5902 --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_09.robot @@ -0,0 +1,66 @@ +*** Settings *** +Documentation Check that one can delete the default attribute instance using NGSI-LD Null in an Update Attributes operation + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Test Setup Setup Initial Entity +Test Teardown Delete Initial Entity +Test Template Update Attributes + + +*** Variables *** +${vehicle_id_prefix}= urn:ngsi-ld:Vehicle: +${filename}= building-different-default-attributes-instances-and-types.jsonld + + +*** Test Cases *** STATUS_CODE FRAGMENT_FILENAME EXPECTATION_FILENAME +011_09_01 Delete a Property + [Tags] ea-update 5_6_2 6_6_3_2 since_v1.6.1 + 204 ngsild-null/null-property.jsonld ngsild-null/building-deleted-property-default-instance.jsonld +011_09_02 Delete a Relationship + [Tags] ea-update 5_6_2 6_6_3_2 since_v1.6.1 + 204 ngsild-null/null-relationship.jsonld ngsild-null/building-deleted-relationship-default-instance.jsonld +011_09_03 Delete a GeoProperty + [Tags] ea-update 5_6_2 6_6_3_2 since_v1.6.1 + 204 ngsild-null/null-geoproperty.jsonld ngsild-null/building-deleted-geoproperty-default-instance.jsonld +011_09_04 Delete a LanguageProperty + [Tags] ea-update 5_6_2 6_6_3_2 4_5_18 since_v1.6.1 + 204 ngsild-null/null-languageproperty.jsonld ngsild-null/building-deleted-languageproperty-default-instance.jsonld + + +*** Keywords *** +Update Attributes + [Documentation] Check that one can delete the default attribute instance using NGSI-LD Null in an Update Attributes operation + [Arguments] + ... ${status_code} + ... ${fragment_filename} + ... ${expectation_filename} + ${response}= Update Entity Attributes + ... ${entity_id} + ... ${fragment_filename} + ... ${CONTENT_TYPE_LD_JSON} + + Check Response Status Code ${status_code} ${response.status_code} + ${response1}= Retrieve Entity by Id + ... id=${entity_id} + ... context=${ngsild_test_suite_context} + ... accept=${CONTENT_TYPE_LD_JSON} + Check Response Body Containing Entity element + ... expectation_filename=${expectation_filename} + ... entity_id=${entity_id} + ... response_body=${response1.json()} + +Delete Initial Entity + Delete Entity by Id ${entity_id} + +Setup Initial Entity + ${entity_id}= Generate Random Entity Id ${vehicle_id_prefix} + Set Test Variable ${entity_id} + ${response}= Create Entity Selecting Content Type + ... ${filename} + ... ${entity_id} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${response.status_code} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_06.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_06.robot index f98d8714a55849ab029684b6d2f0f9998ce3411c..a5bc12c4ff5455fe91ba254b2adce1a153ae12e4 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_06.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_06.robot @@ -1,5 +1,5 @@ *** Settings *** -Documentation If a Subscription does not define a timeInterval member, the notification shall be sent whenever an entity matches the query defined in the subscription. The notification message shall include all the subscribed Entities that changed and that match (as mandated by clauses 4.9 and 4.10) the query and geoquery conditions +Documentation Check that a notification is sent when an entity is created and entityCreated notification trigger is configured Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource @@ -13,7 +13,7 @@ Suite Teardown Delete Server And Subscriptions *** Variables *** ${subscription_id_prefix}= urn:ngsi-ld:Subscription: -${subscription_payload_file_path}= subscriptions/subscription-building-entities-active-query.jsonld +${subscription_payload_file_path}= subscriptions/subscription-building-entities-entityCreated.jsonld ${building_id_prefix}= urn:ngsi-ld:Building: ${building_filename}= building-location-attribute.jsonld ${notification_server_send_url}= http://${notification_server_host}:${notification_server_port}/notify @@ -21,8 +21,8 @@ ${notification_server_send_url}= http://${notification_server_host}:${not *** Test Cases *** 046_06_01 Check that a notification is sent with all matching entities - [Documentation] only the subscribed Entities matching the query and watched attributes shall be included. - [Tags] sub-notification 5_8_6 + [Documentation] Check that a notification is sent when an entity is created and entityCreated notification trigger is configured + [Tags] sub-notification 5_8_6 since_v1.6.1 ${entity_id}= Generate Random Entity Id ${building_id_prefix} Set Suite Variable ${entity_id} diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_21_01.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_21_01.robot new file mode 100644 index 0000000000000000000000000000000000000000..2e5b8f65296dea0afe6c0fd7b9d725105a325d99 --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_21_01.robot @@ -0,0 +1,48 @@ +*** Settings *** +Documentation Check that a notification is sent when an entity is deleted +... and entityDeleted notification trigger is configured + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/NotificationUtils.resource +Resource ${EXECDIR}/resources/SubscriptionUtils.resource + +Test Setup Create Initial Subscription And Entity +Test Teardown Delete Initial Subscription And Entity + + +*** Variables *** +${subscription_payload_file_path}= subscriptions/subscription-building-entities-entityDeleted.jsonld +${building_filename}= building-location-attribute.jsonld + + +*** Test Cases *** +046_21_01 Check that a notification is sent with matching entity + [Documentation] Delete an entity and check the received notification + [Tags] sub-notification 5_8_6 since_v1.6.1 + + ${response}= Delete Entity by Id + ... id=${entity_id} + Check Response Status Code 204 ${response.status_code} + + ${notification} ${headers}= Wait for notification timeout=${10} + + Should be Equal ${subscription_id} ${notification}[subscriptionId] + Length Should Be ${notification}[data] ${1} + ${notified_entity}= Set Variable ${notification}[data][0] + Length Should Be ${notified_entity} ${3} + Should be Equal ${entity_id} ${notified_entity}[id] + Should Have Value In Json + ... json_object=${notified_entity} + ... json_path=['deletedAt'] + + +*** Keywords *** +Create Initial Subscription And Entity + Create Subscription And Entity ${subscription_payload_file_path} ${building_filename} + Start Local Server ${notification_server_host} ${notification_server_port} + +Delete Initial Subscription And Entity + Delete Subscription ${subscription_id} + Stop Local Server diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_21_02.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_21_02.robot new file mode 100644 index 0000000000000000000000000000000000000000..6138ce24e13d813598364c4a914f8ae040024482 --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_21_02.robot @@ -0,0 +1,51 @@ +*** Settings *** +Documentation Check that a notification is sent with sysAttrs when an entity is deleted +... and entityDeleted notification trigger is configured + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/NotificationUtils.resource +Resource ${EXECDIR}/resources/SubscriptionUtils.resource + +Test Setup Create Initial Subscription And Entity +Test Teardown Delete Initial Subscription And Entity + + +*** Variables *** +${subscription_payload_file_path}= subscriptions/subscription-building-entities-entityDeleted-sysAttrs.jsonld +${building_filename}= building-location-attribute.jsonld + + +*** Test Cases *** +046_21_02 Check that a notification is sent with matching entity + [Documentation] Delete an entity and check the received notification + [Tags] sub-notification 5_8_6 since_v1.6.1 + + ${response}= Delete Entity by Id + ... id=${entity_id} + Check Response Status Code 204 ${response.status_code} + + ${notification} ${headers}= Wait for notification timeout=${10} + + Should be Equal ${subscription_id} ${notification}[subscriptionId] + Length Should Be ${notification}[data] ${1} + ${notified_entity}= Set Variable ${notification}[data][0] + Length Should Be ${notified_entity} ${4} + Should be Equal ${entity_id} ${notified_entity}[id] + Should Have Value In Json + ... json_object=${notified_entity} + ... json_path=['createdAt'] + Should Have Value In Json + ... json_object=${notified_entity} + ... json_path=['deletedAt'] + + +*** Keywords *** +Create Initial Subscription And Entity + Create Subscription And Entity ${subscription_payload_file_path} ${building_filename} + Start Local Server ${notification_server_host} ${notification_server_port} + +Delete Initial Subscription And Entity + Delete Subscription ${subscription_id} + Stop Local Server diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_01.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_01.robot new file mode 100644 index 0000000000000000000000000000000000000000..25ed9e54fe851132ebfdb60486f0b5eb2ce4e1d3 --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_01.robot @@ -0,0 +1,50 @@ +*** Settings *** +Documentation Check that a notification is sent with keyValues when an attribute is deleted +... and attributeDeleted notification trigger is configured + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/NotificationUtils.resource +Resource ${EXECDIR}/resources/SubscriptionUtils.resource + +Test Setup Create Initial Subscription And Entity +Test Teardown Delete Initial Subscription And Entity + + +*** Variables *** +${subscription_payload_file_path}= subscriptions/subscription-building-entities-attributeDeleted-keyValues.jsonld +${building_filename}= building-simple-attributes.jsonld +${entity_expectation_file_path}= entity-deleted-name-attribute-keyValues.json + + +*** Test Cases *** +046_22_01 Check that a notification is sent with matching entity + [Documentation] Delete an attribute and check the received notification + [Tags] sub-notification 5_8_6 since_v1.6.1 + + ${response}= Delete Entity Attributes + ... entityId=${entity_id} + ... attributeId=name + ... datasetId=${EMPTY} + ... deleteAll=${EMPTY} + ... context=${ngsild_test_suite_context} + Check Response Status Code 204 ${response.status_code} + + ${notification} ${headers}= Wait for notification timeout=${10} + Should be Equal ${subscription_id} ${notification}[subscriptionId] + Should be Equal ${entity_id} ${notification}[data][0][id] + Check Notification Containing Entity Element + ... ${entity_expectation_file_path} + ... ${notification} + + +*** Keywords *** +Create Initial Subscription And Entity + Create Subscription And Entity ${subscription_payload_file_path} ${building_filename} + Start Local Server ${notification_server_host} ${notification_server_port} + +Delete Initial Subscription And Entity + Delete Subscription ${subscription_id} + Delete Entity by Id ${entity_id} + Stop Local Server diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_02.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_02.robot new file mode 100644 index 0000000000000000000000000000000000000000..aeffec03624ce8b5f976546f3962486d4e2e4662 --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_02.robot @@ -0,0 +1,52 @@ +*** Settings *** +Documentation Check that a notification is sent with keyValues when an attribute is deleted +... and attributeDeleted notification trigger is configured for this specific attribute + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/NotificationUtils.resource +Resource ${EXECDIR}/resources/SubscriptionUtils.resource + +Test Setup Create Initial Subscription And Entity +Test Teardown Delete Initial Subscription And Entity + + +*** Variables *** +${subscription_payload_file_path}= subscriptions/subscription-building-entities-attributeDeleted-specific-attribute-keyValues.jsonld +${building_filename}= building-simple-attributes.jsonld +${entity_expectation_file_path}= entity-deleted-name-attribute-keyValues.json + + +*** Test Cases *** +046_22_02 Check that a notification is sent with matching entity + [Documentation] Delete an attribute and check the received notification + [Tags] sub-notification 5_8_6 since_v1.6.1 + + ${response}= Delete Entity Attributes + ... entityId=${entity_id} + ... attributeId=name + ... datasetId=${EMPTY} + ... deleteAll=${EMPTY} + ... context=${ngsild_test_suite_context} + Check Response Status Code 204 ${response.status_code} + + ${notification} ${headers}= Wait for notification timeout=${10} + + Should be Equal ${subscription_id} ${notification}[subscriptionId] + Length Should Be ${notification}[data] ${1} + Should be Equal ${entity_id} ${notification}[data][0][id] + Check Notification Containing Entity Element + ... ${entity_expectation_file_path} + ... ${notification} + + +*** Keywords *** +Create Initial Subscription And Entity + Create Subscription And Entity ${subscription_payload_file_path} ${building_filename} + Start Local Server ${notification_server_host} ${notification_server_port} + +Delete Initial Subscription And Entity + Delete Subscription ${subscription_id} + Delete Entity by Id ${entity_id} + Stop Local Server diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_03.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_03.robot new file mode 100644 index 0000000000000000000000000000000000000000..f7a5cf821073fb3874a2e81582f36801a450e944 --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_03.robot @@ -0,0 +1,44 @@ +*** Settings *** +Documentation Check that a notification is not sent when an attribute is deleted +... and attributeDeleted notification trigger is not configured for this specific attribute + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/NotificationUtils.resource +Resource ${EXECDIR}/resources/SubscriptionUtils.resource + +Test Setup Create Initial Subscription And Entity +Test Teardown Delete Initial Subscription And Entity + + +*** Variables *** +${subscription_payload_file_path}= subscriptions/subscription-building-entities-attributeDeleted-specific-attribute-keyValues.jsonld +${building_filename}= building-simple-attributes.jsonld + + +*** Test Cases *** +046_22_03 Check that a notification is not sent with updated entity + [Documentation] Delete a not watched attribute and check no notification is received + [Tags] sub-notification 5_8_6 since_v1.6.1 + + ${response}= Delete Entity Attributes + ... entityId=${entity_id} + ... attributeId=airQualityLevel + ... datasetId=${EMPTY} + ... deleteAll=${EMPTY} + ... context=${ngsild_test_suite_context} + Check Response Status Code 204 ${response.status_code} + + ${notification} ${headers}= Wait for no notification timeout=${10} + + +*** Keywords *** +Create Initial Subscription And Entity + Create Subscription And Entity ${subscription_payload_file_path} ${building_filename} + Start Local Server ${notification_server_host} ${notification_server_port} + +Delete Initial Subscription And Entity + Delete Subscription ${subscription_id} + Delete Entity by Id ${entity_id} + Stop Local Server diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_04.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_04.robot new file mode 100644 index 0000000000000000000000000000000000000000..ec7f5e8e0e5d5aaaab51c7d0d73d1c8a1b31a42c --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_04.robot @@ -0,0 +1,52 @@ +*** Settings *** +Documentation Check that a notification is sent in normalized format when an attribute is deleted +... and attributeDeleted notification trigger is configured for this specific attribute + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/NotificationUtils.resource +Resource ${EXECDIR}/resources/SubscriptionUtils.resource + +Test Setup Create Initial Subscription And Entity +Test Teardown Delete Initial Subscription And Entity + + +*** Variables *** +${subscription_payload_file_path}= subscriptions/subscription-building-entities-attributeDeleted-specific-attribute-normalized.jsonld +${building_filename}= building-simple-attributes.jsonld +${entity_expectation_file_path}= entity-deleted-name-attribute-normalized.json + + +*** Test Cases *** +046_22_04 Check that a notification is sent with matching entity + [Documentation] Delete an attribute and check the received notification + [Tags] sub-notification 5_8_6 since_v1.6.1 + + ${response}= Delete Entity Attributes + ... entityId=${entity_id} + ... attributeId=name + ... datasetId=${EMPTY} + ... deleteAll=${EMPTY} + ... context=${ngsild_test_suite_context} + Check Response Status Code 204 ${response.status_code} + + ${notification} ${headers}= Wait for notification timeout=${10} + + Should be Equal ${subscription_id} ${notification}[subscriptionId] + Length Should Be ${notification}[data] ${1} + Should be Equal ${entity_id} ${notification}[data][0][id] + Check Notification Containing Entity Element + ... ${entity_expectation_file_path} + ... ${notification} + + +*** Keywords *** +Create Initial Subscription And Entity + Create Subscription And Entity ${subscription_payload_file_path} ${building_filename} + Start Local Server ${notification_server_host} ${notification_server_port} + +Delete Initial Subscription And Entity + Delete Subscription ${subscription_id} + Delete Entity by Id ${entity_id} + Stop Local Server diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_05.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_05.robot new file mode 100644 index 0000000000000000000000000000000000000000..5c0c837f5d5836613f0733070f4b72eb0e4b0888 --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_05.robot @@ -0,0 +1,51 @@ +*** Settings *** +Documentation Check that a notification is sent in normalized format with sysAttrs when an attribute is deleted +... and attributeDeleted notification trigger is configured for this specific attribute + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/NotificationUtils.resource +Resource ${EXECDIR}/resources/SubscriptionUtils.resource + +Test Setup Create Initial Subscription And Entity +Test Teardown Delete Initial Subscription And Entity + + +*** Variables *** +${subscription_payload_file_path}= subscriptions/subscription-building-entities-attributeDeleted-specific-attribute-normalized-sysAttrs.jsonld +${building_filename}= building-simple-attributes.jsonld + + +*** Test Cases *** +046_22_05 Check that a notification is sent with matching entity + [Documentation] Delete an attribute and check the received notification + [Tags] sub-notification 5_8_6 since_v1.6.1 + + ${response}= Delete Entity Attributes + ... entityId=${entity_id} + ... attributeId=name + ... datasetId=${EMPTY} + ... deleteAll=${EMPTY} + ... context=${ngsild_test_suite_context} + Check Response Status Code 204 ${response.status_code} + + ${notification} ${headers}= Wait for notification timeout=${10} + + Should be Equal ${subscription_id} ${notification}[subscriptionId] + Length Should Be ${notification}[data] ${1} + Should be Equal ${entity_id} ${notification}[data][0][id] + Should Have Value In Json + ... json_object=${notification}[data][0][name] + ... json_path=['deletedAt'] + + +*** Keywords *** +Create Initial Subscription And Entity + Create Subscription And Entity ${subscription_payload_file_path} ${building_filename} + Start Local Server ${notification_server_host} ${notification_server_port} + +Delete Initial Subscription And Entity + Delete Subscription ${subscription_id} + Delete Entity by Id ${entity_id} + Stop Local Server diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_06.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_06.robot new file mode 100644 index 0000000000000000000000000000000000000000..09856c7d3fd88355a722e67c2681d1a125f2b99f --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_06.robot @@ -0,0 +1,52 @@ +*** Settings *** +Documentation Check that a notification is sent in normalized format when an attribute with a specific datasetId is deleted +... and attributeDeleted notification trigger is configured for this specific attribute + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/NotificationUtils.resource +Resource ${EXECDIR}/resources/SubscriptionUtils.resource + +Test Setup Create Initial Subscription And Entity +Test Teardown Delete Initial Subscription And Entity + + +*** Variables *** +${subscription_payload_file_path}= subscriptions/subscription-building-entities-attributeDeleted-specific-attribute-normalized.jsonld +${building_filename}= building-multi-instances-attributes.jsonld +${entity_expectation_file_path}= entity-deleted-name-attribute-instance-normalized.json + + +*** Test Cases *** +046_22_06 Check that a notification is sent with matching entity + [Documentation] Delete an attribute with a specific datasetId and check the received notification + [Tags] sub-notification 5_8_6 4_5_5 since_v1.6.1 + + ${response}= Delete Entity Attributes + ... entityId=${entity_id} + ... attributeId=name + ... datasetId=urn:ngsi-ld:Dataset:french-name + ... deleteAll=${EMPTY} + ... context=${ngsild_test_suite_context} + Check Response Status Code 204 ${response.status_code} + + ${notification} ${headers}= Wait for notification timeout=${10} + + Should be Equal ${subscription_id} ${notification}[subscriptionId] + Length Should Be ${notification}[data] ${1} + Should be Equal ${entity_id} ${notification}[data][0][id] + Check Notification Containing Entity Element + ... ${entity_expectation_file_path} + ... ${notification} + + +*** Keywords *** +Create Initial Subscription And Entity + Create Subscription And Entity ${subscription_payload_file_path} ${building_filename} + Start Local Server ${notification_server_host} ${notification_server_port} + +Delete Initial Subscription And Entity + Delete Subscription ${subscription_id} + Delete Entity by Id ${entity_id} + Stop Local Server diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_07.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_07.robot new file mode 100644 index 0000000000000000000000000000000000000000..5d1f1e3b2a0205b44433bb2263d30fd9bcd0bb8c --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_07.robot @@ -0,0 +1,52 @@ +*** Settings *** +Documentation Check that a notification is sent with keyValues when an attribute with a specific datasetId is deleted +... and attributeDeleted notification trigger is configured for this specific attribute + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/NotificationUtils.resource +Resource ${EXECDIR}/resources/SubscriptionUtils.resource + +Test Setup Create Initial Subscription And Entity +Test Teardown Delete Initial Subscription And Entity + + +*** Variables *** +${subscription_payload_file_path}= subscriptions/subscription-building-entities-attributeDeleted-specific-attribute-keyValues.jsonld +${building_filename}= building-multi-instances-attributes.jsonld +${entity_expectation_file_path}= entity-deleted-name-attribute-instance-keyValues.json + + +*** Test Cases *** +046_22_07 Check that a notification is sent with matching entity + [Documentation] Delete an attribute with a specific datasetId and check the received notification + [Tags] sub-notification 5_8_6 4_5_5 since_v1.6.1 + + ${response}= Delete Entity Attributes + ... entityId=${entity_id} + ... attributeId=name + ... datasetId=urn:ngsi-ld:Dataset:french-name + ... deleteAll=${EMPTY} + ... context=${ngsild_test_suite_context} + Check Response Status Code 204 ${response.status_code} + + ${notification} ${headers}= Wait for notification timeout=${10} + + Should be Equal ${subscription_id} ${notification}[subscriptionId] + Length Should Be ${notification}[data] ${1} + Should be Equal ${entity_id} ${notification}[data][0][id] + Check Notification Containing Entity Element + ... ${entity_expectation_file_path} + ... ${notification} + + +*** Keywords *** +Create Initial Subscription And Entity + Create Subscription And Entity ${subscription_payload_file_path} ${building_filename} + Start Local Server ${notification_server_host} ${notification_server_port} + +Delete Initial Subscription And Entity + Delete Subscription ${subscription_id} + Delete Entity by Id ${entity_id} + Stop Local Server diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_08.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_08.robot new file mode 100644 index 0000000000000000000000000000000000000000..caa9fd639b0a67e3ea22c8382b319e00c7118cf3 --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_08.robot @@ -0,0 +1,53 @@ +*** Settings *** +Documentation Check that a notification is sent when all instances of an attribute are deleted +... and attributeDeleted notification trigger is configured for this specific attribute + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/NotificationUtils.resource +Resource ${EXECDIR}/resources/SubscriptionUtils.resource + +Test Setup Create Initial Subscription And Entity +Test Teardown Delete Initial Subscription And Entity + + +*** Variables *** +${subscription_payload_file_path}= subscriptions/subscription-building-entities-attributeDeleted-specific-attribute-normalized.jsonld +${building_filename}= building-multi-instances-attributes.jsonld +${entity_expectation_file_path}= entity-deleted-name-attribute-instance-normalized.json + + +*** Test Cases *** +046_22_08 Check that a notification is sent with matching entity + [Documentation] Delete all instances of an attribute and check the received notification + [Tags] sub-notification 5_8_6 4_5_5 since_v1.6.1 + + ${response}= Delete Entity Attributes + ... entityId=${entity_id} + ... attributeId=name + ... datasetId=${EMPTY} + ... deleteAll=${true} + ... context=${ngsild_test_suite_context} + Check Response Status Code 204 ${response.status_code} + + ${notification} ${headers}= Wait for notification timeout=${10} + + Should be Equal ${subscription_id} ${notification}[subscriptionId] + Length Should Be ${notification}[data] ${1} + Should be Equal ${entity_id} ${notification}[data][0][id] + Check JSON Value In Response Body + ... json_path_expr=['name']['value'] + ... value_to_check=urn:ngsi-ld:null + ... response_body=${notification}[data][0] + + +*** Keywords *** +Create Initial Subscription And Entity + Create Subscription And Entity ${subscription_payload_file_path} ${building_filename} + Start Local Server ${notification_server_host} ${notification_server_port} + +Delete Initial Subscription And Entity + Delete Subscription ${subscription_id} + Delete Entity by Id ${entity_id} + Stop Local Server diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_09.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_09.robot new file mode 100644 index 0000000000000000000000000000000000000000..3d9162c684138ea31f71f46cda12f584fb5bfaad --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_09.robot @@ -0,0 +1,89 @@ +*** Settings *** +Documentation Check that a notification is sent in normalized format when an attribute is deleted via NGSI-LD Null +... in a Merge Entity operation and attributeDeleted notification trigger is configured for this specific attribute + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/NotificationUtils.resource +Resource ${EXECDIR}/resources/SubscriptionUtils.resource + +Test Setup Create Initial Subscription And Entity +Test Teardown Delete Initial Subscription And Entity + + +*** Variables *** +${subscription_payload_file_path}= subscriptions/subscription-building-entities-attributeDeleted-specific-attribute-normalized.jsonld +${building_filename}= building-different-attributes-types.jsonld +${entity_expectation_file_path}= entity-different-attributes-types-deleted-name-attribute-normalized.json + + +*** Test Cases *** +046_22_09_01 Check that a notification is sent with matching entity when deleting via Merge Entity operation + [Documentation] Delete an attribute via Merge Entity operation and check the received notification + [Tags] sub-notification 5_8_6 since_v1.6.1 + + ${response}= Merge Entity + ... entity_id=${entity_id} + ... entity_filename=fragmentEntities/ngsild-null/building-null-property.jsonld + ... content_type=${CONTENT_TYPE_LD_JSON} + Check Response Status Code 204 ${response.status_code} + + ${notification} ${headers}= Wait for notification timeout=${10} + + Should be Equal ${subscription_id} ${notification}[subscriptionId] + Length Should Be ${notification}[data] ${1} + Should be Equal ${entity_id} ${notification}[data][0][id] + Check Notification Containing Entity Element + ... ${entity_expectation_file_path} + ... ${notification} + +046_22_09_02 Check that a notification is sent with matching entity when deleting via Update Attributes operation + [Documentation] Delete an attribute via Update Attributes operation and check the received notification + [Tags] sub-notification 5_8_6 since_v1.6.1 + + ${response}= Update Entity Attributes + ... id=${entity_id} + ... fragment_filename=ngsild-null/null-property.jsonld + ... content_type=${CONTENT_TYPE_LD_JSON} + Check Response Status Code 204 ${response.status_code} + + ${notification} ${headers}= Wait for notification timeout=${10} + + Should be Equal ${subscription_id} ${notification}[subscriptionId] + Length Should Be ${notification}[data] ${1} + Should be Equal ${entity_id} ${notification}[data][0][id] + Check Notification Containing Entity Element + ... ${entity_expectation_file_path} + ... ${notification} + +046_22_09_03 Check that a notification is sent with matching entity when deleting via Partial Attribute Update operation + [Documentation] Delete an attribute via Update Partial Attribute Update operation and check the received notification + [Tags] sub-notification 5_8_6 since_v1.6.1 + + ${response}= Partial Update Entity Attributes + ... entityId=${entity_id} + ... attributeId=name + ... fragment_filename=ngsild-null/null-property-fragment.jsonld + ... content_type=${CONTENT_TYPE_LD_JSON} + Check Response Status Code 204 ${response.status_code} + + ${notification} ${headers}= Wait for notification timeout=${10} + + Should be Equal ${subscription_id} ${notification}[subscriptionId] + Length Should Be ${notification}[data] ${1} + Should be Equal ${entity_id} ${notification}[data][0][id] + Check Notification Containing Entity Element + ... ${entity_expectation_file_path} + ... ${notification} + + +*** Keywords *** +Create Initial Subscription And Entity + Create Subscription And Entity ${subscription_payload_file_path} ${building_filename} + Start Local Server ${notification_server_host} ${notification_server_port} + +Delete Initial Subscription And Entity + Delete Subscription ${subscription_id} + Delete Entity by Id ${entity_id} + Stop Local Server diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_10.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_10.robot new file mode 100644 index 0000000000000000000000000000000000000000..fd960fb8f3abb6e2b8dafb2f24c816ef702f6eae --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_10.robot @@ -0,0 +1,89 @@ +*** Settings *** +Documentation Check that a notification is sent in normalized format when a relationship is deleted via NGSI-LD Null +... in a Merge Entity operation and attributeDeleted notification trigger is configured for this specific relationship + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/NotificationUtils.resource +Resource ${EXECDIR}/resources/SubscriptionUtils.resource + +Test Setup Create Initial Subscription And Entity +Test Teardown Delete Initial Subscription And Entity + + +*** Variables *** +${subscription_payload_file_path}= subscriptions/subscription-building-entities-attributeDeleted-relationship-normalized.jsonld +${building_filename}= building-different-attributes-types.jsonld +${entity_expectation_file_path}= entity-different-attributes-types-deleted-locatedAt-attribute-normalized.json + + +*** Test Cases *** +046_22_10_01 Check that a notification is sent with matching entity when deleting via Merge Entity operation + [Documentation] Delete a relationship via Merge Entity operation and check the received notification + [Tags] sub-notification 5_8_6 since_v1.6.1 + + ${response}= Merge Entity + ... entity_id=${entity_id} + ... entity_filename=fragmentEntities/ngsild-null/building-null-relationship.jsonld + ... content_type=${CONTENT_TYPE_LD_JSON} + Check Response Status Code 204 ${response.status_code} + + ${notification} ${headers}= Wait for notification timeout=${10} + + Should be Equal ${subscription_id} ${notification}[subscriptionId] + Length Should Be ${notification}[data] ${1} + Should be Equal ${entity_id} ${notification}[data][0][id] + Check Notification Containing Entity Element + ... ${entity_expectation_file_path} + ... ${notification} + +046_22_10_02 Check that a notification is sent with matching entity when deleting via Update Attributes operation + [Documentation] Delete a relationship via Update Attributes operation and check the received notification + [Tags] sub-notification 5_8_6 since_v1.6.1 + + ${response}= Update Entity Attributes + ... id=${entity_id} + ... fragment_filename=ngsild-null/null-relationship.jsonld + ... content_type=${CONTENT_TYPE_LD_JSON} + Check Response Status Code 204 ${response.status_code} + + ${notification} ${headers}= Wait for notification timeout=${10} + + Should be Equal ${subscription_id} ${notification}[subscriptionId] + Length Should Be ${notification}[data] ${1} + Should be Equal ${entity_id} ${notification}[data][0][id] + Check Notification Containing Entity Element + ... ${entity_expectation_file_path} + ... ${notification} + +046_22_10_03 Check that a notification is sent with matching entity when deleting via Partial Attribute Update operation + [Documentation] Delete a relationship via Update Partial Attribute Update operation and check the received notification + [Tags] sub-notification 5_8_6 since_v1.6.1 + + ${response}= Partial Update Entity Attributes + ... entityId=${entity_id} + ... attributeId=locatedAt + ... fragment_filename=ngsild-null/null-relationship-fragment.jsonld + ... content_type=${CONTENT_TYPE_LD_JSON} + Check Response Status Code 204 ${response.status_code} + + ${notification} ${headers}= Wait for notification timeout=${10} + + Should be Equal ${subscription_id} ${notification}[subscriptionId] + Length Should Be ${notification}[data] ${1} + Should be Equal ${entity_id} ${notification}[data][0][id] + Check Notification Containing Entity Element + ... ${entity_expectation_file_path} + ... ${notification} + + +*** Keywords *** +Create Initial Subscription And Entity + Create Subscription And Entity ${subscription_payload_file_path} ${building_filename} + Start Local Server ${notification_server_host} ${notification_server_port} + +Delete Initial Subscription And Entity + Delete Subscription ${subscription_id} + Delete Entity by Id ${entity_id} + Stop Local Server diff --git a/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_11.robot b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_11.robot new file mode 100644 index 0000000000000000000000000000000000000000..69d425a8665a289527289a917bacf91d56dec0ea --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_11.robot @@ -0,0 +1,89 @@ +*** Settings *** +Documentation Check that a notification is sent in normalized format when a language property is deleted via NGSI-LD Null +... in a Merge Entity operation and attributeDeleted notification trigger is configured for this specific property + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/NotificationUtils.resource +Resource ${EXECDIR}/resources/SubscriptionUtils.resource + +Test Setup Create Initial Subscription And Entity +Test Teardown Delete Initial Subscription And Entity + + +*** Variables *** +${subscription_payload_file_path}= subscriptions/subscription-building-entities-attributeDeleted-languageproperty-normalized.jsonld +${building_filename}= building-different-attributes-types.jsonld +${entity_expectation_file_path}= entity-different-attributes-types-deleted-street-attribute-normalized.json + + +*** Test Cases *** +046_22_11_01 Check that a notification is sent with matching entity when deleting via Merge Entity operation + [Documentation] Delete a language property via Merge Entity operation and check the received notification + [Tags] sub-notification 5_8_6 4_5_18 since_v1.6.1 + + ${response}= Merge Entity + ... entity_id=${entity_id} + ... entity_filename=fragmentEntities/ngsild-null/building-null-languageproperty.jsonld + ... content_type=${CONTENT_TYPE_LD_JSON} + Check Response Status Code 204 ${response.status_code} + + ${notification} ${headers}= Wait for notification timeout=${10} + + Should be Equal ${subscription_id} ${notification}[subscriptionId] + Length Should Be ${notification}[data] ${1} + Should be Equal ${entity_id} ${notification}[data][0][id] + Check Notification Containing Entity Element + ... ${entity_expectation_file_path} + ... ${notification} + +046_22_11_02 Check that a notification is sent with matching entity when deleting via Update Attributes operation + [Documentation] Delete a language property via Update Attributes operation and check the received notification + [Tags] sub-notification 5_8_6 4_5_18 since_v1.6.1 + + ${response}= Update Entity Attributes + ... id=${entity_id} + ... fragment_filename=ngsild-null/null-languageproperty.jsonld + ... content_type=${CONTENT_TYPE_LD_JSON} + Check Response Status Code 204 ${response.status_code} + + ${notification} ${headers}= Wait for notification timeout=${10} + + Should be Equal ${subscription_id} ${notification}[subscriptionId] + Length Should Be ${notification}[data] ${1} + Should be Equal ${entity_id} ${notification}[data][0][id] + Check Notification Containing Entity Element + ... ${entity_expectation_file_path} + ... ${notification} + +046_22_11_03 Check that a notification is sent with matching entity when deleting via Partial Attribute Update operation + [Documentation] Delete a language property via Update Partial Attribute Update operation and check the received notification + [Tags] sub-notification 5_8_6 4_5_18 since_v1.6.1 + + ${response}= Partial Update Entity Attributes + ... entityId=${entity_id} + ... attributeId=street + ... fragment_filename=ngsild-null/null-languageproperty-fragment.jsonld + ... content_type=${CONTENT_TYPE_LD_JSON} + Check Response Status Code 204 ${response.status_code} + + ${notification} ${headers}= Wait for notification timeout=${10} + + Should be Equal ${subscription_id} ${notification}[subscriptionId] + Length Should Be ${notification}[data] ${1} + Should be Equal ${entity_id} ${notification}[data][0][id] + Check Notification Containing Entity Element + ... ${entity_expectation_file_path} + ... ${notification} + + +*** Keywords *** +Create Initial Subscription And Entity + Create Subscription And Entity ${subscription_payload_file_path} ${building_filename} + Start Local Server ${notification_server_host} ${notification_server_port} + +Delete Initial Subscription And Entity + Delete Subscription ${subscription_id} + Delete Entity by Id ${entity_id} + Stop Local Server diff --git a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_06.robot b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_06.robot index c51ad7a438b6f2f86ac04e94272124efaeee6abb..45b847e297c51fa3908a021cc816888c8efadc3e 100644 --- a/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_06.robot +++ b/TP/NGSI-LD/ContextInformation/Subscription/UpdateSubscription/029_06.robot @@ -31,7 +31,7 @@ ${subscription_update_fragment_file_path}= subscriptions/fragments/subscrip ... id=${subscription_id} ... accept=${CONTENT_TYPE_LD_JSON} ... context=${ngsild_test_suite_context} - ${ignored_attributes}= Create List ${status_regex_expr} + ${ignored_attributes}= Create List ${status_regex_expr} notificationTrigger Check Updated Resource Set To ... updated_resource=${subscription} ... response_body=${response1.json()} diff --git a/data/entities/building-different-attributes-instances-and-types.jsonld b/data/entities/building-different-attributes-instances-and-types.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..68ac0f1dc43997d39a651120affa7493ebc8515a --- /dev/null +++ b/data/entities/building-different-attributes-instances-and-types.jsonld @@ -0,0 +1,71 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "name": [ + { + "type": "Property", + "value": "Eiffel Tower", + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + { + "type": "Property", + "value": "The iron lady", + "datasetId": "urn:ngsi-ld:Dataset:02" + } + ], + "locatedAt": [ + { + "type": "Relationship", + "object": "urn:ngsi-ld:City:Paris", + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + { + "type": "Relationship", + "object": "urn:ngsi-ld:District:Paris:08", + "datasetId": "urn:ngsi-ld:Dataset:02" + } + ], + "location": [ + { + "type": "GeoProperty", + "value": { + "type": "Point", + "coordinates": [ + 2.3514, + 48.8575 + ] + }, + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + { + "type": "GeoProperty", + "value": { + "type": "Point", + "coordinates": [ + 2.2944, + 48.8585 + ] + }, + "datasetId": "urn:ngsi-ld:Dataset:02" + } + ], + "street": [ + { + "type": "LanguageProperty", + "languageMap": { + "fr": "Jardin de la Tour Eiffel", + "en": "Eiffel Tower Garden" + }, + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + { + "type": "LanguageProperty", + "languageMap": { + "fr": "Avenue Gustave Eiffel", + "en": "Avenue Gustave Eiffel" + }, + "datasetId": "urn:ngsi-ld:Dataset:02" + } + ], + "@context": "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" +} diff --git a/data/entities/building-different-attributes-types.jsonld b/data/entities/building-different-attributes-types.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..6102b56946740d6480e988358f813be081068dbd --- /dev/null +++ b/data/entities/building-different-attributes-types.jsonld @@ -0,0 +1,30 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "name": { + "type": "Property", + "value": "Eiffel Tower" + }, + "locatedAt": { + "type": "Relationship", + "object": "urn:ngsi-ld:City:Paris" + }, + "location": { + "type": "GeoProperty", + "value": { + "type": "Point", + "coordinates": [ + -8.5, + 41.2 + ] + } + }, + "street": { + "type": "LanguageProperty", + "languageMap": { + "fr": "Grand Place", + "nl": "Grote Markt" + } + }, + "@context": "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" +} diff --git a/data/entities/building-different-default-attributes-instances-and-types.jsonld b/data/entities/building-different-default-attributes-instances-and-types.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..79c0355b1a37daaf768b64b073dd260b8b6e6369 --- /dev/null +++ b/data/entities/building-different-default-attributes-instances-and-types.jsonld @@ -0,0 +1,67 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "name": [ + { + "type": "Property", + "value": "Eiffel Tower", + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + { + "type": "Property", + "value": "The iron lady" + } + ], + "locatedAt": [ + { + "type": "Relationship", + "object": "urn:ngsi-ld:City:Paris", + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + { + "type": "Relationship", + "object": "urn:ngsi-ld:District:Paris:08" + } + ], + "location": [ + { + "type": "GeoProperty", + "value": { + "type": "Point", + "coordinates": [ + 2.3514, + 48.8575 + ] + }, + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + { + "type": "GeoProperty", + "value": { + "type": "Point", + "coordinates": [ + 2.2944, + 48.8585 + ] + } + } + ], + "street": [ + { + "type": "LanguageProperty", + "languageMap": { + "fr": "Jardin de la Tour Eiffel", + "en": "Eiffel Tower Garden" + }, + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + { + "type": "LanguageProperty", + "languageMap": { + "fr": "Avenue Gustave Eiffel", + "en": "Avenue Gustave Eiffel" + } + } + ], + "@context": "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" +} diff --git a/data/entities/expectations/merge/building-attributes-edited.jsonld b/data/entities/expectations/merge/building-attributes-edited.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..d517227c793adedf76f0bde62864703cc304aff0 --- /dev/null +++ b/data/entities/expectations/merge/building-attributes-edited.jsonld @@ -0,0 +1,23 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "name": { + "type": "Property", + "value": "Pisa Tower" + }, + "subCategory": { + "type": "Property", + "value": "tourism" + }, + "airQualityLevel": { + "type": "Property", + "value": 6, + "unitCode": "C62", + "observedAt": "2020-10-10T16:40:00.000Z" + }, + "almostFull": { + "type": "Property", + "value": true + }, + "@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/entities/expectations/merge/building-non-edited.jsonld b/data/entities/expectations/merge/building-non-edited.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..3270014f0faa4fae5680273cb71cdcda3ee158ab --- /dev/null +++ b/data/entities/expectations/merge/building-non-edited.jsonld @@ -0,0 +1,23 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "name": { + "type": "Property", + "value": "Eiffel Tower" + }, + "subCategory": { + "type": "Property", + "value": "tourism" + }, + "airQualityLevel": { + "type": "Property", + "value": 4, + "unitCode": "C62", + "observedAt": "2020-09-09T16:40:00.000Z" + }, + "almostFull": { + "type": "Property", + "value": false + }, + "@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/entities/expectations/merge/building-with-changed-airQualityLevel.jsonld b/data/entities/expectations/merge/building-with-changed-airQualityLevel.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..7974c64e052b9368ae4508ff795c375c80178581 --- /dev/null +++ b/data/entities/expectations/merge/building-with-changed-airQualityLevel.jsonld @@ -0,0 +1,23 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "name": { + "type": "Property", + "value": "Eiffel Tower" + }, + "subCategory": { + "type": "Property", + "value": "tourism" + }, + "airQualityLevel": { + "type": "Property", + "unitCode": "C62", + "value": 1, + "observedAt": "2024-01-01T00:00:00.000Z" + }, + "almostFull": { + "type": "Property", + "value": false + }, + "@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/entities/expectations/merge/building-with-relationship.jsonld b/data/entities/expectations/merge/building-with-relationship.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..f5dbc767274b1383114304017054c201f546afb4 --- /dev/null +++ b/data/entities/expectations/merge/building-with-relationship.jsonld @@ -0,0 +1,27 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "name": { + "type": "Property", + "value": "Eiffel Tower" + }, + "subCategory": { + "type": "Property", + "value": "tourism" + }, + "airQualityLevel": { + "type": "Property", + "value": 4, + "unitCode": "C62", + "observedAt": "2020-09-09T16:40:00.000Z" + }, + "almostFull": { + "type": "Property", + "value": false + }, + "locatedAt": { + "type": "Relationship", + "object": "urn:ngsi-ld:City:Paris" + }, + "@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/entities/expectations/ngsild-null/building-deleted-geoproperty-default-instance.jsonld b/data/entities/expectations/ngsild-null/building-deleted-geoproperty-default-instance.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..20d7c735741f39774bffffa9e3ea3591a09f68a9 --- /dev/null +++ b/data/entities/expectations/ngsild-null/building-deleted-geoproperty-default-instance.jsonld @@ -0,0 +1,55 @@ +{ + "id": "urn:ngsi-ld:Building:9515150307734355", + "type": "Building", + "location": { + "type": "GeoProperty", + "value": { + "type": "Point", + "coordinates": [ + 2.3514, + 48.8575 + ] + }, + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + "name": [ + { + "type": "Property", + "value": "Eiffel Tower", + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + { + "type": "Property", + "value": "The iron lady" + } + ], + "street": [ + { + "type": "LanguageProperty", + "datasetId": "urn:ngsi-ld:Dataset:01", + "languageMap": { + "fr": "Jardin de la Tour Eiffel", + "en": "Eiffel Tower Garden" + } + }, + { + "type": "LanguageProperty", + "languageMap": { + "fr": "Avenue Gustave Eiffel", + "en": "Avenue Gustave Eiffel" + } + } + ], + "locatedAt": [ + { + "type": "Relationship", + "datasetId": "urn:ngsi-ld:Dataset:01", + "object": "urn:ngsi-ld:City:Paris" + }, + { + "type": "Relationship", + "object": "urn:ngsi-ld:District:Paris:08" + } + ], + "@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/entities/expectations/ngsild-null/building-deleted-geoproperty-instance.jsonld b/data/entities/expectations/ngsild-null/building-deleted-geoproperty-instance.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..18cfe269e288d210b2c24baacd5c8a27f6d1cfed --- /dev/null +++ b/data/entities/expectations/ngsild-null/building-deleted-geoproperty-instance.jsonld @@ -0,0 +1,58 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "name": [ + { + "type": "Property", + "value": "Eiffel Tower", + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + { + "type": "Property", + "value": "The iron lady", + "datasetId": "urn:ngsi-ld:Dataset:02" + } + ], + "locatedAt": [ + { + "type": "Relationship", + "object": "urn:ngsi-ld:City:Paris", + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + { + "type": "Relationship", + "object": "urn:ngsi-ld:District:Paris:08", + "datasetId": "urn:ngsi-ld:Dataset:02" + } + ], + "location": { + "type": "GeoProperty", + "value": { + "type": "Point", + "coordinates": [ + 2.2944, + 48.8585 + ] + }, + "datasetId": "urn:ngsi-ld:Dataset:02" + }, + "street": [ + { + "type": "LanguageProperty", + "languageMap": { + "fr": "Jardin de la Tour Eiffel", + "en": "Eiffel Tower Garden" + }, + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + { + "type": "LanguageProperty", + "languageMap": { + "fr": "Avenue Gustave Eiffel", + "en": "Avenue Gustave Eiffel" + }, + "datasetId": "urn:ngsi-ld:Dataset:02" + } + ], + "@context": "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" +} diff --git a/data/entities/expectations/ngsild-null/building-deleted-geoproperty.jsonld b/data/entities/expectations/ngsild-null/building-deleted-geoproperty.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..2107e51a9fdde9d2f0f7663666f9fea17e575c19 --- /dev/null +++ b/data/entities/expectations/ngsild-null/building-deleted-geoproperty.jsonld @@ -0,0 +1,20 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "name": { + "type": "Property", + "value": "Eiffel Tower" + }, + "locatedAt": { + "type": "Relationship", + "object": "urn:ngsi-ld:City:Paris" + }, + "street": { + "type": "LanguageProperty", + "languageMap": { + "fr": "Grand Place", + "nl": "Grote Markt" + } + }, + "@context": "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" +} diff --git a/data/entities/expectations/ngsild-null/building-deleted-languageproperty-default-instance.jsonld b/data/entities/expectations/ngsild-null/building-deleted-languageproperty-default-instance.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..fb9ba985b29ecf4e51fe70c40787658067e51a6f --- /dev/null +++ b/data/entities/expectations/ngsild-null/building-deleted-languageproperty-default-instance.jsonld @@ -0,0 +1,58 @@ +{ + "id": "urn:ngsi-ld:Building:6714892315708870", + "type": "Building", + "location": [ + { + "type": "GeoProperty", + "value": { + "type": "Point", + "coordinates": [ + 2.3514, + 48.8575 + ] + }, + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + { + "type": "GeoProperty", + "value": { + "type": "Point", + "coordinates": [ + 2.2944, + 48.8585 + ] + } + } + ], + "name": [ + { + "type": "Property", + "value": "Eiffel Tower", + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + { + "type": "Property", + "value": "The iron lady" + } + ], + "street": { + "type": "LanguageProperty", + "datasetId": "urn:ngsi-ld:Dataset:01", + "languageMap": { + "fr": "Jardin de la Tour Eiffel", + "en": "Eiffel Tower Garden" + } + }, + "locatedAt": [ + { + "type": "Relationship", + "datasetId": "urn:ngsi-ld:Dataset:01", + "object": "urn:ngsi-ld:City:Paris" + }, + { + "type": "Relationship", + "object": "urn:ngsi-ld:District:Paris:08" + } + ], + "@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/entities/expectations/ngsild-null/building-deleted-languageproperty-instance.jsonld b/data/entities/expectations/ngsild-null/building-deleted-languageproperty-instance.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..386c940f655e4733577b37b57617e55cd52cabfd --- /dev/null +++ b/data/entities/expectations/ngsild-null/building-deleted-languageproperty-instance.jsonld @@ -0,0 +1,61 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "name": [ + { + "type": "Property", + "value": "Eiffel Tower", + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + { + "type": "Property", + "value": "The iron lady", + "datasetId": "urn:ngsi-ld:Dataset:02" + } + ], + "locatedAt": [ + { + "type": "Relationship", + "object": "urn:ngsi-ld:City:Paris", + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + { + "type": "Relationship", + "object": "urn:ngsi-ld:District:Paris:08", + "datasetId": "urn:ngsi-ld:Dataset:02" + } + ], + "location": [ + { + "type": "GeoProperty", + "value": { + "type": "Point", + "coordinates": [ + 2.3514, + 48.8575 + ] + }, + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + { + "type": "GeoProperty", + "value": { + "type": "Point", + "coordinates": [ + 2.2944, + 48.8585 + ] + }, + "datasetId": "urn:ngsi-ld:Dataset:02" + } + ], + "street": { + "type": "LanguageProperty", + "languageMap": { + "fr": "Avenue Gustave Eiffel", + "en": "Avenue Gustave Eiffel" + }, + "datasetId": "urn:ngsi-ld:Dataset:02" + }, + "@context": "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" +} diff --git a/data/entities/expectations/ngsild-null/building-deleted-languageproperty.jsonld b/data/entities/expectations/ngsild-null/building-deleted-languageproperty.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..25c73513608a1b70effc97ecf71cda7d57bdf3ce --- /dev/null +++ b/data/entities/expectations/ngsild-null/building-deleted-languageproperty.jsonld @@ -0,0 +1,23 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "name": { + "type": "Property", + "value": "Eiffel Tower" + }, + "locatedAt": { + "type": "Relationship", + "object": "urn:ngsi-ld:City:Paris" + }, + "location": { + "type": "GeoProperty", + "value": { + "type": "Point", + "coordinates": [ + -8.5, + 41.2 + ] + } + }, + "@context": "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" +} diff --git a/data/entities/expectations/ngsild-null/building-deleted-property-default-instance.jsonld b/data/entities/expectations/ngsild-null/building-deleted-property-default-instance.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..0c7b3c5c13f61f169a8410cbe8b4d5aba6deeaad --- /dev/null +++ b/data/entities/expectations/ngsild-null/building-deleted-property-default-instance.jsonld @@ -0,0 +1,61 @@ +{ + "id": "urn:ngsi-ld:Building:5130936833350484", + "type": "Building", + "location": [ + { + "type": "GeoProperty", + "value": { + "type": "Point", + "coordinates": [ + 2.3514, + 48.8575 + ] + }, + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + { + "type": "GeoProperty", + "value": { + "type": "Point", + "coordinates": [ + 2.2944, + 48.8585 + ] + } + } + ], + "name": { + "type": "Property", + "value": "Eiffel Tower", + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + "street": [ + { + "type": "LanguageProperty", + "datasetId": "urn:ngsi-ld:Dataset:01", + "languageMap": { + "fr": "Jardin de la Tour Eiffel", + "en": "Eiffel Tower Garden" + } + }, + { + "type": "LanguageProperty", + "languageMap": { + "fr": "Avenue Gustave Eiffel", + "en": "Avenue Gustave Eiffel" + } + } + ], + "locatedAt": [ + { + "type": "Relationship", + "datasetId": "urn:ngsi-ld:Dataset:01", + "object": "urn:ngsi-ld:City:Paris" + }, + { + "type": "Relationship", + "object": "urn:ngsi-ld:District:Paris:08" + } + ], + "@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/entities/expectations/ngsild-null/building-deleted-property-instance.jsonld b/data/entities/expectations/ngsild-null/building-deleted-property-instance.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..476c3735ef15a26561e7c855302f46cc628b7c5d --- /dev/null +++ b/data/entities/expectations/ngsild-null/building-deleted-property-instance.jsonld @@ -0,0 +1,64 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "name": { + "type": "Property", + "value": "The iron lady", + "datasetId": "urn:ngsi-ld:Dataset:02" + }, + "locatedAt": [ + { + "type": "Relationship", + "object": "urn:ngsi-ld:City:Paris", + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + { + "type": "Relationship", + "object": "urn:ngsi-ld:District:Paris:08", + "datasetId": "urn:ngsi-ld:Dataset:02" + } + ], + "location": [ + { + "type": "GeoProperty", + "value": { + "type": "Point", + "coordinates": [ + 2.3514, + 48.8575 + ] + }, + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + { + "type": "GeoProperty", + "value": { + "type": "Point", + "coordinates": [ + 2.2944, + 48.8585 + ] + }, + "datasetId": "urn:ngsi-ld:Dataset:02" + } + ], + "street": [ + { + "type": "LanguageProperty", + "languageMap": { + "fr": "Jardin de la Tour Eiffel", + "en": "Eiffel Tower Garden" + }, + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + { + "type": "LanguageProperty", + "languageMap": { + "fr": "Avenue Gustave Eiffel", + "en": "Avenue Gustave Eiffel" + }, + "datasetId": "urn:ngsi-ld:Dataset:02" + } + ], + "@context": "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" +} diff --git a/data/entities/expectations/ngsild-null/building-deleted-property.jsonld b/data/entities/expectations/ngsild-null/building-deleted-property.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..a7ca1ece1c58370aa67c8448ee81b51afe42c29f --- /dev/null +++ b/data/entities/expectations/ngsild-null/building-deleted-property.jsonld @@ -0,0 +1,26 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "locatedAt": { + "type": "Relationship", + "object": "urn:ngsi-ld:City:Paris" + }, + "location": { + "type": "GeoProperty", + "value": { + "type": "Point", + "coordinates": [ + -8.5, + 41.2 + ] + } + }, + "street": { + "type": "LanguageProperty", + "languageMap": { + "fr": "Grand Place", + "nl": "Grote Markt" + } + }, + "@context": "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" +} diff --git a/data/entities/expectations/ngsild-null/building-deleted-relationship-default-instance.jsonld b/data/entities/expectations/ngsild-null/building-deleted-relationship-default-instance.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..8bf48529eff95d730908429694bfe1ece755c7a4 --- /dev/null +++ b/data/entities/expectations/ngsild-null/building-deleted-relationship-default-instance.jsonld @@ -0,0 +1,61 @@ +{ + "id": "urn:ngsi-ld:Building:6038695373002945", + "type": "Building", + "location": [ + { + "type": "GeoProperty", + "value": { + "type": "Point", + "coordinates": [ + 2.3514, + 48.8575 + ] + }, + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + { + "type": "GeoProperty", + "value": { + "type": "Point", + "coordinates": [ + 2.2944, + 48.8585 + ] + } + } + ], + "name": [ + { + "type": "Property", + "value": "Eiffel Tower", + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + { + "type": "Property", + "value": "The iron lady" + } + ], + "street": [ + { + "type": "LanguageProperty", + "datasetId": "urn:ngsi-ld:Dataset:01", + "languageMap": { + "fr": "Jardin de la Tour Eiffel", + "en": "Eiffel Tower Garden" + } + }, + { + "type": "LanguageProperty", + "languageMap": { + "fr": "Avenue Gustave Eiffel", + "en": "Avenue Gustave Eiffel" + } + } + ], + "locatedAt": { + "type": "Relationship", + "datasetId": "urn:ngsi-ld:Dataset:01", + "object": "urn:ngsi-ld:City:Paris" + }, + "@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/entities/expectations/ngsild-null/building-deleted-relationship-instance.jsonld b/data/entities/expectations/ngsild-null/building-deleted-relationship-instance.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..56bd06cfe1f607f6ee2508ccfe2636a732bdbd97 --- /dev/null +++ b/data/entities/expectations/ngsild-null/building-deleted-relationship-instance.jsonld @@ -0,0 +1,64 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "name": [ + { + "type": "Property", + "value": "Eiffel Tower", + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + { + "type": "Property", + "value": "The iron lady", + "datasetId": "urn:ngsi-ld:Dataset:02" + } + ], + "locatedAt": { + "type": "Relationship", + "object": "urn:ngsi-ld:District:Paris:08", + "datasetId": "urn:ngsi-ld:Dataset:02" + }, + "location": [ + { + "type": "GeoProperty", + "value": { + "type": "Point", + "coordinates": [ + 2.3514, + 48.8575 + ] + }, + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + { + "type": "GeoProperty", + "value": { + "type": "Point", + "coordinates": [ + 2.2944, + 48.8585 + ] + }, + "datasetId": "urn:ngsi-ld:Dataset:02" + } + ], + "street": [ + { + "type": "LanguageProperty", + "languageMap": { + "fr": "Jardin de la Tour Eiffel", + "en": "Eiffel Tower Garden" + }, + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + { + "type": "LanguageProperty", + "languageMap": { + "fr": "Avenue Gustave Eiffel", + "en": "Avenue Gustave Eiffel" + }, + "datasetId": "urn:ngsi-ld:Dataset:02" + } + ], + "@context": "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" +} diff --git a/data/entities/expectations/ngsild-null/building-deleted-relationship.jsonld b/data/entities/expectations/ngsild-null/building-deleted-relationship.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..392cbeb22ba600f78ee5482b1bf6ab470c07e602 --- /dev/null +++ b/data/entities/expectations/ngsild-null/building-deleted-relationship.jsonld @@ -0,0 +1,26 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "name": { + "type": "Property", + "value": "Eiffel Tower" + }, + "location": { + "type": "GeoProperty", + "value": { + "type": "Point", + "coordinates": [ + -8.5, + 41.2 + ] + } + }, + "street": { + "type": "LanguageProperty", + "languageMap": { + "fr": "Grand Place", + "nl": "Grote Markt" + } + }, + "@context": "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" +} diff --git a/data/entities/fragmentEntities/ngsild-null/building-null-geoproperty-instance.jsonld b/data/entities/fragmentEntities/ngsild-null/building-null-geoproperty-instance.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..0655bdf59896fa381d3ed5041d72c3501f5b95c6 --- /dev/null +++ b/data/entities/fragmentEntities/ngsild-null/building-null-geoproperty-instance.jsonld @@ -0,0 +1,10 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "location": { + "type": "GeoProperty", + "value": "urn:ngsi-ld:null", + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + "@context": "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" +} diff --git a/data/entities/fragmentEntities/ngsild-null/building-null-geoproperty.jsonld b/data/entities/fragmentEntities/ngsild-null/building-null-geoproperty.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..5892343a8c64f320d82e81569628bbcdc754cd57 --- /dev/null +++ b/data/entities/fragmentEntities/ngsild-null/building-null-geoproperty.jsonld @@ -0,0 +1,9 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "location": { + "type": "GeoProperty", + "value": "urn:ngsi-ld:null" + }, + "@context": "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" +} diff --git a/data/entities/fragmentEntities/ngsild-null/building-null-languageproperty-instance.jsonld b/data/entities/fragmentEntities/ngsild-null/building-null-languageproperty-instance.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..e46b1cf8cee5688a6c301c3d3fb5bbb01cf3a95f --- /dev/null +++ b/data/entities/fragmentEntities/ngsild-null/building-null-languageproperty-instance.jsonld @@ -0,0 +1,12 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "street": { + "type": "LanguageProperty", + "languageMap": { + "@none": "urn:ngsi-ld:null" + }, + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + "@context": "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" +} diff --git a/data/entities/fragmentEntities/ngsild-null/building-null-languageproperty.jsonld b/data/entities/fragmentEntities/ngsild-null/building-null-languageproperty.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..1bdc9dc9202708297dafb774a3b98d2265c797c1 --- /dev/null +++ b/data/entities/fragmentEntities/ngsild-null/building-null-languageproperty.jsonld @@ -0,0 +1,11 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "street": { + "type": "LanguageProperty", + "languageMap": { + "@none": "urn:ngsi-ld:null" + } + }, + "@context": "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" +} diff --git a/data/entities/fragmentEntities/ngsild-null/building-null-property-instance.jsonld b/data/entities/fragmentEntities/ngsild-null/building-null-property-instance.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..647d122717d503e8f55e0843c1507258ee8435ea --- /dev/null +++ b/data/entities/fragmentEntities/ngsild-null/building-null-property-instance.jsonld @@ -0,0 +1,10 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "name": { + "type": "Property", + "value": "urn:ngsi-ld:null", + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + "@context": "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" +} diff --git a/data/entities/fragmentEntities/ngsild-null/building-null-property.jsonld b/data/entities/fragmentEntities/ngsild-null/building-null-property.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..cba5e874c1740da3af4f88e5851b0820e80caf6f --- /dev/null +++ b/data/entities/fragmentEntities/ngsild-null/building-null-property.jsonld @@ -0,0 +1,9 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "name": { + "type": "Property", + "value": "urn:ngsi-ld:null" + }, + "@context": "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" +} diff --git a/data/entities/fragmentEntities/ngsild-null/building-null-relationship-instance.jsonld b/data/entities/fragmentEntities/ngsild-null/building-null-relationship-instance.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..021291f0094084520b90a0cbbb5793897a154466 --- /dev/null +++ b/data/entities/fragmentEntities/ngsild-null/building-null-relationship-instance.jsonld @@ -0,0 +1,10 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "locatedAt": { + "type": "Relationship", + "object": "urn:ngsi-ld:null", + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + "@context": "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" +} diff --git a/data/entities/fragmentEntities/ngsild-null/building-null-relationship.jsonld b/data/entities/fragmentEntities/ngsild-null/building-null-relationship.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..1fc9f5d852aa487e670cd67f87a663078748d945 --- /dev/null +++ b/data/entities/fragmentEntities/ngsild-null/building-null-relationship.jsonld @@ -0,0 +1,9 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "locatedAt": { + "type": "Relationship", + "object": "urn:ngsi-ld:null" + }, + "@context": "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" +} diff --git a/data/entities/fragmentEntities/ngsild-null/null-geoproperty-fragment.jsonld b/data/entities/fragmentEntities/ngsild-null/null-geoproperty-fragment.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..5f3de4b2b5a0d44805c84c2f25240a28fd58102c --- /dev/null +++ b/data/entities/fragmentEntities/ngsild-null/null-geoproperty-fragment.jsonld @@ -0,0 +1,7 @@ +{ + "type": "GeoProperty", + "value": "urn:ngsi-ld:null", + "@context": [ + "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" + ] +} diff --git a/data/entities/fragmentEntities/ngsild-null/null-geoproperty-instance-fragment.jsonld b/data/entities/fragmentEntities/ngsild-null/null-geoproperty-instance-fragment.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..9a3f7d65980b66b88547424057bfa220782cc2c3 --- /dev/null +++ b/data/entities/fragmentEntities/ngsild-null/null-geoproperty-instance-fragment.jsonld @@ -0,0 +1,8 @@ +{ + "type": "GeoProperty", + "value": "urn:ngsi-ld:null", + "datasetId": "urn:ngsi-ld:Dataset:01", + "@context": [ + "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" + ] +} diff --git a/data/entities/fragmentEntities/ngsild-null/null-geoproperty-instance.jsonld b/data/entities/fragmentEntities/ngsild-null/null-geoproperty-instance.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..fe5a66ec75571e7def8a0ac042cb5c8c87678322 --- /dev/null +++ b/data/entities/fragmentEntities/ngsild-null/null-geoproperty-instance.jsonld @@ -0,0 +1,8 @@ +{ + "location": { + "type": "GeoProperty", + "value": "urn:ngsi-ld:null", + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + "@context": "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" +} diff --git a/data/entities/fragmentEntities/ngsild-null/null-geoproperty.jsonld b/data/entities/fragmentEntities/ngsild-null/null-geoproperty.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..8833092663e1ee74fb8b1f1db8eb93af5bf24d2a --- /dev/null +++ b/data/entities/fragmentEntities/ngsild-null/null-geoproperty.jsonld @@ -0,0 +1,7 @@ +{ + "location": { + "type": "GeoProperty", + "value": "urn:ngsi-ld:null" + }, + "@context": "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" +} diff --git a/data/entities/fragmentEntities/ngsild-null/null-languageproperty-fragment.jsonld b/data/entities/fragmentEntities/ngsild-null/null-languageproperty-fragment.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..1f5f2bf949e46d34566da62cefe1ad51a95144b3 --- /dev/null +++ b/data/entities/fragmentEntities/ngsild-null/null-languageproperty-fragment.jsonld @@ -0,0 +1,9 @@ +{ + "type": "LanguageProperty", + "languageMap": { + "@none": "urn:ngsi-ld:null" + }, + "@context": [ + "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" + ] +} diff --git a/data/entities/fragmentEntities/ngsild-null/null-languageproperty-instance-fragment.jsonld b/data/entities/fragmentEntities/ngsild-null/null-languageproperty-instance-fragment.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..534d6ad760781d4cfabd4fb3f3ff39e1441419f7 --- /dev/null +++ b/data/entities/fragmentEntities/ngsild-null/null-languageproperty-instance-fragment.jsonld @@ -0,0 +1,10 @@ +{ + "type": "LanguageProperty", + "languageMap": { + "@none": "urn:ngsi-ld:null" + }, + "datasetId": "urn:ngsi-ld:Dataset:01", + "@context": [ + "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" + ] +} diff --git a/data/entities/fragmentEntities/ngsild-null/null-languageproperty-instance.jsonld b/data/entities/fragmentEntities/ngsild-null/null-languageproperty-instance.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..88936b717831d5bb121217014f0d7ba372fca4a0 --- /dev/null +++ b/data/entities/fragmentEntities/ngsild-null/null-languageproperty-instance.jsonld @@ -0,0 +1,10 @@ +{ + "street": { + "type": "LanguageProperty", + "languageMap": { + "@none": "urn:ngsi-ld:null" + }, + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + "@context": "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" +} diff --git a/data/entities/fragmentEntities/ngsild-null/null-languageproperty.jsonld b/data/entities/fragmentEntities/ngsild-null/null-languageproperty.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..9e11ed0d47a168393f6e824655e4e914bd2cd736 --- /dev/null +++ b/data/entities/fragmentEntities/ngsild-null/null-languageproperty.jsonld @@ -0,0 +1,9 @@ +{ + "street": { + "type": "LanguageProperty", + "languageMap": { + "@none": "urn:ngsi-ld:null" + } + }, + "@context": "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" +} diff --git a/data/entities/fragmentEntities/ngsild-null/null-property-fragment.jsonld b/data/entities/fragmentEntities/ngsild-null/null-property-fragment.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..24bf9b68aefb68c577692be598db9ddd891ead43 --- /dev/null +++ b/data/entities/fragmentEntities/ngsild-null/null-property-fragment.jsonld @@ -0,0 +1,7 @@ +{ + "type": "Property", + "value": "urn:ngsi-ld:null", + "@context": [ + "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" + ] +} diff --git a/data/entities/fragmentEntities/ngsild-null/null-property-instance-fragment.jsonld b/data/entities/fragmentEntities/ngsild-null/null-property-instance-fragment.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..b049b9b94ba69da7c1d60dd14a05cd556478114e --- /dev/null +++ b/data/entities/fragmentEntities/ngsild-null/null-property-instance-fragment.jsonld @@ -0,0 +1,8 @@ +{ + "type": "Property", + "value": "urn:ngsi-ld:null", + "datasetId": "urn:ngsi-ld:Dataset:01", + "@context": [ + "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" + ] +} diff --git a/data/entities/fragmentEntities/ngsild-null/null-property-instance.jsonld b/data/entities/fragmentEntities/ngsild-null/null-property-instance.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..f988ff7ee205e07a928c8215405e2bbdaab42835 --- /dev/null +++ b/data/entities/fragmentEntities/ngsild-null/null-property-instance.jsonld @@ -0,0 +1,8 @@ +{ + "name": { + "type": "Property", + "value": "urn:ngsi-ld:null", + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + "@context": "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" +} diff --git a/data/entities/fragmentEntities/ngsild-null/null-property.jsonld b/data/entities/fragmentEntities/ngsild-null/null-property.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..fc106c4940decf55e6e4b71868861c9ea37c1e3b --- /dev/null +++ b/data/entities/fragmentEntities/ngsild-null/null-property.jsonld @@ -0,0 +1,7 @@ +{ + "name": { + "type": "Property", + "value": "urn:ngsi-ld:null" + }, + "@context": "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" +} diff --git a/data/entities/fragmentEntities/ngsild-null/null-relationship-fragment.jsonld b/data/entities/fragmentEntities/ngsild-null/null-relationship-fragment.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..59328e2ea25bed7f2cc4a7169a8efea08d50578b --- /dev/null +++ b/data/entities/fragmentEntities/ngsild-null/null-relationship-fragment.jsonld @@ -0,0 +1,7 @@ +{ + "type": "Relationship", + "object": "urn:ngsi-ld:null", + "@context": [ + "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" + ] +} diff --git a/data/entities/fragmentEntities/ngsild-null/null-relationship-instance-fragment.jsonld b/data/entities/fragmentEntities/ngsild-null/null-relationship-instance-fragment.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..0453eb31a0070251de11a1ddcad34760159b2447 --- /dev/null +++ b/data/entities/fragmentEntities/ngsild-null/null-relationship-instance-fragment.jsonld @@ -0,0 +1,8 @@ +{ + "type": "Relationship", + "object": "urn:ngsi-ld:null", + "datasetId": "urn:ngsi-ld:Dataset:01", + "@context": [ + "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" + ] +} diff --git a/data/entities/fragmentEntities/ngsild-null/null-relationship-instance.jsonld b/data/entities/fragmentEntities/ngsild-null/null-relationship-instance.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..b26000a22720fb193fdd8e37153c6b1cebce0102 --- /dev/null +++ b/data/entities/fragmentEntities/ngsild-null/null-relationship-instance.jsonld @@ -0,0 +1,8 @@ +{ + "locatedAt": { + "type": "Relationship", + "object": "urn:ngsi-ld:null", + "datasetId": "urn:ngsi-ld:Dataset:01" + }, + "@context": "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" +} diff --git a/data/entities/fragmentEntities/ngsild-null/null-relationship.jsonld b/data/entities/fragmentEntities/ngsild-null/null-relationship.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..324743e9c039e6a813aada872aed2290e63d6de2 --- /dev/null +++ b/data/entities/fragmentEntities/ngsild-null/null-relationship.jsonld @@ -0,0 +1,7 @@ +{ + "locatedAt": { + "type": "Relationship", + "object": "urn:ngsi-ld:null" + }, + "@context": "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" +} diff --git a/data/subscriptions/expectations/entity-deleted-name-attribute-instance-keyValues.json b/data/subscriptions/expectations/entity-deleted-name-attribute-instance-keyValues.json new file mode 100644 index 0000000000000000000000000000000000000000..cbd8cdbaebfaacbebdead1b29a8a8a5cdcfba2ce --- /dev/null +++ b/data/subscriptions/expectations/entity-deleted-name-attribute-instance-keyValues.json @@ -0,0 +1,18 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "name": { + "dataset": { + "urn:ngsi-ld:Dataset:german-name": "Eiffelturm", + "@none": "Eiffel Tower", + "urn:ngsi-ld:Dataset:french-name": "urn:ngsi-ld:null" + } + }, + "locatedAt": { + "dataset": { + "urn:ngsi-ld:Dataset:french-name": "urn:ngsi-ld:Ville:Paris", + "urn:ngsi-ld:Dataset:spanish-name": "urn:ngsi-ld:Ciudad:Par\u00c3\u00ads", + "@none": "urn:ngsi-ld:City:Paris" + } + } +} \ No newline at end of file diff --git a/data/subscriptions/expectations/entity-deleted-name-attribute-instance-normalized.json b/data/subscriptions/expectations/entity-deleted-name-attribute-instance-normalized.json new file mode 100644 index 0000000000000000000000000000000000000000..b96b1e6c0aa8acd5bf8bc7591427ab62ff806da4 --- /dev/null +++ b/data/subscriptions/expectations/entity-deleted-name-attribute-instance-normalized.json @@ -0,0 +1,36 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "name": [ + { + "type": "Property", + "value": "Eiffel Tower" + }, + { + "type": "Property", + "datasetId": "urn:ngsi-ld:Dataset:german-name", + "value": "Eiffelturm" + }, + { + "type": "Property", + "datasetId": "urn:ngsi-ld:Dataset:french-name", + "value": "urn:ngsi-ld:null" + } + ], + "locatedAt": [ + { + "type": "Relationship", + "object": "urn:ngsi-ld:City:Paris" + }, + { + "type": "Relationship", + "datasetId": "urn:ngsi-ld:Dataset:french-name", + "object": "urn:ngsi-ld:Ville:Paris" + }, + { + "type": "Relationship", + "datasetId": "urn:ngsi-ld:Dataset:spanish-name", + "object": "urn:ngsi-ld:Ciudad:Par\u00c3\u00ads" + } + ] +} \ No newline at end of file diff --git a/data/subscriptions/expectations/entity-deleted-name-attribute-keyValues.json b/data/subscriptions/expectations/entity-deleted-name-attribute-keyValues.json new file mode 100644 index 0000000000000000000000000000000000000000..a604bbd233d9cd667357f24bd6f8a2725dd88da3 --- /dev/null +++ b/data/subscriptions/expectations/entity-deleted-name-attribute-keyValues.json @@ -0,0 +1,8 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "almostFull": false, + "subCategory": "tourism", + "airQualityLevel": 4, + "name": "urn:ngsi-ld:null" +} \ No newline at end of file diff --git a/data/subscriptions/expectations/entity-deleted-name-attribute-normalized.json b/data/subscriptions/expectations/entity-deleted-name-attribute-normalized.json new file mode 100644 index 0000000000000000000000000000000000000000..f84706a7e329822390d789b9170240ae61d2dbc0 --- /dev/null +++ b/data/subscriptions/expectations/entity-deleted-name-attribute-normalized.json @@ -0,0 +1,22 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "almostFull": { + "type": "Property", + "value": false + }, + "subCategory": { + "type": "Property", + "value": "tourism" + }, + "airQualityLevel": { + "type": "Property", + "value": 4, + "unitCode": "C62", + "observedAt": "2020-09-09T16:40:00.000Z" + }, + "name": { + "type": "Property", + "value": "urn:ngsi-ld:null" + } +} \ No newline at end of file diff --git a/data/subscriptions/expectations/entity-different-attributes-types-deleted-locatedAt-attribute-normalized.json b/data/subscriptions/expectations/entity-different-attributes-types-deleted-locatedAt-attribute-normalized.json new file mode 100644 index 0000000000000000000000000000000000000000..8e92bea6eb6ae64175e81f9695dcd17e1b6bdf18 --- /dev/null +++ b/data/subscriptions/expectations/entity-different-attributes-types-deleted-locatedAt-attribute-normalized.json @@ -0,0 +1,29 @@ +{ + "id": "urn:ngsi-ld:Building:4446320091579470", + "type": "Building", + "location": { + "type": "GeoProperty", + "value": { + "type": "Point", + "coordinates": [ + -8.5, + 41.2 + ] + } + }, + "street": { + "type": "LanguageProperty", + "languageMap": { + "fr": "Grand Place", + "nl": "Grote Markt" + } + }, + "locatedAt": { + "type": "Relationship", + "object": "urn:ngsi-ld:null" + }, + "name": { + "type": "Property", + "value": "Eiffel Tower" + } +} \ No newline at end of file diff --git a/data/subscriptions/expectations/entity-different-attributes-types-deleted-name-attribute-normalized.json b/data/subscriptions/expectations/entity-different-attributes-types-deleted-name-attribute-normalized.json new file mode 100644 index 0000000000000000000000000000000000000000..44fc4c470bafe73310484ea1b01c88bae4e1da6b --- /dev/null +++ b/data/subscriptions/expectations/entity-different-attributes-types-deleted-name-attribute-normalized.json @@ -0,0 +1,29 @@ +{ + "id": "urn:ngsi-ld:Building:4446320091579470", + "type": "Building", + "location": { + "type": "GeoProperty", + "value": { + "type": "Point", + "coordinates": [ + -8.5, + 41.2 + ] + } + }, + "street": { + "type": "LanguageProperty", + "languageMap": { + "fr": "Grand Place", + "nl": "Grote Markt" + } + }, + "locatedAt": { + "type": "Relationship", + "object": "urn:ngsi-ld:City:Paris" + }, + "name": { + "type": "Property", + "value": "urn:ngsi-ld:null" + } +} \ No newline at end of file diff --git a/data/subscriptions/expectations/entity-different-attributes-types-deleted-street-attribute-normalized.json b/data/subscriptions/expectations/entity-different-attributes-types-deleted-street-attribute-normalized.json new file mode 100644 index 0000000000000000000000000000000000000000..c887b198cf698bfcd63b8f7b3f9ea1ab1cdf07bd --- /dev/null +++ b/data/subscriptions/expectations/entity-different-attributes-types-deleted-street-attribute-normalized.json @@ -0,0 +1,28 @@ +{ + "id": "urn:ngsi-ld:Building:4446320091579470", + "type": "Building", + "location": { + "type": "GeoProperty", + "value": { + "type": "Point", + "coordinates": [ + -8.5, + 41.2 + ] + } + }, + "street": { + "type": "LanguageProperty", + "languageMap": { + "@none": "urn:ngsi-ld:null" + } + }, + "locatedAt": { + "type": "Relationship", + "object": "urn:ngsi-ld:City:Paris" + }, + "name": { + "type": "Property", + "value": "Eiffel Tower" + } +} \ No newline at end of file diff --git a/data/subscriptions/expectations/subscription-028-01.jsonld b/data/subscriptions/expectations/subscription-028-01.jsonld index 81afd4bd0218cc9fb20cbd0f94d374a7bb1e6777..f0ba00845cbb83bd72094664ecdfffb7c7cfd53b 100644 --- a/data/subscriptions/expectations/subscription-028-01.jsonld +++ b/data/subscriptions/expectations/subscription-028-01.jsonld @@ -15,6 +15,10 @@ } }, "status": "active", + "notificationTrigger": [ + "attributeCreated", + "attributeUpdated" + ], "@context":[ "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" ] diff --git a/data/subscriptions/expectations/subscription-vehicle-expanded-types.jsonld b/data/subscriptions/expectations/subscription-vehicle-expanded-types.jsonld index 2ba30b1f0b522269f227b229fe46027ef48f010e..e4602821237a0f806ea3e09d6741a546c80218df 100644 --- a/data/subscriptions/expectations/subscription-vehicle-expanded-types.jsonld +++ b/data/subscriptions/expectations/subscription-vehicle-expanded-types.jsonld @@ -15,6 +15,10 @@ } }, "status": "active", + "notificationTrigger": [ + "attributeCreated", + "attributeUpdated" + ], "@context":[ "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" ] diff --git a/data/subscriptions/expectations/subscription-vehicle.jsonld b/data/subscriptions/expectations/subscription-vehicle.jsonld index d7a6831132c413ceffd0e7875e172f8d3e704b9f..0ea0358d21997a6a1fe3680cf595a6ca20659112 100644 --- a/data/subscriptions/expectations/subscription-vehicle.jsonld +++ b/data/subscriptions/expectations/subscription-vehicle.jsonld @@ -15,6 +15,10 @@ } }, "status": "active", + "notificationTrigger": [ + "attributeCreated", + "attributeUpdated" + ], "@context":[ "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" ] diff --git a/data/subscriptions/expectations/subscriptions-030-03.json b/data/subscriptions/expectations/subscriptions-030-03.json index 4056c0ab7431ffa64b4ad1f111e7f1f84cff9247..ea252d49069bbfd761a779f447df9d27918b1dc0 100644 --- a/data/subscriptions/expectations/subscriptions-030-03.json +++ b/data/subscriptions/expectations/subscriptions-030-03.json @@ -14,5 +14,9 @@ "accept":"application/json" } }, - "status": "active" + "status": "active", + "notificationTrigger": [ + "attributeCreated", + "attributeUpdated" + ] } \ No newline at end of file diff --git a/data/subscriptions/expectations/subscriptions-031-01.json b/data/subscriptions/expectations/subscriptions-031-01.json index 765af41a7d4ab7756e23318153e31f3e96d290a8..92a8cb33104ae854b82cb090f0b35a6e11da8629 100644 --- a/data/subscriptions/expectations/subscriptions-031-01.json +++ b/data/subscriptions/expectations/subscriptions-031-01.json @@ -15,7 +15,11 @@ "accept":"application/json" } }, - "status": "active" + "status": "active", + "notificationTrigger": [ + "attributeCreated", + "attributeUpdated" + ] }, { "id":"urn:ngsi-ld:Subscription:randomUUID", @@ -36,7 +40,11 @@ "accept":"application/json" } }, - "status": "active" + "status": "active", + "notificationTrigger": [ + "attributeCreated", + "attributeUpdated" + ] }, { "id":"urn:ngsi-ld:Subscription:randomUUID", @@ -54,6 +62,10 @@ } }, "isActive": false, - "status": "paused" + "status": "paused", + "notificationTrigger": [ + "attributeCreated", + "attributeUpdated" + ] } ] \ No newline at end of file diff --git a/data/subscriptions/subscription-building-entities-attributeDeleted-keyValues.jsonld b/data/subscriptions/subscription-building-entities-attributeDeleted-keyValues.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..d3c47f1bcf593cc084aaf8589ed127c13b3aaca3 --- /dev/null +++ b/data/subscriptions/subscription-building-entities-attributeDeleted-keyValues.jsonld @@ -0,0 +1,22 @@ +{ + "id":"urn:ngsi-ld:Subscription:randomUUID", + "type":"Subscription", + "entities":[ + { + "type":"Building" + } + ], + "notification":{ + "format":"keyValues", + "endpoint":{ + "uri":"http://my.endpoint.org/notify", + "accept":"application/json" + } + }, + "notificationTrigger": [ + "attributeDeleted" + ], + "@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/subscriptions/subscription-building-entities-attributeDeleted-languageproperty-normalized.jsonld b/data/subscriptions/subscription-building-entities-attributeDeleted-languageproperty-normalized.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..f06986f08f2da1c5e8c6f064f22c8dea55d1b416 --- /dev/null +++ b/data/subscriptions/subscription-building-entities-attributeDeleted-languageproperty-normalized.jsonld @@ -0,0 +1,25 @@ +{ + "id": "urn:ngsi-ld:Subscription:randomUUID", + "type": "Subscription", + "entities": [ + { + "type": "Building" + } + ], + "watchedAttributes": [ + "street" + ], + "notification": { + "format": "normalized", + "endpoint": { + "uri": "http://my.endpoint.org/notify", + "accept": "application/json" + } + }, + "notificationTrigger": [ + "attributeDeleted" + ], + "@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/subscriptions/subscription-building-entities-attributeDeleted-relationship-normalized.jsonld b/data/subscriptions/subscription-building-entities-attributeDeleted-relationship-normalized.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..4c70ac8b94b8eb5a039a2dd0502fb00657451c5d --- /dev/null +++ b/data/subscriptions/subscription-building-entities-attributeDeleted-relationship-normalized.jsonld @@ -0,0 +1,25 @@ +{ + "id": "urn:ngsi-ld:Subscription:randomUUID", + "type": "Subscription", + "entities": [ + { + "type": "Building" + } + ], + "watchedAttributes": [ + "locatedAt" + ], + "notification": { + "format": "normalized", + "endpoint": { + "uri": "http://my.endpoint.org/notify", + "accept": "application/json" + } + }, + "notificationTrigger": [ + "attributeDeleted" + ], + "@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/subscriptions/subscription-building-entities-attributeDeleted-specific-attribute-keyValues.jsonld b/data/subscriptions/subscription-building-entities-attributeDeleted-specific-attribute-keyValues.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..815d142b968bc577dedb6df0b817811cb9baf827 --- /dev/null +++ b/data/subscriptions/subscription-building-entities-attributeDeleted-specific-attribute-keyValues.jsonld @@ -0,0 +1,25 @@ +{ + "id": "urn:ngsi-ld:Subscription:randomUUID", + "type": "Subscription", + "entities": [ + { + "type": "Building" + } + ], + "watchedAttributes": [ + "name" + ], + "notification": { + "format": "keyValues", + "endpoint": { + "uri": "http://my.endpoint.org/notify", + "accept": "application/json" + } + }, + "notificationTrigger": [ + "attributeDeleted" + ], + "@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/subscriptions/subscription-building-entities-attributeDeleted-specific-attribute-normalized-sysAttrs.jsonld b/data/subscriptions/subscription-building-entities-attributeDeleted-specific-attribute-normalized-sysAttrs.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..b58af8160d6c4d284d559595702b09008246218e --- /dev/null +++ b/data/subscriptions/subscription-building-entities-attributeDeleted-specific-attribute-normalized-sysAttrs.jsonld @@ -0,0 +1,26 @@ +{ + "id": "urn:ngsi-ld:Subscription:randomUUID", + "type": "Subscription", + "entities": [ + { + "type": "Building" + } + ], + "watchedAttributes": [ + "name" + ], + "notification": { + "format": "normalized", + "sysAttrs": true, + "endpoint": { + "uri": "http://my.endpoint.org/notify", + "accept": "application/json" + } + }, + "notificationTrigger": [ + "attributeDeleted" + ], + "@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/subscriptions/subscription-building-entities-attributeDeleted-specific-attribute-normalized.jsonld b/data/subscriptions/subscription-building-entities-attributeDeleted-specific-attribute-normalized.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..e2587812ab7ee3a865f92226dca84dcd121a3f00 --- /dev/null +++ b/data/subscriptions/subscription-building-entities-attributeDeleted-specific-attribute-normalized.jsonld @@ -0,0 +1,25 @@ +{ + "id": "urn:ngsi-ld:Subscription:randomUUID", + "type": "Subscription", + "entities": [ + { + "type": "Building" + } + ], + "watchedAttributes": [ + "name" + ], + "notification": { + "format": "normalized", + "endpoint": { + "uri": "http://my.endpoint.org/notify", + "accept": "application/json" + } + }, + "notificationTrigger": [ + "attributeDeleted" + ], + "@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/subscriptions/subscription-building-entities-active-query.jsonld b/data/subscriptions/subscription-building-entities-entityCreated.jsonld similarity index 89% rename from data/subscriptions/subscription-building-entities-active-query.jsonld rename to data/subscriptions/subscription-building-entities-entityCreated.jsonld index 7166057132955a0458f00094ccd8c900b08aebd3..252c42f05601d2c545991179edb434c49de0f9eb 100644 --- a/data/subscriptions/subscription-building-entities-active-query.jsonld +++ b/data/subscriptions/subscription-building-entities-entityCreated.jsonld @@ -1,13 +1,11 @@ { "id":"urn:ngsi-ld:Subscription:randomUUID", "type":"Subscription", - "isActive": true, "entities":[ { "type":"Building" } ], - "q":"name==\"Eiffel Tower\"", "notification":{ "format":"keyValues", "endpoint":{ @@ -15,6 +13,9 @@ "accept":"application/json" } }, + "notificationTrigger": [ + "entityCreated" + ], "@context":[ "https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld" ] diff --git a/data/subscriptions/subscription-building-entities-entityDeleted-sysAttrs.jsonld b/data/subscriptions/subscription-building-entities-entityDeleted-sysAttrs.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..9757ec95eaf903d5dcedcc471cadb688afedd529 --- /dev/null +++ b/data/subscriptions/subscription-building-entities-entityDeleted-sysAttrs.jsonld @@ -0,0 +1,23 @@ +{ + "id": "urn:ngsi-ld:Subscription:randomUUID", + "type": "Subscription", + "entities": [ + { + "type": "Building" + } + ], + "notification": { + "format": "keyValues", + "sysAttrs": true, + "endpoint": { + "uri": "http://my.endpoint.org/notify", + "accept": "application/json" + } + }, + "notificationTrigger": [ + "entityDeleted" + ], + "@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/subscriptions/subscription-building-entities-entityDeleted.jsonld b/data/subscriptions/subscription-building-entities-entityDeleted.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..da29f4ce50bb618ffbaea8e4e8b8d3d556b9979a --- /dev/null +++ b/data/subscriptions/subscription-building-entities-entityDeleted.jsonld @@ -0,0 +1,22 @@ +{ + "id":"urn:ngsi-ld:Subscription:randomUUID", + "type":"Subscription", + "entities":[ + { + "type":"Building" + } + ], + "notification":{ + "format":"keyValues", + "endpoint":{ + "uri":"http://my.endpoint.org/notify", + "accept":"application/json" + } + }, + "notificationTrigger": [ + "entityDeleted" + ], + "@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-languageproperty-020-17.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-languageproperty-020-17.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..e786bf3a4942a0e7a46404a3a2f7ec5ae26ba8b5 --- /dev/null +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-languageproperty-020-17.jsonld @@ -0,0 +1,14 @@ +{ + "id": "urn:ngsi-ld:Vehicle:7802230401235560", + "type": "Vehicle", + "name": { + "type": "LanguageProperty", + "instanceId": "urn:ngsi-ld:Instance:ad40c1f5-9995-408a-8651-51be67124a4d", + "languageMap": { + "@none": "urn:ngsi-ld:null" + }, + "deletedAt": "2024-12-11T15:01:49.723294Z" + }, + "isParkedIn": [], + "fuelLevel": [] +} \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-property-020-17.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-property-020-17.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..61e8c1812bac889fe6dc1a0c1131606075ba587a --- /dev/null +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-property-020-17.jsonld @@ -0,0 +1,12 @@ +{ + "id": "urn:ngsi-ld:Vehicle:6684954483670853", + "type": "Vehicle", + "fuelLevel": { + "type": "Property", + "value": "urn:ngsi-ld:null", + "instanceId": "urn:ngsi-ld:Instance:901883e6-3c93-4a2f-8099-da1d72151f2a", + "deletedAt": "2024-12-09T17:16:12.031483Z" + }, + "isParkedIn": [], + "name": [] +} \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-property-020-19.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-property-020-19.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..42930839fcc377839ab75fcb0b3d2b30fad49ffc --- /dev/null +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-property-020-19.jsonld @@ -0,0 +1,10 @@ +{ + "id": "urn:ngsi-ld:Vehicle:4413459323492023", + "type": "Vehicle", + "fuelLevel": [], + "scope": { + "type": "Property", + "value": [], + "deletedAt": "2024-12-19T08:43:32.422444Z" + } +} \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-property-020-20.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-property-020-20.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..cf5f41aba9a4ab2460df879dcf1151d550bb0d8b --- /dev/null +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-property-020-20.jsonld @@ -0,0 +1,17 @@ +{ + "id": "urn:ngsi-ld:Vehicle:3998258693070791", + "type": "Vehicle", + "fuelLevel": { + "type": "Property", + "values": [] + }, + "scope": { + "type": "Property", + "values": [ + [ + [], + "2024-12-19T08:48:50.936936Z" + ] + ] + } +} \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-relationship-020-17.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-relationship-020-17.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..95b1800564da03cc23d998b5d5d2576eea610311 --- /dev/null +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-relationship-020-17.jsonld @@ -0,0 +1,12 @@ +{ + "id": "urn:ngsi-ld:Vehicle:3786481415227169", + "type": "Vehicle", + "isParkedIn": { + "type": "Relationship", + "object": "urn:ngsi-ld:null", + "instanceId": "urn:ngsi-ld:Instance:5be942ce-3ea5-4701-8d1d-6b29897f246f", + "deletedAt": "2024-12-11T11:02:49.270530Z" + }, + "fuelLevel": [], + "name": [] +} \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-values-representation-languageproperty-020-18.jsonld b/data/temporalEntities/expectations/vehicle-temporal-values-representation-languageproperty-020-18.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..b0954e0db23de556d3bba7a54e9c87253e4049c1 --- /dev/null +++ b/data/temporalEntities/expectations/vehicle-temporal-values-representation-languageproperty-020-18.jsonld @@ -0,0 +1,25 @@ +{ + "id": "urn:ngsi-ld:Vehicle:4537446855480368", + "type": "Vehicle", + "name": { + "type": "LanguageProperty", + "languageMaps": [ + [ + { + "languageMap": { + "@none": "urn:ngsi-ld:null" + } + }, + "2024-12-11T16:21:08.388531Z" + ] + ] + }, + "fuelLevel": { + "type": "Property", + "values": [] + }, + "isParkedIn": { + "type": "Relationship", + "objects": [] + } +} \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-values-representation-property-020-18.jsonld b/data/temporalEntities/expectations/vehicle-temporal-values-representation-property-020-18.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..ab89abcb194de1975604eebf8d11e82044c6534d --- /dev/null +++ b/data/temporalEntities/expectations/vehicle-temporal-values-representation-property-020-18.jsonld @@ -0,0 +1,21 @@ +{ + "id": "urn:ngsi-ld:Vehicle:7616794302108220", + "type": "Vehicle", + "fuelLevel": { + "type": "Property", + "values": [ + [ + "urn:ngsi-ld:null", + "2024-12-11T15:19:24.514781Z" + ] + ] + }, + "isParkedIn": { + "type": "Relationship", + "objects": [] + }, + "name": { + "type": "LanguageProperty", + "languageMaps": [] + } +} \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-values-representation-relationship-020-18.jsonld b/data/temporalEntities/expectations/vehicle-temporal-values-representation-relationship-020-18.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..7ae19b047a4139ee01fbaa8379bb99206d6dba4a --- /dev/null +++ b/data/temporalEntities/expectations/vehicle-temporal-values-representation-relationship-020-18.jsonld @@ -0,0 +1,21 @@ +{ + "id": "urn:ngsi-ld:Vehicle:3894486412971043", + "type": "Vehicle", + "isParkedIn": { + "type": "Relationship", + "objects": [ + [ + "urn:ngsi-ld:null", + "2024-12-11T15:19:24.696152Z" + ] + ] + }, + "name": { + "type": "LanguageProperty", + "languageMaps": [] + }, + "fuelLevel": { + "type": "Property", + "values": [] + } +} \ No newline at end of file diff --git a/data/temporalEntities/vehicle-temporal-representation-different-attributes-types.jsonld b/data/temporalEntities/vehicle-temporal-representation-different-attributes-types.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..a5c7152b144e445c147d9300a80cdcc1c726e22e --- /dev/null +++ b/data/temporalEntities/vehicle-temporal-representation-different-attributes-types.jsonld @@ -0,0 +1,49 @@ +{ + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "isParkedIn":[ + { + "type":"Relationship", + "object":"urn:ngsi-ld:OffStreetParking:Commerce", + "observedAt":"2024-12-01T12:00:00Z" + }, + { + "type":"Relationship", + "object":"urn:ngsi-ld:OffStreetParking:Graslin", + "observedAt":"2024-12-05T12:00:00Z" + } + ], + "name":[ + { + "type":"LanguageProperty", + "languageMap": { + "fr": "Ma voiture", + "en": "My vehicle" + }, + "observedAt":"2024-12-01T12:00:00Z" + }, + { + "type":"LanguageProperty", + "languageMap": { + "fr": "Ma jolie voiture", + "en": "My pretty vehicle" + }, + "observedAt":"2024-12-05T12:00:00Z" + } + ], + "fuelLevel":[ + { + "type":"Property", + "value":67, + "observedAt":"2020-08-01T12:03:00Z" + }, + { + "type":"Property", + "value":53, + "observedAt":"2020-08-01T13:05:00Z" + } + ], + "@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/vehicle-temporal-representation-scope.jsonld b/data/temporalEntities/vehicle-temporal-representation-scope.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..372efae63b07ec2bdebb8fda20020f71a6e5ea00 --- /dev/null +++ b/data/temporalEntities/vehicle-temporal-representation-scope.jsonld @@ -0,0 +1,23 @@ +{ + "id": "urn:ngsi-ld:Vehicle:randomUUID", + "type": "Vehicle", + "scope": [ + "/Madrid/Gardens/ParqueNorte", + "/CompanyA/OrganizationB/UnitC" + ], + "fuelLevel": [ + { + "type": "Property", + "value": 67, + "observedAt": "2020-08-01T12:03:00Z" + }, + { + "type": "Property", + "value": 53, + "observedAt": "2020-08-01T13:05:00Z" + } + ], + "@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/doc/analysis/checks.py b/doc/analysis/checks.py index cda630ac152c2d51818b706b9bfc6c1a9ec7adad..61c260e355dcc04fc562a75a6d014e6da3300d7c 100644 --- a/doc/analysis/checks.py +++ b/doc/analysis/checks.py @@ -147,7 +147,9 @@ class Checks: 'Check Content Range Part Equal': Checks.check_content_range_part_equal, 'Check Data Is Empty': - Checks.check_data_is_empty + Checks.check_data_is_empty, + 'Check Notification Containing Entity Element': + Checks.check_notification_containing_entity_element, } self.args = { @@ -430,6 +432,10 @@ class Checks: 'params': ['data'], 'position': [0] }, + 'Check Notification Containing Entity Element': { + 'params': ['filename', 'notification'], + 'position': [0, 1] + } } @staticmethod @@ -1162,6 +1168,11 @@ class Checks: else: raise Exception(f"ERROR, Expected the field to be equal 'expected_field' but received: '{kwargs}'") + @staticmethod + def check_notification_containing_entity_element(kwargs: list) -> str: + if 'filename' in kwargs and 'notification' in kwargs: + return f"Notification containing entity element set to '{kwargs['filename']}'" + @staticmethod def check_content_range_part_equal(kwargs: list) -> str: if 'expected_part' in kwargs and 'part' in kwargs: @@ -1290,6 +1301,9 @@ if __name__ == "__main__": print() print(data.get_checks(checks='Check Response Headers Containing NGSILD-Results-Count Equals To')) + print() + print(data.get_checks(checks='Check Notification Containing Entity Element')) + # Check exceptions try: print(data.get_checks(checks='Check Response Body Containing an Attribute set to')) diff --git a/doc/analysis/generaterobotdata.py b/doc/analysis/generaterobotdata.py index 40a032f6735832c57b1a05b1cd161b543fe672b7..987447d0f1b98a45c7d83558fdc8954fa4a904b2 100644 --- a/doc/analysis/generaterobotdata.py +++ b/doc/analysis/generaterobotdata.py @@ -43,6 +43,7 @@ class GenerateRobotData: 'Discovery/RetrieveDetailsOfAvailableAttributes': 'DISC', 'Entity/RetrieveEntity': 'E', 'Entities/CreateEntity': 'E', + 'Entities/MergeEntity': 'E', 'Entities/ReplaceEntity': 'E', 'Entity/QueryEntities': 'E', 'Entities/DeleteEntity': 'E', diff --git a/doc/analysis/initial_setup.py b/doc/analysis/initial_setup.py index 0c773f43f9a9ab24f9cc6b438f1a9ed183557f94..c39a9d72fa58a66848deec7d5dbc4cab00b57740 100644 --- a/doc/analysis/initial_setup.py +++ b/doc/analysis/initial_setup.py @@ -23,6 +23,7 @@ class InitialSetup: 'Create Id': InitialSetup.init_temporal_entity2(), 'Create Initial Subscription': InitialSetup.init_subscription(), 'Setup Initial Subscriptions': InitialSetup.init_subscription(), + 'Create Initial Subscription And Entity': InitialSetup.init_subscription_and_entity(), 'Start Mqtt Server And Connect': InitialSetup.init_mqtt_subscription(), 'Setup Initial Entities': InitialSetup.init_entities(), 'Setup Initial Temporal Entities': InitialSetup.init_temporal_entities(), @@ -96,7 +97,6 @@ class InitialSetup: the SUT being in the "initial state" and the SUT containing an initial Temporal Entity ${entity} with an id set to ${temporal_entity_representation_id} - and an attribute with an id set to ${atrId} }''' return data @@ -118,6 +118,17 @@ class InitialSetup: }''' return data + @staticmethod + def init_subscription_and_entity() -> str: + data = '''with { + the SUT being in the "initial state" and + the SUT containing an initial Subscription ${subscription} + with an id set to ${subscription_id} + and an initial Entity ${entity} + with an id set to ${entity_id} +}''' + return data + @staticmethod def init_mqtt_subscription() -> str: data = '''with diff --git a/doc/analysis/requests.py b/doc/analysis/requests.py index 513d4ae704c9b980aaf67e839fb5fa00d64ecd35..adb4ec00ebccedf95839c1f56019b17bcc95842e 100644 --- a/doc/analysis/requests.py +++ b/doc/analysis/requests.py @@ -96,7 +96,7 @@ class Requests: 'positions': [], 'params': ['temporal_entity_representation_id', 'attrs', 'options', 'context', 'timerel', 'timeAt', 'endTimeAt', 'lastN', 'accept', - 'aggrMethods', 'aggrPeriodDuration'] + 'aggrMethods', 'aggrPeriodDuration', 'timeproperty'] }, 'Delete Entity by Id': { 'positions': [0], @@ -110,6 +110,10 @@ class Requests: 'positions': [0, 1, 2, 3], 'params': ['entity_id', 'entity_fragment', 'content_type', 'context'] }, + 'Merge Entity': { + 'positions': [0, 1, 2, 3], + 'params': ['entity_id', 'entity_filename', 'content_type', 'context'] + }, 'Replace Attribute Selecting Content Type': { 'positions': [0, 1, 2, 3, 4], 'params': ['entity_id', 'attr_id', 'attribute_fragment', 'content_type', 'context'] @@ -326,6 +330,8 @@ class Requests: Requests.replace_entity, 'Replace Entity Selecting Content Type': Requests.replace_entity_selecting_content_type, + 'Merge Entity': + Requests.merge_entity, 'Replace Attribute Selecting Content Type': Requests.replace_attribute_selecting_content_type, 'Append Entity Attributes': @@ -1185,7 +1191,7 @@ class Requests: def retrieve_temporal_representation_of_entity(kwargs) -> str: expected_parameters = ['temporal_entity_representation_id', 'attrs', 'options', 'context', 'timerel', 'timeAt', 'endTimeAt', 'lastN', 'accept', - 'aggrMethods', 'aggrPeriodDuration'] + 'aggrMethods', 'aggrPeriodDuration', 'timeproperty'] result = [x for x in kwargs if x not in expected_parameters] response = "Retrieve Temporal Representation of Entity" for key, value in kwargs.items(): @@ -1214,6 +1220,8 @@ class Requests: response = f"{response} and\n Query Parameter: aggrMethods set to '{value}'" case 'aggrPeriodDuration': response = f"{response} and\n Query Parameter: aggrPeriodDuration set to '{value}'" + case 'timeproperty': + response = f"{response} and\n Query Parameter: timeproperty set to '{value}'" # If an exact match is not confirmed, this last case will be used if provided case _: raise Exception(f"ERROR: unexpected attribute(s) {result}, the attributes expected are " @@ -1420,6 +1428,31 @@ class Requests: return response + @staticmethod + def merge_entity(kwargs) -> str: + expected_parameters = ['entity_id', 'entity_filename', 'content_type', 'context'] + + if 'context' not in kwargs: + kwargs['context'] = '${EMPTY}' + + result = [x for x in kwargs if x not in expected_parameters] + response = "Merge Entity" + for key, value in kwargs.items(): + match key: + case 'entity_id': + response = f"{response} and\n Query Parameter: entity_id set to '{value}'" + case 'entity_filename': + response = f"{response} and\n Query Parameter: entity_filename set to '{value}'" + case 'content_type': + response = f"{response} and\n Query Parameter: content_type set to '{value}'" + case 'context': + response = f"{response} and\n Query Parameter: context set to '{value}'" + case _: + raise Exception(f"ERROR: unexpected attribute {result}, the attributes expected are " + f"{expected_parameters}, but received: {kwargs}") + + return response + @staticmethod def replace_attribute_selecting_content_type(kwargs) -> str: expected_parameters = ['entity_id', 'attr_id', 'attribute_fragment', 'content_type', 'context'] diff --git a/doc/files/ContextInformation/Consumption/020_17.json b/doc/files/ContextInformation/Consumption/020_17.json new file mode 100644 index 0000000000000000000000000000000000000000..c15d6bfe6b6528b06b094ea34a8ddeb176625fba --- /dev/null +++ b/doc/files/ContextInformation/Consumption/020_17.json @@ -0,0 +1,79 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Cons/TE/020_17", + "test_objective": "Check that one can retrieve the temporal evolution of an entity following the deletedAt temporal property", + "reference": "ETSI GS CIM 009 V1.6.1 [], clauses 4.5.18, 5.7.3", + "config_id": "", + "parent_release": "v1.6.1", + "clauses": [ + "4.5.18", + "5.7.3" + ], + "pics_selection": "", + "keywords": [ + "Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute", + "Create Temporal Entity", + "Delete Initial Temporal Entity" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Temporal Entity ${entity} \n with an id set to ${temporal_entity_representation_id} \n}", + "test_cases": [ + { + "name": "020_17_01 With a Property", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/020_17_01", + "doc": "Check that one can retrieve the temporal evolution of an entity following the deletedAt temporal property", + "tags": [ + "5_7_3", + "since_v1.6.1", + "te-retrieve" + ], + "setup": "Create Temporal Entity", + "teardown": "Delete Initial Temporal Entity", + "template": "Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute", + "then": "then {\n the SUT sends a valid Response for the operations:\n Retrieve Temporal Representation Of Entity with Response Status Code set to 200 and\n Retrieve Temporal Representation Of Entity with Response Body containing EntityTemporal element containing attribute instances in the time range specified by the NGSI-LD temporal query:\n * the payload is defined in the file set to 'vehicle-temporal-representation-property-020-17.jsonld'\n * the id was changed to 'temporal_entity_representation_id=${temporal_entity_representation_id}'\n * response body to be checked set to 'response_body=${response2.json()}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}?${params_as_string}'\n method set to 'DELETE'\n Delete Entity Attributes: and\n Query Parameter: entityId set to '${temporal_entity_representation_id}' and\n Query Parameter: attributeId set to 'fuelLevel' and\n Query Parameter: datasetId set to '${EMPTY}' and\n Query Parameter: deleteAll set to 'false' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", + "http_verb": "DELETE", + "endpoint": "entities/{entityId}/attrs/{attributeId}?${params_as_string}" + }, + { + "name": "020_17_02 With a Relationship", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/020_17_02", + "doc": "Check that one can retrieve the temporal evolution of an entity following the deletedAt temporal property", + "tags": [ + "5_7_3", + "since_v1.6.1", + "te-retrieve" + ], + "setup": "Create Temporal Entity", + "teardown": "Delete Initial Temporal Entity", + "template": "Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute", + "then": "then {\n the SUT sends a valid Response for the operations:\n Retrieve Temporal Representation Of Entity with Response Status Code set to 200 and\n Retrieve Temporal Representation Of Entity with Response Body containing EntityTemporal element containing attribute instances in the time range specified by the NGSI-LD temporal query:\n * the payload is defined in the file set to 'vehicle-temporal-representation-relationship-020-17.jsonld'\n * the id was changed to 'temporal_entity_representation_id=${temporal_entity_representation_id}'\n * response body to be checked set to 'response_body=${response2.json()}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}?${params_as_string}'\n method set to 'DELETE'\n Delete Entity Attributes: and\n Query Parameter: entityId set to '${temporal_entity_representation_id}' and\n Query Parameter: attributeId set to 'isParkedIn' and\n Query Parameter: datasetId set to '${EMPTY}' and\n Query Parameter: deleteAll set to 'false' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", + "http_verb": "DELETE", + "endpoint": "entities/{entityId}/attrs/{attributeId}?${params_as_string}" + }, + { + "name": "020_17_03 With a LanguageProperty", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/020_17_03", + "doc": "Check that one can retrieve the temporal evolution of an entity following the deletedAt temporal property", + "tags": [ + "4_5_18", + "5_7_3", + "since_v1.6.1", + "te-retrieve" + ], + "setup": "Create Temporal Entity", + "teardown": "Delete Initial Temporal Entity", + "template": "Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute", + "then": "then {\n the SUT sends a valid Response for the operations:\n Retrieve Temporal Representation Of Entity with Response Status Code set to 200 and\n Retrieve Temporal Representation Of Entity with Response Body containing EntityTemporal element containing attribute instances in the time range specified by the NGSI-LD temporal query:\n * the payload is defined in the file set to 'vehicle-temporal-representation-languageproperty-020-17.jsonld'\n * the id was changed to 'temporal_entity_representation_id=${temporal_entity_representation_id}'\n * response body to be checked set to 'response_body=${response2.json()}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}?${params_as_string}'\n method set to 'DELETE'\n Delete Entity Attributes: and\n Query Parameter: entityId set to '${temporal_entity_representation_id}' and\n Query Parameter: attributeId set to 'name' and\n Query Parameter: datasetId set to '${EMPTY}' and\n Query Parameter: deleteAll set to 'false' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", + "http_verb": "DELETE", + "endpoint": "entities/{entityId}/attrs/{attributeId}?${params_as_string}" + } + ], + "permutations": [ + "then", + "when" + ], + "robotpath": "ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity", + "robotfile": "020_17" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Consumption/020_18.json b/doc/files/ContextInformation/Consumption/020_18.json new file mode 100644 index 0000000000000000000000000000000000000000..27a51be2784ad0cf2d11f0e93eaca18d90172cb3 --- /dev/null +++ b/doc/files/ContextInformation/Consumption/020_18.json @@ -0,0 +1,79 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Cons/TE/020_18", + "test_objective": "Check that one can retrieve the temporal evolution of an entity following the deletedAt temporal property with temporal values", + "reference": "ETSI GS CIM 009 V1.6.1 [], clauses 4.5.18, 5.7.3", + "config_id": "", + "parent_release": "v1.6.1", + "clauses": [ + "4.5.18", + "5.7.3" + ], + "pics_selection": "", + "keywords": [ + "Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute", + "Create Temporal Entity", + "Delete Initial Temporal Entity" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Temporal Entity ${entity} \n with an id set to ${temporal_entity_representation_id} \n}", + "test_cases": [ + { + "name": "020_18_01 With a Property", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/020_18_01", + "doc": "Check that one can retrieve the temporal evolution of an entity following the deletedAt temporal property with temporal values", + "tags": [ + "5_7_3", + "since_v1.6.1", + "te-retrieve" + ], + "setup": "Create Temporal Entity", + "teardown": "Delete Initial Temporal Entity", + "template": "Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute", + "then": "then {\n the SUT sends a valid Response for the operations:\n Retrieve Temporal Representation Of Entity with Response Status Code set to 200 and\n Retrieve Temporal Representation Of Entity with Response Body containing EntityTemporal element containing attribute instances in the time range specified by the NGSI-LD temporal query:\n * the payload is defined in the file set to 'vehicle-temporal-values-representation-property-020-18.jsonld'\n * the id was changed to 'temporal_entity_representation_id=${temporal_entity_representation_id}'\n * response body to be checked set to 'response_body=${response2.json()}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}?${params_as_string}'\n method set to 'DELETE'\n Delete Entity Attributes: and\n Query Parameter: entityId set to '${temporal_entity_representation_id}' and\n Query Parameter: attributeId set to 'fuelLevel' and\n Query Parameter: datasetId set to '${EMPTY}' and\n Query Parameter: deleteAll set to 'false' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", + "http_verb": "DELETE", + "endpoint": "entities/{entityId}/attrs/{attributeId}?${params_as_string}" + }, + { + "name": "020_18_02 With a Relationship", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/020_18_02", + "doc": "Check that one can retrieve the temporal evolution of an entity following the deletedAt temporal property with temporal values", + "tags": [ + "5_7_3", + "since_v1.6.1", + "te-retrieve" + ], + "setup": "Create Temporal Entity", + "teardown": "Delete Initial Temporal Entity", + "template": "Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute", + "then": "then {\n the SUT sends a valid Response for the operations:\n Retrieve Temporal Representation Of Entity with Response Status Code set to 200 and\n Retrieve Temporal Representation Of Entity with Response Body containing EntityTemporal element containing attribute instances in the time range specified by the NGSI-LD temporal query:\n * the payload is defined in the file set to 'vehicle-temporal-values-representation-relationship-020-18.jsonld'\n * the id was changed to 'temporal_entity_representation_id=${temporal_entity_representation_id}'\n * response body to be checked set to 'response_body=${response2.json()}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}?${params_as_string}'\n method set to 'DELETE'\n Delete Entity Attributes: and\n Query Parameter: entityId set to '${temporal_entity_representation_id}' and\n Query Parameter: attributeId set to 'isParkedIn' and\n Query Parameter: datasetId set to '${EMPTY}' and\n Query Parameter: deleteAll set to 'false' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", + "http_verb": "DELETE", + "endpoint": "entities/{entityId}/attrs/{attributeId}?${params_as_string}" + }, + { + "name": "020_18_03 With a LanguageProperty", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/020_18_03", + "doc": "Check that one can retrieve the temporal evolution of an entity following the deletedAt temporal property with temporal values", + "tags": [ + "4_5_18", + "5_7_3", + "since_v1.6.1", + "te-retrieve" + ], + "setup": "Create Temporal Entity", + "teardown": "Delete Initial Temporal Entity", + "template": "Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute", + "then": "then {\n the SUT sends a valid Response for the operations:\n Retrieve Temporal Representation Of Entity with Response Status Code set to 200 and\n Retrieve Temporal Representation Of Entity with Response Body containing EntityTemporal element containing attribute instances in the time range specified by the NGSI-LD temporal query:\n * the payload is defined in the file set to 'vehicle-temporal-values-representation-languageproperty-020-18.jsonld'\n * the id was changed to 'temporal_entity_representation_id=${temporal_entity_representation_id}'\n * response body to be checked set to 'response_body=${response2.json()}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}?${params_as_string}'\n method set to 'DELETE'\n Delete Entity Attributes: and\n Query Parameter: entityId set to '${temporal_entity_representation_id}' and\n Query Parameter: attributeId set to 'name' and\n Query Parameter: datasetId set to '${EMPTY}' and\n Query Parameter: deleteAll set to 'false' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", + "http_verb": "DELETE", + "endpoint": "entities/{entityId}/attrs/{attributeId}?${params_as_string}" + } + ], + "permutations": [ + "then", + "when" + ], + "robotpath": "ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity", + "robotfile": "020_18" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Consumption/020_19.json b/doc/files/ContextInformation/Consumption/020_19.json new file mode 100644 index 0000000000000000000000000000000000000000..5085fe9db74ad1791dec6342dfbebe0b390fb858 --- /dev/null +++ b/doc/files/ContextInformation/Consumption/020_19.json @@ -0,0 +1,44 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Cons/TE/020_19", + "test_objective": "Check that one can retrieve the temporal evolution of a scope following the deletedAt temporal property", + "reference": "ETSI GS CIM 009 V1.6.1 [], clauses 4.18, 5.7.3, 6.19.3.1", + "config_id": "", + "parent_release": "v1.6.1", + "clauses": [ + "4.18", + "5.7.3", + "6.19.3.1" + ], + "pics_selection": "", + "keywords": [ + "Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute", + "Create Temporal Entity", + "Delete Initial Temporal Entity" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Temporal Entity ${entity} \n with an id set to ${temporal_entity_representation_id} \n}", + "test_cases": [ + { + "name": "020_19_01 With a Scope", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/020_19_01", + "doc": "Check that one can retrieve the temporal evolution of a scope following the deletedAt temporal property", + "tags": [ + "4_18", + "5_7_3", + "6_19_3_1", + "since_v1.6.1", + "te-retrieve" + ], + "setup": "Create Temporal Entity", + "teardown": "Delete Initial Temporal Entity", + "template": "Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute", + "then": "then {\n the SUT sends a valid Response for the operations:\n Retrieve Temporal Representation Of Entity with Response Status Code set to 200 and\n Retrieve Temporal Representation Of Entity with Response Body containing EntityTemporal element containing attribute instances in the time range specified by the NGSI-LD temporal query:\n * the payload is defined in the file set to 'vehicle-temporal-representation-property-020-19.jsonld'\n * the id was changed to 'temporal_entity_representation_id=${temporal_entity_representation_id}'\n * response body to be checked set to 'response_body=${response2.json()}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}?${params_as_string}'\n method set to 'DELETE'\n Delete Entity Attributes: and\n Query Parameter: entityId set to '${temporal_entity_representation_id}' and\n Query Parameter: attributeId set to 'scope' and\n Query Parameter: datasetId set to '${EMPTY}' and\n Query Parameter: deleteAll set to 'false' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", + "http_verb": "DELETE", + "endpoint": "entities/{entityId}/attrs/{attributeId}?${params_as_string}" + } + ], + "permutations": [], + "robotpath": "ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity", + "robotfile": "020_19" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Consumption/020_20.json b/doc/files/ContextInformation/Consumption/020_20.json new file mode 100644 index 0000000000000000000000000000000000000000..4e570587d43f4fa300f1f239c57db71d5873014b --- /dev/null +++ b/doc/files/ContextInformation/Consumption/020_20.json @@ -0,0 +1,44 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Cons/TE/020_20", + "test_objective": "Check that one can retrieve the temporal evolution of a scope following the deletedAt temporal property with temporal values", + "reference": "ETSI GS CIM 009 V1.6.1 [], clauses 4.18, 5.7.3, 6.19.3.1", + "config_id": "", + "parent_release": "v1.6.1", + "clauses": [ + "4.18", + "5.7.3", + "6.19.3.1" + ], + "pics_selection": "", + "keywords": [ + "Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute", + "Create Temporal Entity", + "Delete Initial Temporal Entity" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Temporal Entity ${entity} \n with an id set to ${temporal_entity_representation_id} \n}", + "test_cases": [ + { + "name": "020_20_01 With a Scope", + "permutation_tp_id": "TP/NGSI-LD/CI/Cons/TE/020_20_01", + "doc": "Check that one can retrieve the temporal evolution of a scope following the deletedAt temporal property with temporal values", + "tags": [ + "4_18", + "5_7_3", + "6_19_3_1", + "since_v1.6.1", + "te-retrieve" + ], + "setup": "Create Temporal Entity", + "teardown": "Delete Initial Temporal Entity", + "template": "Delete Temporal Attribute and Retrieve Temporal Evolution of Attribute", + "then": "then {\n the SUT sends a valid Response for the operations:\n Retrieve Temporal Representation Of Entity with Response Status Code set to 200 and\n Retrieve Temporal Representation Of Entity with Response Body containing EntityTemporal element containing attribute instances in the time range specified by the NGSI-LD temporal query:\n * the payload is defined in the file set to 'vehicle-temporal-representation-property-020-20.jsonld'\n * the id was changed to 'temporal_entity_representation_id=${temporal_entity_representation_id}'\n * response body to be checked set to 'response_body=${response2.json()}'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}?${params_as_string}'\n method set to 'DELETE'\n Delete Entity Attributes: and\n Query Parameter: entityId set to '${temporal_entity_representation_id}' and\n Query Parameter: attributeId set to 'scope' and\n Query Parameter: datasetId set to '${EMPTY}' and\n Query Parameter: deleteAll set to 'false' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", + "http_verb": "DELETE", + "endpoint": "entities/{entityId}/attrs/{attributeId}?${params_as_string}" + } + ], + "permutations": [], + "robotpath": "ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity", + "robotfile": "020_20" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Provision/011_07.json b/doc/files/ContextInformation/Provision/011_07.json new file mode 100644 index 0000000000000000000000000000000000000000..316571a4dc78074c66b4416a143080757fbd32e7 --- /dev/null +++ b/doc/files/ContextInformation/Provision/011_07.json @@ -0,0 +1,101 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Prov/EA/011_07", + "test_objective": "Check that one can delete an attribute using NGSI-LD Null in an Update Attributes operation", + "reference": "ETSI GS CIM 009 V1.6.1 [], clauses 4.5.18, 5.6.2, 6.6.3.2", + "config_id": "", + "parent_release": "v1.6.1", + "clauses": [ + "4.5.18", + "5.6.2", + "6.6.3.2" + ], + "pics_selection": "", + "keywords": [ + "Update Attributes", + "Delete Initial Entity", + "Setup Initial Entity" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}", + "test_cases": [ + { + "name": "011_07_01 Delete a Property", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/EA/011_07_01", + "doc": "Check that one can delete an attribute using NGSI-LD Null in an Update Attributes operation", + "tags": [ + "5_6_2", + "6_6_3_2", + "ea-update", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Update Attributes", + "then": "then {\n the SUT sends a valid Response for the operations:\n Update Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-property.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Update Entity Attributes and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: fragment_filename set to 'ngsild-null/null-property.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + }, + { + "name": "011_07_02 Delete a Relationship", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/EA/011_07_02", + "doc": "Check that one can delete an attribute using NGSI-LD Null in an Update Attributes operation", + "tags": [ + "5_6_2", + "6_6_3_2", + "ea-update", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Update Attributes", + "then": "then {\n the SUT sends a valid Response for the operations:\n Update Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-relationship.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Update Entity Attributes and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: fragment_filename set to 'ngsild-null/null-relationship.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + }, + { + "name": "011_07_03 Delete a GeoProperty", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/EA/011_07_03", + "doc": "Check that one can delete an attribute using NGSI-LD Null in an Update Attributes operation", + "tags": [ + "5_6_2", + "6_6_3_2", + "ea-update", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Update Attributes", + "then": "then {\n the SUT sends a valid Response for the operations:\n Update Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-geoproperty.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Update Entity Attributes and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: fragment_filename set to 'ngsild-null/null-geoproperty.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + }, + { + "name": "011_07_04 Delete a LanguageProperty", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/EA/011_07_04", + "doc": "Check that one can delete an attribute using NGSI-LD Null in an Update Attributes operation", + "tags": [ + "4_5_18", + "5_6_2", + "6_6_3_2", + "ea-update", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Update Attributes", + "then": "then {\n the SUT sends a valid Response for the operations:\n Update Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-languageproperty.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Update Entity Attributes and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: fragment_filename set to 'ngsild-null/null-languageproperty.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + } + ], + "permutations": [ + "then", + "when" + ], + "robotpath": "ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes", + "robotfile": "011_07" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Provision/011_08.json b/doc/files/ContextInformation/Provision/011_08.json new file mode 100644 index 0000000000000000000000000000000000000000..6c68bcdbe41b43012c83439b5614bd8f20732f63 --- /dev/null +++ b/doc/files/ContextInformation/Provision/011_08.json @@ -0,0 +1,101 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Prov/EA/011_08", + "test_objective": "Check that one can delete a specific attribute instance using NGSI-LD Null in an Update Attributes operation", + "reference": "ETSI GS CIM 009 V1.6.1 [], clauses 4.5.18, 5.6.2, 6.6.3.2", + "config_id": "", + "parent_release": "v1.6.1", + "clauses": [ + "4.5.18", + "5.6.2", + "6.6.3.2" + ], + "pics_selection": "", + "keywords": [ + "Update Attributes", + "Delete Initial Entity", + "Setup Initial Entity" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}", + "test_cases": [ + { + "name": "011_08_01 Delete a Property", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/EA/011_08_01", + "doc": "Check that one can delete a specific attribute instance using NGSI-LD Null in an Update Attributes operation", + "tags": [ + "5_6_2", + "6_6_3_2", + "ea-update", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Update Attributes", + "then": "then {\n the SUT sends a valid Response for the operations:\n Update Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-property-instance.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Update Entity Attributes and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: fragment_filename set to 'ngsild-null/null-property-instance.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + }, + { + "name": "011_08_02 Delete a Relationship", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/EA/011_08_02", + "doc": "Check that one can delete a specific attribute instance using NGSI-LD Null in an Update Attributes operation", + "tags": [ + "5_6_2", + "6_6_3_2", + "ea-update", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Update Attributes", + "then": "then {\n the SUT sends a valid Response for the operations:\n Update Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-relationship-instance.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Update Entity Attributes and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: fragment_filename set to 'ngsild-null/null-relationship-instance.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + }, + { + "name": "011_08_03 Delete a GeoProperty", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/EA/011_08_03", + "doc": "Check that one can delete a specific attribute instance using NGSI-LD Null in an Update Attributes operation", + "tags": [ + "5_6_2", + "6_6_3_2", + "ea-update", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Update Attributes", + "then": "then {\n the SUT sends a valid Response for the operations:\n Update Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-geoproperty-instance.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Update Entity Attributes and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: fragment_filename set to 'ngsild-null/null-geoproperty-instance.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + }, + { + "name": "011_08_04 Delete a LanguageProperty", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/EA/011_08_04", + "doc": "Check that one can delete a specific attribute instance using NGSI-LD Null in an Update Attributes operation", + "tags": [ + "4_5_18", + "5_6_2", + "6_6_3_2", + "ea-update", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Update Attributes", + "then": "then {\n the SUT sends a valid Response for the operations:\n Update Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-languageproperty-instance.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Update Entity Attributes and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: fragment_filename set to 'ngsild-null/null-languageproperty-instance.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + } + ], + "permutations": [ + "then", + "when" + ], + "robotpath": "ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes", + "robotfile": "011_08" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Provision/011_09.json b/doc/files/ContextInformation/Provision/011_09.json new file mode 100644 index 0000000000000000000000000000000000000000..d6cb542f899af2849977f115a4fd8f6f6de97141 --- /dev/null +++ b/doc/files/ContextInformation/Provision/011_09.json @@ -0,0 +1,101 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Prov/EA/011_09", + "test_objective": "Check that one can delete the default attribute instance using NGSI-LD Null in an Update Attributes operation", + "reference": "ETSI GS CIM 009 V1.6.1 [], clauses 4.5.18, 5.6.2, 6.6.3.2", + "config_id": "", + "parent_release": "v1.6.1", + "clauses": [ + "4.5.18", + "5.6.2", + "6.6.3.2" + ], + "pics_selection": "", + "keywords": [ + "Update Attributes", + "Delete Initial Entity", + "Setup Initial Entity" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}", + "test_cases": [ + { + "name": "011_09_01 Delete a Property", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/EA/011_09_01", + "doc": "Check that one can delete the default attribute instance using NGSI-LD Null in an Update Attributes operation", + "tags": [ + "5_6_2", + "6_6_3_2", + "ea-update", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Update Attributes", + "then": "then {\n the SUT sends a valid Response for the operations:\n Update Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-property-default-instance.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Update Entity Attributes and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: fragment_filename set to 'ngsild-null/null-property.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + }, + { + "name": "011_09_02 Delete a Relationship", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/EA/011_09_02", + "doc": "Check that one can delete the default attribute instance using NGSI-LD Null in an Update Attributes operation", + "tags": [ + "5_6_2", + "6_6_3_2", + "ea-update", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Update Attributes", + "then": "then {\n the SUT sends a valid Response for the operations:\n Update Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-relationship-default-instance.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Update Entity Attributes and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: fragment_filename set to 'ngsild-null/null-relationship.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + }, + { + "name": "011_09_03 Delete a GeoProperty", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/EA/011_09_03", + "doc": "Check that one can delete the default attribute instance using NGSI-LD Null in an Update Attributes operation", + "tags": [ + "5_6_2", + "6_6_3_2", + "ea-update", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Update Attributes", + "then": "then {\n the SUT sends a valid Response for the operations:\n Update Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-geoproperty-default-instance.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Update Entity Attributes and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: fragment_filename set to 'ngsild-null/null-geoproperty.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + }, + { + "name": "011_09_04 Delete a LanguageProperty", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/EA/011_09_04", + "doc": "Check that one can delete the default attribute instance using NGSI-LD Null in an Update Attributes operation", + "tags": [ + "4_5_18", + "5_6_2", + "6_6_3_2", + "ea-update", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Update Attributes", + "then": "then {\n the SUT sends a valid Response for the operations:\n Update Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-languageproperty-default-instance.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Update Entity Attributes and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: fragment_filename set to 'ngsild-null/null-languageproperty.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + } + ], + "permutations": [ + "then", + "when" + ], + "robotpath": "ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes", + "robotfile": "011_09" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Provision/012_05.json b/doc/files/ContextInformation/Provision/012_05.json new file mode 100644 index 0000000000000000000000000000000000000000..529bb3ad6ed7baf54f12978956a99f5e572d7a04 --- /dev/null +++ b/doc/files/ContextInformation/Provision/012_05.json @@ -0,0 +1,101 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Prov/EA/012_05", + "test_objective": "Check that one can delete an attribute using NGSI-LD Null in an Partial Attribute Update operation", + "reference": "ETSI GS CIM 009 V1.6.1 [], clauses 4.5.18, 5.6.4, 6.7.3.1", + "config_id": "", + "parent_release": "v1.6.1", + "clauses": [ + "4.5.18", + "5.6.4", + "6.7.3.1" + ], + "pics_selection": "", + "keywords": [ + "Update Attributes", + "Delete Initial Entity", + "Setup Initial Entity" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}", + "test_cases": [ + { + "name": "012_05_01 Delete a Property", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/EA/012_05_01", + "doc": "Check that one can delete an attribute using NGSI-LD Null in an Partial Attribute Update operation", + "tags": [ + "5_6_4", + "6_7_3_1", + "ea-partial-update", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Update Attributes", + "then": "then {\n the SUT sends a valid Response for the operations:\n Partial Update Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-property.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Request Partial Update Entity Attributes and\n Query Parameter: entityId set to '${entity_id}' and\n Query Parameter: AttributeId set to 'name' and\n Query Parameter: fragment_filename set to 'ngsild-null/null-property-fragment.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + }, + { + "name": "012_05_02 Delete a Relationship", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/EA/012_05_02", + "doc": "Check that one can delete an attribute using NGSI-LD Null in an Partial Attribute Update operation", + "tags": [ + "5_6_4", + "6_7_3_1", + "ea-partial-update", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Update Attributes", + "then": "then {\n the SUT sends a valid Response for the operations:\n Partial Update Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-relationship.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Request Partial Update Entity Attributes and\n Query Parameter: entityId set to '${entity_id}' and\n Query Parameter: AttributeId set to 'locatedAt' and\n Query Parameter: fragment_filename set to 'ngsild-null/null-relationship-fragment.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + }, + { + "name": "012_05_03 Delete a GeoProperty", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/EA/012_05_03", + "doc": "Check that one can delete an attribute using NGSI-LD Null in an Partial Attribute Update operation", + "tags": [ + "5_6_4", + "6_7_3_1", + "ea-partial-update", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Update Attributes", + "then": "then {\n the SUT sends a valid Response for the operations:\n Partial Update Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-geoproperty.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Request Partial Update Entity Attributes and\n Query Parameter: entityId set to '${entity_id}' and\n Query Parameter: AttributeId set to 'location' and\n Query Parameter: fragment_filename set to 'ngsild-null/null-geoproperty-fragment.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + }, + { + "name": "012_05_04 Delete a LanguageProperty", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/EA/012_05_04", + "doc": "Check that one can delete an attribute using NGSI-LD Null in an Partial Attribute Update operation", + "tags": [ + "4_5_18", + "5_6_4", + "6_7_3_1", + "ea-partial-update", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Update Attributes", + "then": "then {\n the SUT sends a valid Response for the operations:\n Partial Update Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-languageproperty.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Request Partial Update Entity Attributes and\n Query Parameter: entityId set to '${entity_id}' and\n Query Parameter: AttributeId set to 'street' and\n Query Parameter: fragment_filename set to 'ngsild-null/null-languageproperty-fragment.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + } + ], + "permutations": [ + "then", + "when" + ], + "robotpath": "ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate", + "robotfile": "012_05" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Provision/012_06.json b/doc/files/ContextInformation/Provision/012_06.json new file mode 100644 index 0000000000000000000000000000000000000000..23e46b695e2f0eb0a56d8018faf433ab52866c16 --- /dev/null +++ b/doc/files/ContextInformation/Provision/012_06.json @@ -0,0 +1,101 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Prov/EA/012_06", + "test_objective": "Check that one can delete a specific attribute instance using NGSI-LD Null in an Partial Attribute Update operation", + "reference": "ETSI GS CIM 009 V1.6.1 [], clauses 4.5.18, 5.6.4, 6.7.3.1", + "config_id": "", + "parent_release": "v1.6.1", + "clauses": [ + "4.5.18", + "5.6.4", + "6.7.3.1" + ], + "pics_selection": "", + "keywords": [ + "Update Attributes", + "Delete Initial Entity", + "Setup Initial Entity" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}", + "test_cases": [ + { + "name": "012_06_01 Delete a Property", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/EA/012_06_01", + "doc": "Check that one can delete a specific attribute instance using NGSI-LD Null in an Partial Attribute Update operation", + "tags": [ + "5_6_4", + "6_7_3_1", + "ea-partial-update", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Update Attributes", + "then": "then {\n the SUT sends a valid Response for the operations:\n Partial Update Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-property-instance.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Request Partial Update Entity Attributes and\n Query Parameter: entityId set to '${entity_id}' and\n Query Parameter: AttributeId set to 'name' and\n Query Parameter: fragment_filename set to 'ngsild-null/null-property-instance-fragment.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + }, + { + "name": "012_06_02 Delete a Relationship", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/EA/012_06_02", + "doc": "Check that one can delete a specific attribute instance using NGSI-LD Null in an Partial Attribute Update operation", + "tags": [ + "5_6_4", + "6_7_3_1", + "ea-partial-update", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Update Attributes", + "then": "then {\n the SUT sends a valid Response for the operations:\n Partial Update Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-relationship-instance.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Request Partial Update Entity Attributes and\n Query Parameter: entityId set to '${entity_id}' and\n Query Parameter: AttributeId set to 'locatedAt' and\n Query Parameter: fragment_filename set to 'ngsild-null/null-relationship-instance-fragment.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + }, + { + "name": "012_06_03 Delete a GeoProperty", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/EA/012_06_03", + "doc": "Check that one can delete a specific attribute instance using NGSI-LD Null in an Partial Attribute Update operation", + "tags": [ + "5_6_4", + "6_7_3_1", + "ea-partial-update", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Update Attributes", + "then": "then {\n the SUT sends a valid Response for the operations:\n Partial Update Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-geoproperty-instance.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Request Partial Update Entity Attributes and\n Query Parameter: entityId set to '${entity_id}' and\n Query Parameter: AttributeId set to 'location' and\n Query Parameter: fragment_filename set to 'ngsild-null/null-geoproperty-instance-fragment.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + }, + { + "name": "012_06_04 Delete a LanguageProperty", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/EA/012_06_04", + "doc": "Check that one can delete a specific attribute instance using NGSI-LD Null in an Partial Attribute Update operation", + "tags": [ + "4_5_18", + "5_6_4", + "6_7_3_1", + "ea-partial-update", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Update Attributes", + "then": "then {\n the SUT sends a valid Response for the operations:\n Partial Update Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-languageproperty-instance.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Request Partial Update Entity Attributes and\n Query Parameter: entityId set to '${entity_id}' and\n Query Parameter: AttributeId set to 'street' and\n Query Parameter: fragment_filename set to 'ngsild-null/null-languageproperty-instance-fragment.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + } + ], + "permutations": [ + "then", + "when" + ], + "robotpath": "ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate", + "robotfile": "012_06" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Provision/012_07.json b/doc/files/ContextInformation/Provision/012_07.json new file mode 100644 index 0000000000000000000000000000000000000000..18c0a6a728fccd019a593af9b05c08022361dec1 --- /dev/null +++ b/doc/files/ContextInformation/Provision/012_07.json @@ -0,0 +1,101 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Prov/EA/012_07", + "test_objective": "Check that one can delete the default attribute instance using NGSI-LD Null in an Partial Attribute Update operation", + "reference": "ETSI GS CIM 009 V1.6.1 [], clauses 4.5.18, 5.6.4, 6.7.3.1", + "config_id": "", + "parent_release": "v1.6.1", + "clauses": [ + "4.5.18", + "5.6.4", + "6.7.3.1" + ], + "pics_selection": "", + "keywords": [ + "Update Attributes", + "Delete Initial Entity", + "Setup Initial Entity" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}", + "test_cases": [ + { + "name": "012_07_01 Delete a Property", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/EA/012_07_01", + "doc": "Check that one can delete the default attribute instance using NGSI-LD Null in an Partial Attribute Update operation", + "tags": [ + "5_6_4", + "6_7_3_1", + "ea-partial-update", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Update Attributes", + "then": "then {\n the SUT sends a valid Response for the operations:\n Partial Update Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-property-default-instance.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Request Partial Update Entity Attributes and\n Query Parameter: entityId set to '${entity_id}' and\n Query Parameter: AttributeId set to 'name' and\n Query Parameter: fragment_filename set to 'ngsild-null/null-property-fragment.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + }, + { + "name": "012_07_02 Delete a Relationship", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/EA/012_07_02", + "doc": "Check that one can delete the default attribute instance using NGSI-LD Null in an Partial Attribute Update operation", + "tags": [ + "5_6_4", + "6_7_3_1", + "ea-partial-update", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Update Attributes", + "then": "then {\n the SUT sends a valid Response for the operations:\n Partial Update Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-relationship-default-instance.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Request Partial Update Entity Attributes and\n Query Parameter: entityId set to '${entity_id}' and\n Query Parameter: AttributeId set to 'locatedAt' and\n Query Parameter: fragment_filename set to 'ngsild-null/null-relationship-fragment.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + }, + { + "name": "012_07_03 Delete a GeoProperty", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/EA/012_07_03", + "doc": "Check that one can delete the default attribute instance using NGSI-LD Null in an Partial Attribute Update operation", + "tags": [ + "5_6_4", + "6_7_3_1", + "ea-partial-update", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Update Attributes", + "then": "then {\n the SUT sends a valid Response for the operations:\n Partial Update Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-geoproperty-default-instance.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Request Partial Update Entity Attributes and\n Query Parameter: entityId set to '${entity_id}' and\n Query Parameter: AttributeId set to 'location' and\n Query Parameter: fragment_filename set to 'ngsild-null/null-geoproperty-fragment.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + }, + { + "name": "012_07_04 Delete a LanguageProperty", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/EA/012_07_04", + "doc": "Check that one can delete the default attribute instance using NGSI-LD Null in an Partial Attribute Update operation", + "tags": [ + "4_5_18", + "5_6_4", + "6_7_3_1", + "ea-partial-update", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Update Attributes", + "then": "then {\n the SUT sends a valid Response for the operations:\n Partial Update Entity Attributes with Response Status Code set to 204 and\n Retrieve Entity by Id with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-languageproperty-default-instance.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Request Partial Update Entity Attributes and\n Query Parameter: entityId set to '${entity_id}' and\n Query Parameter: AttributeId set to 'street' and\n Query Parameter: fragment_filename set to 'ngsild-null/null-languageproperty-fragment.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + } + ], + "permutations": [ + "then", + "when" + ], + "robotpath": "ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate", + "robotfile": "012_07" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Provision/054_02.json b/doc/files/ContextInformation/Provision/054_02.json index 35e9446bf6ec1382227ad04925d7956e7cad9998..0c06fec8cc898722660d72800e9d122948d09170 100644 --- a/doc/files/ContextInformation/Provision/054_02.json +++ b/doc/files/ContextInformation/Provision/054_02.json @@ -54,7 +54,7 @@ "endpoint": "entities/{entity_id}" }, { - "name": "054_02_03 Replace an existing entity giving a nonexsitent Id", + "name": "054_02_03 Replace an existing entity giving a nonexistent Id", "permutation_tp_id": "TP/NGSI-LD/CI/Prov/E/054_02_03", "doc": "Check that if the target entity ID is faulty an error is raised", "tags": [ diff --git a/doc/files/ContextInformation/Provision/056_01.json b/doc/files/ContextInformation/Provision/056_01.json new file mode 100644 index 0000000000000000000000000000000000000000..191a578b4619792c560fee810179e12e3b53020f --- /dev/null +++ b/doc/files/ContextInformation/Provision/056_01.json @@ -0,0 +1,99 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Prov/E/056_01", + "test_objective": "Check that one can merge an entity", + "reference": "ETSI GS CIM 009 V1.6.1 [], clauses 5.6.17, 6.5.3.4", + "config_id": "", + "parent_release": "v1.6.1", + "clauses": [ + "5.6.17", + "6.5.3.4" + ], + "pics_selection": "", + "keywords": [ + "Merge Entity Scenarios", + "Setup Initial Entity", + "Delete Initial Entity" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}", + "test_cases": [ + { + "name": "056_01_01 MergeAnEmptyEntity", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/E/056_01_01", + "doc": "Check that one can merge an entity", + "tags": [ + "5_6_17", + "6_5_3_4", + "e-merge", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Merge Entity Scenarios", + "then": "then {\n the SUT sends a valid Response for the operations:\n Merge Entity with Response Status Code set to 204 and\n Query Entity with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'merge/building-non-edited.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entity_id}'\n method set to 'PATCH'\n Merge Entity and\n Query Parameter: entity_id set to '${entity_id}' and\n Query Parameter: entity_filename set to 'building-minimal.jsonld' and\n Query Parameter: content_type set to 'application/ld+json' and\n Query Parameter: context set to ''\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entity_id}" + }, + { + "name": "056_01_02 MergeSimpleProperties", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/E/056_01_02", + "doc": "Check that one can merge an entity", + "tags": [ + "5_6_17", + "6_5_3_4", + "e-merge", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Merge Entity Scenarios", + "then": "then {\n the SUT sends a valid Response for the operations:\n Merge Entity with Response Status Code set to 204 and\n Query Entity with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'merge/building-attributes-edited.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entity_id}'\n method set to 'PATCH'\n Merge Entity and\n Query Parameter: entity_id set to '${entity_id}' and\n Query Parameter: entity_filename set to 'building-simple-attributes-second.jsonld' and\n Query Parameter: content_type set to 'application/ld+json' and\n Query Parameter: context set to ''\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entity_id}" + }, + { + "name": "056_01_03 MergeSimpleRelationship", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/E/056_01_03", + "doc": "Check that one can merge an entity", + "tags": [ + "5_6_17", + "6_5_3_4", + "e-merge", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Merge Entity Scenarios", + "then": "then {\n the SUT sends a valid Response for the operations:\n Merge Entity with Response Status Code set to 204 and\n Query Entity with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'merge/building-with-relationship.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entity_id}'\n method set to 'PATCH'\n Merge Entity and\n Query Parameter: entity_id set to '${entity_id}' and\n Query Parameter: entity_filename set to 'building-relationship.jsonld' and\n Query Parameter: content_type set to 'application/ld+json' and\n Query Parameter: context set to ''\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entity_id}" + }, + { + "name": "056_01_04 MergePropertyWithPartialData", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/E/056_01_04", + "doc": "Check that one can merge an entity", + "tags": [ + "5_6_17", + "6_5_3_4", + "e-merge", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Merge Entity Scenarios", + "then": "then {\n the SUT sends a valid Response for the operations:\n Merge Entity with Response Status Code set to 204 and\n Query Entity with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'merge/building-with-changed-airQualityLevel.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entity_id}'\n method set to 'PATCH'\n Merge Entity and\n Query Parameter: entity_id set to '${entity_id}' and\n Query Parameter: entity_filename set to 'merge/building-only-airQualityLevel-value.jsonld' and\n Query Parameter: content_type set to 'application/ld+json' and\n Query Parameter: context set to ''\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entity_id}" + } + ], + "permutations": [ + "then", + "when" + ], + "robotpath": "ContextInformation/Provision/Entities/MergeEntity", + "robotfile": "056_01" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Provision/056_02.json b/doc/files/ContextInformation/Provision/056_02.json new file mode 100644 index 0000000000000000000000000000000000000000..302506cb26c8d4aefa19bab105703a5800a8ff59 --- /dev/null +++ b/doc/files/ContextInformation/Provision/056_02.json @@ -0,0 +1,81 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Prov/E/056_02", + "test_objective": "Check that if the target entity ID is faulty an error is raised", + "reference": "ETSI GS CIM 009 V1.6.1 [], clauses 5.6.17, 6.5.3.4", + "config_id": "", + "parent_release": "v1.6.1", + "clauses": [ + "5.6.17", + "6.5.3.4" + ], + "pics_selection": "", + "keywords": [ + "Merge an existing entity with a faulty ID", + "Setup Initial Entity", + "Delete Initial Entity" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}", + "test_cases": [ + { + "name": "056_02_01 Merge an existing entity giving an invalid Id", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/E/056_02_01", + "doc": "Check that if the target entity ID is faulty an error is raised", + "tags": [ + "5_6_17", + "6_5_3_4", + "e-merge", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Merge an existing entity with a faulty ID", + "then": "then {\n the SUT sends a valid Response for the operation:\n Merge Entity with Response Status Code set to 400\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entity_id}'\n method set to 'PATCH'\n Merge Entity and\n Query Parameter: entity_id set to 'invalidUri' and\n Query Parameter: entity_filename set to '${entity_replacement_filename}' and\n Query Parameter: content_type set to 'application/json' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entity_id}" + }, + { + "name": "056_02_02 Merge an existing entity without giving an Id", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/E/056_02_02", + "doc": "Check that if the target entity ID is faulty an error is raised", + "tags": [ + "5_6_17", + "6_5_3_4", + "e-merge", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Merge an existing entity with a faulty ID", + "then": "then {\n the SUT sends a valid Response for the operation:\n Merge Entity with Response Status Code set to 400\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entity_id}'\n method set to 'PATCH'\n Merge Entity and\n Query Parameter: entity_id set to '${EMPTY}' and\n Query Parameter: entity_filename set to '${entity_replacement_filename}' and\n Query Parameter: content_type set to 'application/json' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entity_id}" + }, + { + "name": "056_02_03 Merge an existing entity giving a nonexistent Id", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/E/056_02_03", + "doc": "Check that if the target entity ID is faulty an error is raised", + "tags": [ + "5_6_17", + "6_5_3_4", + "e-merge", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Merge an existing entity with a faulty ID", + "then": "then {\n the SUT sends a valid Response for the operation:\n Merge Entity with Response Status Code set to 404\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entity_id}'\n method set to 'PATCH'\n Merge Entity and\n Query Parameter: entity_id set to 'urn:ngsi-ld:Building:Nonexistent' and\n Query Parameter: entity_filename set to '${entity_replacement_filename}' and\n Query Parameter: content_type set to 'application/json' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entity_id}" + } + ], + "permutations": [ + "then", + "when" + ], + "robotpath": "ContextInformation/Provision/Entities/MergeEntity", + "robotfile": "056_02" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Provision/056_03.json b/doc/files/ContextInformation/Provision/056_03.json new file mode 100644 index 0000000000000000000000000000000000000000..4399795485eae0f69fd7609f20a3c449b168d504 --- /dev/null +++ b/doc/files/ContextInformation/Provision/056_03.json @@ -0,0 +1,103 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Prov/E/056_03", + "test_objective": "Check that one can delete an attribute using NGSI-LD Null in a Merge Entity operation", + "reference": "ETSI GS CIM 009 V1.6.1 [], clauses 4.5.18, 4.5.5, 5.6.17, 6.5.3.4", + "config_id": "", + "parent_release": "v1.6.1", + "clauses": [ + "4.5.18", + "4.5.5", + "5.6.17", + "6.5.3.4" + ], + "pics_selection": "", + "keywords": [ + "Merge Entity Scenarios", + "Setup Initial Entity", + "Delete Initial Entity" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}", + "test_cases": [ + { + "name": "056_03_01 Delete a Property", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/E/056_03_01", + "doc": "Check that one can delete an attribute using NGSI-LD Null in a Merge Entity operation", + "tags": [ + "4_5_5", + "5_6_17", + "6_5_3_4", + "e-merge", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Merge Entity Scenarios", + "then": "then {\n the SUT sends a valid Response for the operations:\n Merge Entity with Response Status Code set to 204 and\n Query Entity with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-property.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entity_id}'\n method set to 'PATCH'\n Merge Entity and\n Query Parameter: entity_id set to '${entity_id}' and\n Query Parameter: entity_filename set to 'fragmentEntities/ngsild-null/building-null-property.jsonld' and\n Query Parameter: content_type set to 'application/ld+json' and\n Query Parameter: context set to ''\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entity_id}" + }, + { + "name": "056_03_02 Delete a Relationship", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/E/056_03_02", + "doc": "Check that one can delete an attribute using NGSI-LD Null in a Merge Entity operation", + "tags": [ + "5_6_17", + "6_5_3_4", + "e-merge", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Merge Entity Scenarios", + "then": "then {\n the SUT sends a valid Response for the operations:\n Merge Entity with Response Status Code set to 204 and\n Query Entity with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-relationship.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entity_id}'\n method set to 'PATCH'\n Merge Entity and\n Query Parameter: entity_id set to '${entity_id}' and\n Query Parameter: entity_filename set to 'fragmentEntities/ngsild-null/building-null-relationship.jsonld' and\n Query Parameter: content_type set to 'application/ld+json' and\n Query Parameter: context set to ''\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entity_id}" + }, + { + "name": "056_03_03 Delete a GeoProperty", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/E/056_03_03", + "doc": "Check that one can delete an attribute using NGSI-LD Null in a Merge Entity operation", + "tags": [ + "5_6_17", + "6_5_3_4", + "e-merge", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Merge Entity Scenarios", + "then": "then {\n the SUT sends a valid Response for the operations:\n Merge Entity with Response Status Code set to 204 and\n Query Entity with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-geoproperty.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entity_id}'\n method set to 'PATCH'\n Merge Entity and\n Query Parameter: entity_id set to '${entity_id}' and\n Query Parameter: entity_filename set to 'fragmentEntities/ngsild-null/building-null-geoproperty.jsonld' and\n Query Parameter: content_type set to 'application/ld+json' and\n Query Parameter: context set to ''\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entity_id}" + }, + { + "name": "056_03_04 Delete a LanguageProperty", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/E/056_03_04", + "doc": "Check that one can delete an attribute using NGSI-LD Null in a Merge Entity operation", + "tags": [ + "4_5_18", + "5_6_17", + "6_5_3_4", + "e-merge", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Merge Entity Scenarios", + "then": "then {\n the SUT sends a valid Response for the operations:\n Merge Entity with Response Status Code set to 204 and\n Query Entity with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-languageproperty.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entity_id}'\n method set to 'PATCH'\n Merge Entity and\n Query Parameter: entity_id set to '${entity_id}' and\n Query Parameter: entity_filename set to 'fragmentEntities/ngsild-null/building-null-languageproperty.jsonld' and\n Query Parameter: content_type set to 'application/ld+json' and\n Query Parameter: context set to ''\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entity_id}" + } + ], + "permutations": [ + "then", + "when" + ], + "robotpath": "ContextInformation/Provision/Entities/MergeEntity", + "robotfile": "056_03" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Provision/056_04.json b/doc/files/ContextInformation/Provision/056_04.json new file mode 100644 index 0000000000000000000000000000000000000000..ee31f3ed0e311fa4eb5d22851f4a4092be4b0753 --- /dev/null +++ b/doc/files/ContextInformation/Provision/056_04.json @@ -0,0 +1,106 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Prov/E/056_04", + "test_objective": "Check that one can delete a specific attribute instance using NGSI-LD Null in a Merge Entity operation", + "reference": "ETSI GS CIM 009 V1.6.1 [], clauses 4.5.18, 4.5.5, 5.6.17, 6.5.3.4", + "config_id": "", + "parent_release": "v1.6.1", + "clauses": [ + "4.5.18", + "4.5.5", + "5.6.17", + "6.5.3.4" + ], + "pics_selection": "", + "keywords": [ + "Merge Entity Scenarios", + "Setup Initial Entity", + "Delete Initial Entity" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}", + "test_cases": [ + { + "name": "056_04_01 Delete a Property instance", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/E/056_04_01", + "doc": "Check that one can delete a specific attribute instance using NGSI-LD Null in a Merge Entity operation", + "tags": [ + "4_5_5", + "5_6_17", + "6_5_3_4", + "e-merge", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Merge Entity Scenarios", + "then": "then {\n the SUT sends a valid Response for the operations:\n Merge Entity with Response Status Code set to 204 and\n Query Entity with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-property-instance.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entity_id}'\n method set to 'PATCH'\n Merge Entity and\n Query Parameter: entity_id set to '${entity_id}' and\n Query Parameter: entity_filename set to 'fragmentEntities/ngsild-null/building-null-property-instance.jsonld' and\n Query Parameter: content_type set to 'application/ld+json' and\n Query Parameter: context set to ''\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entity_id}" + }, + { + "name": "056_04_02 Delete a Relationship instance", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/E/056_04_02", + "doc": "Check that one can delete a specific attribute instance using NGSI-LD Null in a Merge Entity operation", + "tags": [ + "4_5_5", + "5_6_17", + "6_5_3_4", + "e-merge", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Merge Entity Scenarios", + "then": "then {\n the SUT sends a valid Response for the operations:\n Merge Entity with Response Status Code set to 204 and\n Query Entity with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-relationship-instance.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entity_id}'\n method set to 'PATCH'\n Merge Entity and\n Query Parameter: entity_id set to '${entity_id}' and\n Query Parameter: entity_filename set to 'fragmentEntities/ngsild-null/building-null-relationship-instance.jsonld' and\n Query Parameter: content_type set to 'application/ld+json' and\n Query Parameter: context set to ''\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entity_id}" + }, + { + "name": "056_04_03 Delete a GeoProperty instance", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/E/056_04_03", + "doc": "Check that one can delete a specific attribute instance using NGSI-LD Null in a Merge Entity operation", + "tags": [ + "4_5_5", + "5_6_17", + "6_5_3_4", + "e-merge", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Merge Entity Scenarios", + "then": "then {\n the SUT sends a valid Response for the operations:\n Merge Entity with Response Status Code set to 204 and\n Query Entity with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-geoproperty-instance.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entity_id}'\n method set to 'PATCH'\n Merge Entity and\n Query Parameter: entity_id set to '${entity_id}' and\n Query Parameter: entity_filename set to 'fragmentEntities/ngsild-null/building-null-geoproperty-instance.jsonld' and\n Query Parameter: content_type set to 'application/ld+json' and\n Query Parameter: context set to ''\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entity_id}" + }, + { + "name": "056_04_04 Delete a LanguageProperty instance", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/E/056_04_04", + "doc": "Check that one can delete a specific attribute instance using NGSI-LD Null in a Merge Entity operation", + "tags": [ + "4_5_18", + "4_5_5", + "5_6_17", + "6_5_3_4", + "e-merge", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Merge Entity Scenarios", + "then": "then {\n the SUT sends a valid Response for the operations:\n Merge Entity with Response Status Code set to 204 and\n Query Entity with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-languageproperty-instance.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entity_id}'\n method set to 'PATCH'\n Merge Entity and\n Query Parameter: entity_id set to '${entity_id}' and\n Query Parameter: entity_filename set to 'fragmentEntities/ngsild-null/building-null-languageproperty-instance.jsonld' and\n Query Parameter: content_type set to 'application/ld+json' and\n Query Parameter: context set to ''\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entity_id}" + } + ], + "permutations": [ + "then", + "when" + ], + "robotpath": "ContextInformation/Provision/Entities/MergeEntity", + "robotfile": "056_04" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Provision/056_05.json b/doc/files/ContextInformation/Provision/056_05.json new file mode 100644 index 0000000000000000000000000000000000000000..0961c38a03903d1595d4cd5eaddf184b929d0765 --- /dev/null +++ b/doc/files/ContextInformation/Provision/056_05.json @@ -0,0 +1,106 @@ +{ + "tp_id": "TP/NGSI-LD/CI/Prov/E/056_05", + "test_objective": "Check that one can delete the default attribute instance using NGSI-LD Null in a Merge Entity operation", + "reference": "ETSI GS CIM 009 V1.6.1 [], clauses 4.5.18, 4.5.5, 5.6.17, 6.5.3.4", + "config_id": "", + "parent_release": "v1.6.1", + "clauses": [ + "4.5.18", + "4.5.5", + "5.6.17", + "6.5.3.4" + ], + "pics_selection": "", + "keywords": [ + "Merge Entity Scenarios", + "Setup Initial Entity", + "Delete Initial Entity" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Entity ${entity} \n with an id set to ${entityId} \n}", + "test_cases": [ + { + "name": "056_05_01 Delete a Property instance", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/E/056_05_01", + "doc": "Check that one can delete the default attribute instance using NGSI-LD Null in a Merge Entity operation", + "tags": [ + "4_5_5", + "5_6_17", + "6_5_3_4", + "e-merge", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Merge Entity Scenarios", + "then": "then {\n the SUT sends a valid Response for the operations:\n Merge Entity with Response Status Code set to 204 and\n Query Entity with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-property-default-instance.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entity_id}'\n method set to 'PATCH'\n Merge Entity and\n Query Parameter: entity_id set to '${entity_id}' and\n Query Parameter: entity_filename set to 'fragmentEntities/ngsild-null/building-null-property.jsonld' and\n Query Parameter: content_type set to 'application/ld+json' and\n Query Parameter: context set to ''\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entity_id}" + }, + { + "name": "056_05_02 Delete a Relationship instance", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/E/056_05_02", + "doc": "Check that one can delete the default attribute instance using NGSI-LD Null in a Merge Entity operation", + "tags": [ + "4_5_5", + "5_6_17", + "6_5_3_4", + "e-merge", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Merge Entity Scenarios", + "then": "then {\n the SUT sends a valid Response for the operations:\n Merge Entity with Response Status Code set to 204 and\n Query Entity with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-relationship-default-instance.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entity_id}'\n method set to 'PATCH'\n Merge Entity and\n Query Parameter: entity_id set to '${entity_id}' and\n Query Parameter: entity_filename set to 'fragmentEntities/ngsild-null/building-null-relationship.jsonld' and\n Query Parameter: content_type set to 'application/ld+json' and\n Query Parameter: context set to ''\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entity_id}" + }, + { + "name": "056_05_03 Delete a GeoProperty instance", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/E/056_05_03", + "doc": "Check that one can delete the default attribute instance using NGSI-LD Null in a Merge Entity operation", + "tags": [ + "4_5_5", + "5_6_17", + "6_5_3_4", + "e-merge", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Merge Entity Scenarios", + "then": "then {\n the SUT sends a valid Response for the operations:\n Merge Entity with Response Status Code set to 204 and\n Query Entity with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-geoproperty-default-instance.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entity_id}'\n method set to 'PATCH'\n Merge Entity and\n Query Parameter: entity_id set to '${entity_id}' and\n Query Parameter: entity_filename set to 'fragmentEntities/ngsild-null/building-null-geoproperty.jsonld' and\n Query Parameter: content_type set to 'application/ld+json' and\n Query Parameter: context set to ''\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entity_id}" + }, + { + "name": "056_05_04 Delete a LanguageProperty instance", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/E/056_05_04", + "doc": "Check that one can delete the default attribute instance using NGSI-LD Null in a Merge Entity operation", + "tags": [ + "4_5_18", + "4_5_5", + "5_6_17", + "6_5_3_4", + "e-merge", + "since_v1.6.1" + ], + "setup": "Setup Initial Entity", + "teardown": "Delete Initial Entity", + "template": "Merge Entity Scenarios", + "then": "then {\n the SUT sends a valid Response for the operations:\n Merge Entity with Response Status Code set to 204 and\n Query Entity with Response Body containing en entity element with id set to 'entity_id=${entity_id}' and body content set to 'ngsild-null/building-deleted-languageproperty-default-instance.jsonld'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entity_id}'\n method set to 'PATCH'\n Merge Entity and\n Query Parameter: entity_id set to '${entity_id}' and\n Query Parameter: entity_filename set to 'fragmentEntities/ngsild-null/building-null-languageproperty.jsonld' and\n Query Parameter: content_type set to 'application/ld+json' and\n Query Parameter: context set to ''\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entity_id}" + } + ], + "permutations": [ + "then", + "when" + ], + "robotpath": "ContextInformation/Provision/Entities/MergeEntity", + "robotfile": "056_05" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Subscription/029_06.json b/doc/files/ContextInformation/Subscription/029_06.json index fcb7c5fe857b8fb612345dc6acf252fe69c5174c..d7bff83e6fedc64856d3146042757bf4b3d18280 100644 --- a/doc/files/ContextInformation/Subscription/029_06.json +++ b/doc/files/ContextInformation/Subscription/029_06.json @@ -1,6 +1,6 @@ { "tp_id": "TP/NGSI-LD/CI/SUB/029_06", - "test_objective": "Check that you can update a subscription: The implementation shall modify the target Subscription", + "test_objective": "Check that one can update a subscription: The implementation shall modify the target Subscription", "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.8.2", "config_id": "", "parent_release": "v1.3.1", @@ -18,7 +18,7 @@ { "name": "029_06_01 Update Subscription", "permutation_tp_id": "TP/NGSI-LD/CI/SUB/029_06_01", - "doc": "Check that you can update a subscription: The implementation shall modify the target Subscription", + "doc": "Check that one can update a subscription: The implementation shall modify the target Subscription", "tags": [ "5_8_2", "sub-update" diff --git a/doc/files/ContextInformation/Subscription/046_06.json b/doc/files/ContextInformation/Subscription/046_06.json index 82b54629c779cccaf2d4578cbe8108de66f46349..ecd8e96a154e29d1b437174ab5abcb491f54fed8 100644 --- a/doc/files/ContextInformation/Subscription/046_06.json +++ b/doc/files/ContextInformation/Subscription/046_06.json @@ -1,9 +1,9 @@ { "tp_id": "TP/NGSI-LD/CI/SUB/046_06", - "test_objective": "If a Subscription does not define a timeInterval member, the notification shall be sent whenever an entity matches the query defined in the subscription. The notification message shall include all the subscribed Entities that changed and that match (as mandated by clauses 4.9 and 4.10) the query and geoquery conditions", - "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.8.6", + "test_objective": "Check that a notification is sent when an entity is created and entityCreated notification trigger is configured", + "reference": "ETSI GS CIM 009 V1.6.1 [], clause 5.8.6", "config_id": "", - "parent_release": "v1.3.1", + "parent_release": "v1.6.1", "clauses": [ "5.8.6" ], @@ -18,9 +18,10 @@ { "name": "046_06_01 Check that a notification is sent with all matching entities", "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_06_01", - "doc": "only the subscribed Entities matching the query and watched attributes shall be included.", + "doc": "Check that a notification is sent when an entity is created and entityCreated notification trigger is configured", "tags": [ "5_8_6", + "since_v1.6.1", "sub-notification" ], "setup": null, diff --git a/doc/files/ContextInformation/Subscription/046_21_01.json b/doc/files/ContextInformation/Subscription/046_21_01.json new file mode 100644 index 0000000000000000000000000000000000000000..dbd661418a69b030c5c597905a6b4c46081352a0 --- /dev/null +++ b/doc/files/ContextInformation/Subscription/046_21_01.json @@ -0,0 +1,39 @@ +{ + "tp_id": "TP/NGSI-LD/CI/SUB/046_21_01", + "test_objective": "Check that a notification is sent when an entity is deleted\nand entityDeleted notification trigger is configured", + "reference": "ETSI GS CIM 009 V1.6.1 [], clause 5.8.6", + "config_id": "", + "parent_release": "v1.6.1", + "clauses": [ + "5.8.6" + ], + "pics_selection": "", + "keywords": [ + "Create Initial Subscription And Entity", + "Delete Initial Subscription And Entity" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Subscription ${subscription} \n with an id set to ${subscription_id}\n and an initial Entity ${entity}\n with an id set to ${entity_id}\n}", + "test_cases": [ + { + "name": "046_21_01 Check that a notification is sent with matching entity", + "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_21_01", + "doc": "Delete an entity and check the received notification", + "tags": [ + "5_8_6", + "since_v1.6.1", + "sub-notification" + ], + "setup": "Create Initial Subscription And Entity", + "teardown": "Delete Initial Subscription And Entity", + "template": null, + "then": "then {\n the SUT sends a valid Response for the operation:\n Delete Entity by Id with Response Status Code set to 204\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{id}'\n method set to 'DELETE'\n Delete Entity Request with id set to '${entity_id}'\n}", + "http_verb": "DELETE", + "endpoint": "entities/{id}" + } + ], + "permutations": [], + "robotpath": "ContextInformation/Subscription/SubscriptionNotificationBehaviour", + "robotfile": "046_21_01" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Subscription/046_21_02.json b/doc/files/ContextInformation/Subscription/046_21_02.json new file mode 100644 index 0000000000000000000000000000000000000000..26c31225f0f740be35efcb990e36f019a4206735 --- /dev/null +++ b/doc/files/ContextInformation/Subscription/046_21_02.json @@ -0,0 +1,39 @@ +{ + "tp_id": "TP/NGSI-LD/CI/SUB/046_21_02", + "test_objective": "Check that a notification is sent with sysAttrs when an entity is deleted\nand entityDeleted notification trigger is configured", + "reference": "ETSI GS CIM 009 V1.6.1 [], clause 5.8.6", + "config_id": "", + "parent_release": "v1.6.1", + "clauses": [ + "5.8.6" + ], + "pics_selection": "", + "keywords": [ + "Create Initial Subscription And Entity", + "Delete Initial Subscription And Entity" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Subscription ${subscription} \n with an id set to ${subscription_id}\n and an initial Entity ${entity}\n with an id set to ${entity_id}\n}", + "test_cases": [ + { + "name": "046_21_02 Check that a notification is sent with matching entity", + "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_21_02", + "doc": "Delete an entity and check the received notification", + "tags": [ + "5_8_6", + "since_v1.6.1", + "sub-notification" + ], + "setup": "Create Initial Subscription And Entity", + "teardown": "Delete Initial Subscription And Entity", + "template": null, + "then": "then {\n the SUT sends a valid Response for the operation:\n Delete Entity by Id with Response Status Code set to 204\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{id}'\n method set to 'DELETE'\n Delete Entity Request with id set to '${entity_id}'\n}", + "http_verb": "DELETE", + "endpoint": "entities/{id}" + } + ], + "permutations": [], + "robotpath": "ContextInformation/Subscription/SubscriptionNotificationBehaviour", + "robotfile": "046_21_02" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Subscription/046_22_01.json b/doc/files/ContextInformation/Subscription/046_22_01.json new file mode 100644 index 0000000000000000000000000000000000000000..d828a3fe06b0ba530a95e206d4773e7c58679579 --- /dev/null +++ b/doc/files/ContextInformation/Subscription/046_22_01.json @@ -0,0 +1,39 @@ +{ + "tp_id": "TP/NGSI-LD/CI/SUB/046_22_01", + "test_objective": "Check that a notification is sent with keyValues when an attribute is deleted\nand attributeDeleted notification trigger is configured", + "reference": "ETSI GS CIM 009 V1.6.1 [], clause 5.8.6", + "config_id": "", + "parent_release": "v1.6.1", + "clauses": [ + "5.8.6" + ], + "pics_selection": "", + "keywords": [ + "Create Initial Subscription And Entity", + "Delete Initial Subscription And Entity" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Subscription ${subscription} \n with an id set to ${subscription_id}\n and an initial Entity ${entity}\n with an id set to ${entity_id}\n}", + "test_cases": [ + { + "name": "046_22_01 Check that a notification is sent with matching entity", + "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_22_01", + "doc": "Delete an attribute and check the received notification", + "tags": [ + "5_8_6", + "since_v1.6.1", + "sub-notification" + ], + "setup": "Create Initial Subscription And Entity", + "teardown": "Delete Initial Subscription And Entity", + "template": null, + "then": "then {\n the SUT sends a valid Response for the operations:\n Delete Entity Attributes with Response Status Code set to 204 and\n Notification with Notification containing entity element set to 'entity-deleted-name-attribute-keyValues.json'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}?${params_as_string}'\n method set to 'DELETE'\n Delete Entity Attributes: and\n Query Parameter: entityId set to '${entity_id}' and\n Query Parameter: attributeId set to 'name' and\n Query Parameter: datasetId set to '${EMPTY}' and\n Query Parameter: deleteAll set to '${EMPTY}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", + "http_verb": "DELETE", + "endpoint": "entities/{entityId}/attrs/{attributeId}?${params_as_string}" + } + ], + "permutations": [], + "robotpath": "ContextInformation/Subscription/SubscriptionNotificationBehaviour", + "robotfile": "046_22_01" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Subscription/046_22_02.json b/doc/files/ContextInformation/Subscription/046_22_02.json new file mode 100644 index 0000000000000000000000000000000000000000..1b84bd8333d0036d9fffec5f91638b439fafb245 --- /dev/null +++ b/doc/files/ContextInformation/Subscription/046_22_02.json @@ -0,0 +1,39 @@ +{ + "tp_id": "TP/NGSI-LD/CI/SUB/046_22_02", + "test_objective": "Check that a notification is sent with keyValues when an attribute is deleted\nand attributeDeleted notification trigger is configured for this specific attribute", + "reference": "ETSI GS CIM 009 V1.6.1 [], clause 5.8.6", + "config_id": "", + "parent_release": "v1.6.1", + "clauses": [ + "5.8.6" + ], + "pics_selection": "", + "keywords": [ + "Create Initial Subscription And Entity", + "Delete Initial Subscription And Entity" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Subscription ${subscription} \n with an id set to ${subscription_id}\n and an initial Entity ${entity}\n with an id set to ${entity_id}\n}", + "test_cases": [ + { + "name": "046_22_02 Check that a notification is sent with matching entity", + "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_22_02", + "doc": "Delete an attribute and check the received notification", + "tags": [ + "5_8_6", + "since_v1.6.1", + "sub-notification" + ], + "setup": "Create Initial Subscription And Entity", + "teardown": "Delete Initial Subscription And Entity", + "template": null, + "then": "then {\n the SUT sends a valid Response for the operations:\n Delete Entity Attributes with Response Status Code set to 204 and\n Notification with Notification containing entity element set to 'entity-deleted-name-attribute-keyValues.json'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}?${params_as_string}'\n method set to 'DELETE'\n Delete Entity Attributes: and\n Query Parameter: entityId set to '${entity_id}' and\n Query Parameter: attributeId set to 'name' and\n Query Parameter: datasetId set to '${EMPTY}' and\n Query Parameter: deleteAll set to '${EMPTY}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", + "http_verb": "DELETE", + "endpoint": "entities/{entityId}/attrs/{attributeId}?${params_as_string}" + } + ], + "permutations": [], + "robotpath": "ContextInformation/Subscription/SubscriptionNotificationBehaviour", + "robotfile": "046_22_02" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Subscription/046_22_03.json b/doc/files/ContextInformation/Subscription/046_22_03.json new file mode 100644 index 0000000000000000000000000000000000000000..cfb5747b95e0e57d1238d47fdb5c741748faa3f1 --- /dev/null +++ b/doc/files/ContextInformation/Subscription/046_22_03.json @@ -0,0 +1,39 @@ +{ + "tp_id": "TP/NGSI-LD/CI/SUB/046_22_03", + "test_objective": "Check that a notification is not sent when an attribute is deleted\nand attributeDeleted notification trigger is not configured for this specific attribute", + "reference": "ETSI GS CIM 009 V1.6.1 [], clause 5.8.6", + "config_id": "", + "parent_release": "v1.6.1", + "clauses": [ + "5.8.6" + ], + "pics_selection": "", + "keywords": [ + "Create Initial Subscription And Entity", + "Delete Initial Subscription And Entity" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Subscription ${subscription} \n with an id set to ${subscription_id}\n and an initial Entity ${entity}\n with an id set to ${entity_id}\n}", + "test_cases": [ + { + "name": "046_22_03 Check that a notification is not sent with updated entity", + "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_22_03", + "doc": "Delete a not watched attribute and check no notification is received", + "tags": [ + "5_8_6", + "since_v1.6.1", + "sub-notification" + ], + "setup": "Create Initial Subscription And Entity", + "teardown": "Delete Initial Subscription And Entity", + "template": null, + "then": "then {\n the SUT sends a valid Response for the operation:\n Delete Entity Attributes with Response Status Code set to 204\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}?${params_as_string}'\n method set to 'DELETE'\n Delete Entity Attributes: and\n Query Parameter: entityId set to '${entity_id}' and\n Query Parameter: attributeId set to 'airQualityLevel' and\n Query Parameter: datasetId set to '${EMPTY}' and\n Query Parameter: deleteAll set to '${EMPTY}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", + "http_verb": "DELETE", + "endpoint": "entities/{entityId}/attrs/{attributeId}?${params_as_string}" + } + ], + "permutations": [], + "robotpath": "ContextInformation/Subscription/SubscriptionNotificationBehaviour", + "robotfile": "046_22_03" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Subscription/046_22_04.json b/doc/files/ContextInformation/Subscription/046_22_04.json new file mode 100644 index 0000000000000000000000000000000000000000..116d77302711d2561c021b4826c56932b8787155 --- /dev/null +++ b/doc/files/ContextInformation/Subscription/046_22_04.json @@ -0,0 +1,39 @@ +{ + "tp_id": "TP/NGSI-LD/CI/SUB/046_22_04", + "test_objective": "Check that a notification is sent in normalized format when an attribute is deleted\nand attributeDeleted notification trigger is configured for this specific attribute", + "reference": "ETSI GS CIM 009 V1.6.1 [], clause 5.8.6", + "config_id": "", + "parent_release": "v1.6.1", + "clauses": [ + "5.8.6" + ], + "pics_selection": "", + "keywords": [ + "Create Initial Subscription And Entity", + "Delete Initial Subscription And Entity" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Subscription ${subscription} \n with an id set to ${subscription_id}\n and an initial Entity ${entity}\n with an id set to ${entity_id}\n}", + "test_cases": [ + { + "name": "046_22_04 Check that a notification is sent with matching entity", + "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_22_04", + "doc": "Delete an attribute and check the received notification", + "tags": [ + "5_8_6", + "since_v1.6.1", + "sub-notification" + ], + "setup": "Create Initial Subscription And Entity", + "teardown": "Delete Initial Subscription And Entity", + "template": null, + "then": "then {\n the SUT sends a valid Response for the operations:\n Delete Entity Attributes with Response Status Code set to 204 and\n Notification with Notification containing entity element set to 'entity-deleted-name-attribute-normalized.json'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}?${params_as_string}'\n method set to 'DELETE'\n Delete Entity Attributes: and\n Query Parameter: entityId set to '${entity_id}' and\n Query Parameter: attributeId set to 'name' and\n Query Parameter: datasetId set to '${EMPTY}' and\n Query Parameter: deleteAll set to '${EMPTY}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", + "http_verb": "DELETE", + "endpoint": "entities/{entityId}/attrs/{attributeId}?${params_as_string}" + } + ], + "permutations": [], + "robotpath": "ContextInformation/Subscription/SubscriptionNotificationBehaviour", + "robotfile": "046_22_04" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Subscription/046_22_05.json b/doc/files/ContextInformation/Subscription/046_22_05.json new file mode 100644 index 0000000000000000000000000000000000000000..f1dc5d432ae82b4023c5c84b00b3927fbacbcebb --- /dev/null +++ b/doc/files/ContextInformation/Subscription/046_22_05.json @@ -0,0 +1,39 @@ +{ + "tp_id": "TP/NGSI-LD/CI/SUB/046_22_05", + "test_objective": "Check that a notification is sent in normalized format with sysAttrs when an attribute is deleted\nand attributeDeleted notification trigger is configured for this specific attribute", + "reference": "ETSI GS CIM 009 V1.6.1 [], clause 5.8.6", + "config_id": "", + "parent_release": "v1.6.1", + "clauses": [ + "5.8.6" + ], + "pics_selection": "", + "keywords": [ + "Create Initial Subscription And Entity", + "Delete Initial Subscription And Entity" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Subscription ${subscription} \n with an id set to ${subscription_id}\n and an initial Entity ${entity}\n with an id set to ${entity_id}\n}", + "test_cases": [ + { + "name": "046_22_05 Check that a notification is sent with matching entity", + "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_22_05", + "doc": "Delete an attribute and check the received notification", + "tags": [ + "5_8_6", + "since_v1.6.1", + "sub-notification" + ], + "setup": "Create Initial Subscription And Entity", + "teardown": "Delete Initial Subscription And Entity", + "template": null, + "then": "then {\n the SUT sends a valid Response for the operation:\n Delete Entity Attributes with Response Status Code set to 204\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}?${params_as_string}'\n method set to 'DELETE'\n Delete Entity Attributes: and\n Query Parameter: entityId set to '${entity_id}' and\n Query Parameter: attributeId set to 'name' and\n Query Parameter: datasetId set to '${EMPTY}' and\n Query Parameter: deleteAll set to '${EMPTY}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", + "http_verb": "DELETE", + "endpoint": "entities/{entityId}/attrs/{attributeId}?${params_as_string}" + } + ], + "permutations": [], + "robotpath": "ContextInformation/Subscription/SubscriptionNotificationBehaviour", + "robotfile": "046_22_05" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Subscription/046_22_06.json b/doc/files/ContextInformation/Subscription/046_22_06.json new file mode 100644 index 0000000000000000000000000000000000000000..4ce967b705ac2ce6fdccfdc5afa9fae794342914 --- /dev/null +++ b/doc/files/ContextInformation/Subscription/046_22_06.json @@ -0,0 +1,41 @@ +{ + "tp_id": "TP/NGSI-LD/CI/SUB/046_22_06", + "test_objective": "Check that a notification is sent in normalized format when an attribute with a specific datasetId is deleted\nand attributeDeleted notification trigger is configured for this specific attribute", + "reference": "ETSI GS CIM 009 V1.6.1 [], clauses 4.5.5, 5.8.6", + "config_id": "", + "parent_release": "v1.6.1", + "clauses": [ + "4.5.5", + "5.8.6" + ], + "pics_selection": "", + "keywords": [ + "Create Initial Subscription And Entity", + "Delete Initial Subscription And Entity" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Subscription ${subscription} \n with an id set to ${subscription_id}\n and an initial Entity ${entity}\n with an id set to ${entity_id}\n}", + "test_cases": [ + { + "name": "046_22_06 Check that a notification is sent with matching entity", + "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_22_06", + "doc": "Delete an attribute with a specific datasetId and check the received notification", + "tags": [ + "4_5_5", + "5_8_6", + "since_v1.6.1", + "sub-notification" + ], + "setup": "Create Initial Subscription And Entity", + "teardown": "Delete Initial Subscription And Entity", + "template": null, + "then": "then {\n the SUT sends a valid Response for the operations:\n Delete Entity Attributes with Response Status Code set to 204 and\n Notification with Notification containing entity element set to 'entity-deleted-name-attribute-instance-normalized.json'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}?${params_as_string}'\n method set to 'DELETE'\n Delete Entity Attributes: and\n Query Parameter: entityId set to '${entity_id}' and\n Query Parameter: attributeId set to 'name' and\n Query Parameter: datasetId set to 'urn:ngsi-ld:Dataset:french-name' and\n Query Parameter: deleteAll set to '${EMPTY}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", + "http_verb": "DELETE", + "endpoint": "entities/{entityId}/attrs/{attributeId}?${params_as_string}" + } + ], + "permutations": [], + "robotpath": "ContextInformation/Subscription/SubscriptionNotificationBehaviour", + "robotfile": "046_22_06" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Subscription/046_22_07.json b/doc/files/ContextInformation/Subscription/046_22_07.json new file mode 100644 index 0000000000000000000000000000000000000000..a3c7ef8037d9fd1591dd363ec11675fd47d0fd46 --- /dev/null +++ b/doc/files/ContextInformation/Subscription/046_22_07.json @@ -0,0 +1,41 @@ +{ + "tp_id": "TP/NGSI-LD/CI/SUB/046_22_07", + "test_objective": "Check that a notification is sent with keyValues when an attribute with a specific datasetId is deleted\nand attributeDeleted notification trigger is configured for this specific attribute", + "reference": "ETSI GS CIM 009 V1.6.1 [], clauses 4.5.5, 5.8.6", + "config_id": "", + "parent_release": "v1.6.1", + "clauses": [ + "4.5.5", + "5.8.6" + ], + "pics_selection": "", + "keywords": [ + "Create Initial Subscription And Entity", + "Delete Initial Subscription And Entity" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Subscription ${subscription} \n with an id set to ${subscription_id}\n and an initial Entity ${entity}\n with an id set to ${entity_id}\n}", + "test_cases": [ + { + "name": "046_22_07 Check that a notification is sent with matching entity", + "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_22_07", + "doc": "Delete an attribute with a specific datasetId and check the received notification", + "tags": [ + "4_5_5", + "5_8_6", + "since_v1.6.1", + "sub-notification" + ], + "setup": "Create Initial Subscription And Entity", + "teardown": "Delete Initial Subscription And Entity", + "template": null, + "then": "then {\n the SUT sends a valid Response for the operations:\n Delete Entity Attributes with Response Status Code set to 204 and\n Notification with Notification containing entity element set to 'entity-deleted-name-attribute-instance-keyValues.json'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}?${params_as_string}'\n method set to 'DELETE'\n Delete Entity Attributes: and\n Query Parameter: entityId set to '${entity_id}' and\n Query Parameter: attributeId set to 'name' and\n Query Parameter: datasetId set to 'urn:ngsi-ld:Dataset:french-name' and\n Query Parameter: deleteAll set to '${EMPTY}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", + "http_verb": "DELETE", + "endpoint": "entities/{entityId}/attrs/{attributeId}?${params_as_string}" + } + ], + "permutations": [], + "robotpath": "ContextInformation/Subscription/SubscriptionNotificationBehaviour", + "robotfile": "046_22_07" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Subscription/046_22_08.json b/doc/files/ContextInformation/Subscription/046_22_08.json new file mode 100644 index 0000000000000000000000000000000000000000..20a17bad06fed86b307ec48e678bbff75aaf0efb --- /dev/null +++ b/doc/files/ContextInformation/Subscription/046_22_08.json @@ -0,0 +1,41 @@ +{ + "tp_id": "TP/NGSI-LD/CI/SUB/046_22_08", + "test_objective": "Check that a notification is sent when all instances of an attribute are deleted\nand attributeDeleted notification trigger is configured for this specific attribute", + "reference": "ETSI GS CIM 009 V1.6.1 [], clauses 4.5.5, 5.8.6", + "config_id": "", + "parent_release": "v1.6.1", + "clauses": [ + "4.5.5", + "5.8.6" + ], + "pics_selection": "", + "keywords": [ + "Create Initial Subscription And Entity", + "Delete Initial Subscription And Entity" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Subscription ${subscription} \n with an id set to ${subscription_id}\n and an initial Entity ${entity}\n with an id set to ${entity_id}\n}", + "test_cases": [ + { + "name": "046_22_08 Check that a notification is sent with matching entity", + "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_22_08", + "doc": "Delete all instances of an attribute and check the received notification", + "tags": [ + "4_5_5", + "5_8_6", + "since_v1.6.1", + "sub-notification" + ], + "setup": "Create Initial Subscription And Entity", + "teardown": "Delete Initial Subscription And Entity", + "template": null, + "then": "then {\n the SUT sends a valid Response for the operations:\n Delete Entity Attributes with Response Status Code set to 204 and\n Notification with Response Body containing the key 'json_path_expr=['name']['value']', with the value 'value_to_check=urn:ngsi-ld:null'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}?${params_as_string}'\n method set to 'DELETE'\n Delete Entity Attributes: and\n Query Parameter: entityId set to '${entity_id}' and\n Query Parameter: attributeId set to 'name' and\n Query Parameter: datasetId set to '${EMPTY}' and\n Query Parameter: deleteAll set to '${true}' and\n Query Parameter: context set to 'https://forge.etsi.org/rep/cim/ngsi-ld-test-suite/-/raw/develop/resources/jsonld-contexts/ngsi-ld-test-suite-compound.jsonld'\n}", + "http_verb": "DELETE", + "endpoint": "entities/{entityId}/attrs/{attributeId}?${params_as_string}" + } + ], + "permutations": [], + "robotpath": "ContextInformation/Subscription/SubscriptionNotificationBehaviour", + "robotfile": "046_22_08" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Subscription/046_22_09.json b/doc/files/ContextInformation/Subscription/046_22_09.json new file mode 100644 index 0000000000000000000000000000000000000000..567efd0e16f7b29e0eb3bc3b6dd8da61913ce971 --- /dev/null +++ b/doc/files/ContextInformation/Subscription/046_22_09.json @@ -0,0 +1,77 @@ +{ + "tp_id": "TP/NGSI-LD/CI/SUB/046_22_09", + "test_objective": "Check that a notification is sent in normalized format when an attribute is deleted via NGSI-LD Null\nin a Merge Entity operation and attributeDeleted notification trigger is configured for this specific attribute", + "reference": "ETSI GS CIM 009 V1.6.1 [], clause 5.8.6", + "config_id": "", + "parent_release": "v1.6.1", + "clauses": [ + "5.8.6" + ], + "pics_selection": "", + "keywords": [ + "Create Initial Subscription And Entity", + "Delete Initial Subscription And Entity" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Subscription ${subscription} \n with an id set to ${subscription_id}\n and an initial Entity ${entity}\n with an id set to ${entity_id}\n}", + "test_cases": [ + { + "name": "046_22_09_01 Check that a notification is sent with matching entity when deleting via Merge Entity operation", + "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_22_09_01", + "doc": "Delete an attribute via Merge Entity operation and check the received notification", + "tags": [ + "5_8_6", + "since_v1.6.1", + "sub-notification" + ], + "setup": "Create Initial Subscription And Entity", + "teardown": "Delete Initial Subscription And Entity", + "template": null, + "then": "then {\n the SUT sends a valid Response for the operations:\n Merge Entity with Response Status Code set to 204 and\n Notification with Notification containing entity element set to 'entity-different-attributes-types-deleted-name-attribute-normalized.json'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entity_id}'\n method set to 'PATCH'\n Merge Entity and\n Query Parameter: entity_id set to '${entity_id}' and\n Query Parameter: entity_filename set to 'fragmentEntities/ngsild-null/building-null-property.jsonld' and\n Query Parameter: content_type set to 'application/ld+json' and\n Query Parameter: context set to ''\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entity_id}" + }, + { + "name": "046_22_09_02 Check that a notification is sent with matching entity when deleting via Update Attributes operation", + "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_22_09_02", + "doc": "Delete an attribute via Update Attributes operation and check the received notification", + "tags": [ + "5_8_6", + "since_v1.6.1", + "sub-notification" + ], + "setup": "Create Initial Subscription And Entity", + "teardown": "Delete Initial Subscription And Entity", + "template": null, + "then": "then {\n the SUT sends a valid Response for the operations:\n Update Entity Attributes with Response Status Code set to 204 and\n Notification with Notification containing entity element set to 'entity-different-attributes-types-deleted-name-attribute-normalized.json'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Update Entity Attributes and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: fragment_filename set to 'ngsild-null/null-property.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + }, + { + "name": "046_22_09_03 Check that a notification is sent with matching entity when deleting via Partial Attribute Update operation", + "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_22_09_03", + "doc": "Delete an attribute via Update Partial Attribute Update operation and check the received notification", + "tags": [ + "5_8_6", + "since_v1.6.1", + "sub-notification" + ], + "setup": "Create Initial Subscription And Entity", + "teardown": "Delete Initial Subscription And Entity", + "template": null, + "then": "then {\n the SUT sends a valid Response for the operations:\n Partial Update Entity Attributes with Response Status Code set to 204 and\n Notification with Notification containing entity element set to 'entity-different-attributes-types-deleted-name-attribute-normalized.json'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Request Partial Update Entity Attributes and\n Query Parameter: entityId set to '${entity_id}' and\n Query Parameter: AttributeId set to 'name' and\n Query Parameter: fragment_filename set to 'ngsild-null/null-property-fragment.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + } + ], + "permutations": [ + "endpoint", + "then", + "when" + ], + "robotpath": "ContextInformation/Subscription/SubscriptionNotificationBehaviour", + "robotfile": "046_22_09" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Subscription/046_22_10.json b/doc/files/ContextInformation/Subscription/046_22_10.json new file mode 100644 index 0000000000000000000000000000000000000000..b1528a118b821442fb15e09e86c4dfe903396deb --- /dev/null +++ b/doc/files/ContextInformation/Subscription/046_22_10.json @@ -0,0 +1,77 @@ +{ + "tp_id": "TP/NGSI-LD/CI/SUB/046_22_10", + "test_objective": "Check that a notification is sent in normalized format when a relationship is deleted via NGSI-LD Null\nin a Merge Entity operation and attributeDeleted notification trigger is configured for this specific relationship", + "reference": "ETSI GS CIM 009 V1.6.1 [], clause 5.8.6", + "config_id": "", + "parent_release": "v1.6.1", + "clauses": [ + "5.8.6" + ], + "pics_selection": "", + "keywords": [ + "Create Initial Subscription And Entity", + "Delete Initial Subscription And Entity" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Subscription ${subscription} \n with an id set to ${subscription_id}\n and an initial Entity ${entity}\n with an id set to ${entity_id}\n}", + "test_cases": [ + { + "name": "046_22_10_01 Check that a notification is sent with matching entity when deleting via Merge Entity operation", + "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_22_10_01", + "doc": "Delete a relationship via Merge Entity operation and check the received notification", + "tags": [ + "5_8_6", + "since_v1.6.1", + "sub-notification" + ], + "setup": "Create Initial Subscription And Entity", + "teardown": "Delete Initial Subscription And Entity", + "template": null, + "then": "then {\n the SUT sends a valid Response for the operations:\n Merge Entity with Response Status Code set to 204 and\n Notification with Notification containing entity element set to 'entity-different-attributes-types-deleted-locatedAt-attribute-normalized.json'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entity_id}'\n method set to 'PATCH'\n Merge Entity and\n Query Parameter: entity_id set to '${entity_id}' and\n Query Parameter: entity_filename set to 'fragmentEntities/ngsild-null/building-null-relationship.jsonld' and\n Query Parameter: content_type set to 'application/ld+json' and\n Query Parameter: context set to ''\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entity_id}" + }, + { + "name": "046_22_10_02 Check that a notification is sent with matching entity when deleting via Update Attributes operation", + "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_22_10_02", + "doc": "Delete a relationship via Update Attributes operation and check the received notification", + "tags": [ + "5_8_6", + "since_v1.6.1", + "sub-notification" + ], + "setup": "Create Initial Subscription And Entity", + "teardown": "Delete Initial Subscription And Entity", + "template": null, + "then": "then {\n the SUT sends a valid Response for the operations:\n Update Entity Attributes with Response Status Code set to 204 and\n Notification with Notification containing entity element set to 'entity-different-attributes-types-deleted-locatedAt-attribute-normalized.json'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Update Entity Attributes and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: fragment_filename set to 'ngsild-null/null-relationship.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + }, + { + "name": "046_22_10_03 Check that a notification is sent with matching entity when deleting via Partial Attribute Update operation", + "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_22_10_03", + "doc": "Delete a relationship via Update Partial Attribute Update operation and check the received notification", + "tags": [ + "5_8_6", + "since_v1.6.1", + "sub-notification" + ], + "setup": "Create Initial Subscription And Entity", + "teardown": "Delete Initial Subscription And Entity", + "template": null, + "then": "then {\n the SUT sends a valid Response for the operations:\n Partial Update Entity Attributes with Response Status Code set to 204 and\n Notification with Notification containing entity element set to 'entity-different-attributes-types-deleted-locatedAt-attribute-normalized.json'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Request Partial Update Entity Attributes and\n Query Parameter: entityId set to '${entity_id}' and\n Query Parameter: AttributeId set to 'locatedAt' and\n Query Parameter: fragment_filename set to 'ngsild-null/null-relationship-fragment.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + } + ], + "permutations": [ + "endpoint", + "then", + "when" + ], + "robotpath": "ContextInformation/Subscription/SubscriptionNotificationBehaviour", + "robotfile": "046_22_10" +} \ No newline at end of file diff --git a/doc/files/ContextInformation/Subscription/046_22_11.json b/doc/files/ContextInformation/Subscription/046_22_11.json new file mode 100644 index 0000000000000000000000000000000000000000..1c51f23dcde08a5bcfdde4f0e1e7aa40cb984d32 --- /dev/null +++ b/doc/files/ContextInformation/Subscription/046_22_11.json @@ -0,0 +1,81 @@ +{ + "tp_id": "TP/NGSI-LD/CI/SUB/046_22_11", + "test_objective": "Check that a notification is sent in normalized format when a language property is deleted via NGSI-LD Null\nin a Merge Entity operation and attributeDeleted notification trigger is configured for this specific property", + "reference": "ETSI GS CIM 009 V1.6.1 [], clauses 4.5.18, 5.8.6", + "config_id": "", + "parent_release": "v1.6.1", + "clauses": [ + "4.5.18", + "5.8.6" + ], + "pics_selection": "", + "keywords": [ + "Create Initial Subscription And Entity", + "Delete Initial Subscription And Entity" + ], + "teardown": "None", + "initial_condition": "with {\n the SUT being in the \"initial state\" and\n the SUT containing an initial Subscription ${subscription} \n with an id set to ${subscription_id}\n and an initial Entity ${entity}\n with an id set to ${entity_id}\n}", + "test_cases": [ + { + "name": "046_22_11_01 Check that a notification is sent with matching entity when deleting via Merge Entity operation", + "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_22_11_01", + "doc": "Delete a language property via Merge Entity operation and check the received notification", + "tags": [ + "4_5_18", + "5_8_6", + "since_v1.6.1", + "sub-notification" + ], + "setup": "Create Initial Subscription And Entity", + "teardown": "Delete Initial Subscription And Entity", + "template": null, + "then": "then {\n the SUT sends a valid Response for the operations:\n Merge Entity with Response Status Code set to 204 and\n Notification with Notification containing entity element set to 'entity-different-attributes-types-deleted-street-attribute-normalized.json'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entity_id}'\n method set to 'PATCH'\n Merge Entity and\n Query Parameter: entity_id set to '${entity_id}' and\n Query Parameter: entity_filename set to 'fragmentEntities/ngsild-null/building-null-languageproperty.jsonld' and\n Query Parameter: content_type set to 'application/ld+json' and\n Query Parameter: context set to ''\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entity_id}" + }, + { + "name": "046_22_11_02 Check that a notification is sent with matching entity when deleting via Update Attributes operation", + "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_22_11_02", + "doc": "Delete a language property via Update Attributes operation and check the received notification", + "tags": [ + "4_5_18", + "5_8_6", + "since_v1.6.1", + "sub-notification" + ], + "setup": "Create Initial Subscription And Entity", + "teardown": "Delete Initial Subscription And Entity", + "template": null, + "then": "then {\n the SUT sends a valid Response for the operations:\n Update Entity Attributes with Response Status Code set to 204 and\n Notification with Notification containing entity element set to 'entity-different-attributes-types-deleted-street-attribute-normalized.json'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Update Entity Attributes and\n Query Parameter: id set to '${entity_id}' and\n Query Parameter: fragment_filename set to 'ngsild-null/null-languageproperty.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + }, + { + "name": "046_22_11_03 Check that a notification is sent with matching entity when deleting via Partial Attribute Update operation", + "permutation_tp_id": "TP/NGSI-LD/CI/SUB/046_22_11_03", + "doc": "Delete a language property via Update Partial Attribute Update operation and check the received notification", + "tags": [ + "4_5_18", + "5_8_6", + "since_v1.6.1", + "sub-notification" + ], + "setup": "Create Initial Subscription And Entity", + "teardown": "Delete Initial Subscription And Entity", + "template": null, + "then": "then {\n the SUT sends a valid Response for the operations:\n Partial Update Entity Attributes with Response Status Code set to 204 and\n Notification with Notification containing entity element set to 'entity-different-attributes-types-deleted-street-attribute-normalized.json'\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/{entityId}/attrs/{attributeId}'\n method set to 'PATCH'\n Request Partial Update Entity Attributes and\n Query Parameter: entityId set to '${entity_id}' and\n Query Parameter: AttributeId set to 'street' and\n Query Parameter: fragment_filename set to 'ngsild-null/null-languageproperty-fragment.jsonld' and\n Query Parameter: content_type set to 'application/ld+json'\n}", + "http_verb": "PATCH", + "endpoint": "entities/{entityId}/attrs/{attributeId}" + } + ], + "permutations": [ + "endpoint", + "then", + "when" + ], + "robotpath": "ContextInformation/Subscription/SubscriptionNotificationBehaviour", + "robotfile": "046_22_11" +} \ No newline at end of file diff --git a/doc/tests/test_ContextInformation_Provision.py b/doc/tests/test_ContextInformation_Provision.py index c50e9bcb21ba62845ec3a6d517c1e6319d431921..1c4fb73645c74df3089f155a429fa373e8d26d42 100644 --- a/doc/tests/test_ContextInformation_Provision.py +++ b/doc/tests/test_ContextInformation_Provision.py @@ -343,6 +343,34 @@ class TestCIProvision(TestCase): self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + def test_060_01(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/060_01.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Provision/060_01.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_060_01.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_060_02(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/060_02.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Provision/060_02.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_060_02.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_060_03(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/060_03.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Provision/060_03.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_060_03.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_060_04(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Provision/Entities/DeleteEntity/060_04.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Provision/060_04.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_060_04.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + def test_010_01(self): robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/AppendEntityAttributes/010_01.robot' expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Provision/010_01.json' @@ -476,6 +504,27 @@ class TestCIProvision(TestCase): self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + def test_012_05(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_05.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Provision/012_05.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_012_05.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_012_06(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_06.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Provision/012_06.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_012_06.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_012_07(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/PartialAttributeUpdate/012_07.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Provision/012_07.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_012_07.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + def test_011_01(self): robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_01.robot' expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Provision/011_01.json' @@ -518,6 +567,27 @@ class TestCIProvision(TestCase): self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + def test_011_07(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_07.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Provision/011_07.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_011_07.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_011_08(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_08.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Provision/011_08.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_011_08.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_011_09(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Provision/EntityAttributes/UpdateEntityAttributes/011_09.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Provision/011_09.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_011_09.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + def test_007_01(self): robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Provision/TemporalEntity/CreateTemporalRepresentationOfEntity/007_01.robot' expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Provision/007_01.json' diff --git a/doc/tests/test_ContextInformation_Subscription.py b/doc/tests/test_ContextInformation_Subscription.py index fdd551bbf73b7e7afa1810c60d2e170629966c2d..b2496348c33beb631d54fa8bc17a2e11e4abff60 100644 --- a/doc/tests/test_ContextInformation_Subscription.py +++ b/doc/tests/test_ContextInformation_Subscription.py @@ -229,6 +229,97 @@ class TestCISubscription(TestCase): self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + def test_046_21_01(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_21_01.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Subscription/046_21_01.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_046_21_01.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_046_21_02(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_21_02.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Subscription/046_21_02.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_046_21_02.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_046_22_01(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_01.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Subscription/046_22_01.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_046_22_01.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_046_22_02(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_02.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Subscription/046_22_02.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_046_22_02.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_046_22_03(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_03.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Subscription/046_22_03.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_046_22_03.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_046_22_04(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_04.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Subscription/046_22_04.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_046_22_04.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_046_22_05(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_05.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Subscription/046_22_05.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_046_22_05.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_046_22_06(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_06.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Subscription/046_22_06.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_046_22_06.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_046_22_07(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_07.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Subscription/046_22_07.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_046_22_07.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_046_22_08(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_08.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Subscription/046_22_08.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_046_22_08.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_046_22_09(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_09.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Subscription/046_22_09.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_046_22_09.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_046_22_10(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_10.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Subscription/046_22_10.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_046_22_10.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + + def test_046_22_11(self): + robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Subscription/SubscriptionNotificationBehaviour/046_22_11.robot' + expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Subscription/046_22_11.json' + difference_file = f'{self.folder_test_suites}/doc/results/out_046_22_11.json' + + self.common_function(robot_file=robot_file, expected_value=expected_value, difference_file=difference_file) + def test_031_01(self): robot_file = f'{self.folder_test_suites}/TP/NGSI-LD/ContextInformation/Subscription/QuerySubscriptions/031_01.robot' expected_value = f'{self.folder_test_suites}/doc/files/ContextInformation/Subscription/031_01.json' diff --git a/resources/ApiUtils/ContextInformationProvision.resource b/resources/ApiUtils/ContextInformationProvision.resource index f46f97142b84d2c53250c257de651dfaa33d7ed2..cfc16434a16b45057c636022cc0af4c4f8b28030 100755 --- a/resources/ApiUtils/ContextInformationProvision.resource +++ b/resources/ApiUtils/ContextInformationProvision.resource @@ -23,6 +23,8 @@ ${BATCH_MERGE_ENDPOINT_PATH} entityOperations/merge ${ENTITIES_ENDPOINT_PATH} entities/ +${BUILDING_ID_PREFIX} urn:ngsi-ld:Building: + ${CONTENT_TYPE_JSON} application/json ${CONTENT_TYPE_LD_JSON} application/ld+json ${CONTENT_TYPE_MERGE_PATCH_JSON} application/merge-patch+json @@ -323,6 +325,28 @@ Replace Entity Selecting Content Type Output ${response} Replace Entity Selecting Content Type RETURN ${response} +Merge Entity + [Arguments] + ... ${entity_id} + ... ${entity_filename} + ... ${content_type} + ... ${context}=${EMPTY} + ${entity_payload}= Load JSON From File ${EXECDIR}/data/entities/${entity_filename} + ${entity}= Update Value To JSON ${entity_payload} $.id ${entity_id} + &{headers}= Create Dictionary Content-Type=${content_type} + IF '${context}'!='' + Set To Dictionary + ... ${headers} + ... Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + END + ${response}= PATCH + ... url=${url}/${ENTITIES_ENDPOINT_PATH}${entity_id} + ... headers=${headers} + ... json=${entity} + ... expected_status=any + Output ${response} Merge Entity + RETURN ${response} + Replace Attribute Selecting Content Type [Arguments] ... ${entity_id} diff --git a/resources/ApiUtils/ContextInformationSubscription.resource b/resources/ApiUtils/ContextInformationSubscription.resource index 268e90a8831d8166105e18abb2ce35de49c7fb78..d6b1752614d62ba9671f6901e1515bb9a938ca72 100755 --- a/resources/ApiUtils/ContextInformationSubscription.resource +++ b/resources/ApiUtils/ContextInformationSubscription.resource @@ -13,6 +13,8 @@ ${SUBSCRIPTION_ENDPOINT_PATH} subscriptions/ ${CONTENT_TYPE_JSON} application/json ${CONTENT_TYPE_LD_JSON} application/ld+json +${SUBSCRIPTION_ID_PREFIX} urn:ngsi-ld:Subscription: + ${ERROR_TYPE_BAD_REQUEST_DATA} https://uri.etsi.org/ngsi-ld/errors/BadRequestData ${ERROR_TYPE_INVALID_REQUEST} https://uri.etsi.org/ngsi-ld/errors/InvalidRequest ${ERROR_TYPE_RESOURCE_NOT_FOUND} https://uri.etsi.org/ngsi-ld/errors/ResourceNotFound diff --git a/resources/ApiUtils/TemporalContextInformationConsumption.resource b/resources/ApiUtils/TemporalContextInformationConsumption.resource index 71ca1cfe5b61031867b79050bdc2851c82d2fbeb..5b7328b720a4e2ecc492601b56b1ecaa057fc7fd 100755 --- a/resources/ApiUtils/TemporalContextInformationConsumption.resource +++ b/resources/ApiUtils/TemporalContextInformationConsumption.resource @@ -198,6 +198,7 @@ Retrieve Temporal Representation Of Entity ... ${accept}=${EMPTY} ... ${aggrMethods}=${EMPTY} ... ${aggrPeriodDuration}=${EMPTY} + ... ${timeproperty}=${EMPTY} ${attrs_length}= Get Length ${attrs} ${options_length}= Get Length ${options} &{headers}= Create Dictionary @@ -227,6 +228,9 @@ Retrieve Temporal Representation Of Entity IF '${aggrPeriodDuration}'!='' Set To Dictionary ${params} aggrPeriodDuration=${aggrPeriodDuration} END + IF '${timeproperty}'!='' + Set To Dictionary ${params} timeproperty=${timeproperty} + END ${response}= GET ... url=${temporal_api_url}/${TEMPORAL_ENTITIES_ENDPOINT_PATH}/${temporal_entity_representation_id} diff --git a/resources/AssertionUtils.resource b/resources/AssertionUtils.resource index b6754cdc76b5cbd2dfc210cd648d0d00d6c29f20..1cb78c3fc109789d8a3d0e5852f948693feac065 100755 --- a/resources/AssertionUtils.resource +++ b/resources/AssertionUtils.resource @@ -191,17 +191,25 @@ Check Response Body Containing List Containing Entity Elements With Different Ty Should Be Empty ${comparison_result} msg=${comparison_result.pretty()} Check Response Body Containing EntityTemporal element - [Arguments] ${filename} ${temporal_entity_representation_id} ${response_body} + [Arguments] + ... ${filename} + ... ${temporal_entity_representation_id} + ... ${response_body} + ... ${excluded_regex}=${EMPTY} ${temporal_entity_representation_payload}= Load JSON From File ... ${EXECDIR}/data/temporalEntities/expectations/${filename} + ${all_excluded_regex}= Create List ${instance_id_regex_expr} + IF $excluded_regex != '' + Append To List ${all_excluded_regex} ${excluded_regex} + END ${temporal_entity_representation}= Update Value To JSON ... ${temporal_entity_representation_payload} - ... $..id + ... $.id ... ${temporal_entity_representation_id} ${comparison_result}= Compare Dictionaries Ignoring Keys ... ${temporal_entity_representation} ... ${response_body} - ... ${instance_id_regex_expr} + ... ${all_excluded_regex} Should Be Empty ${comparison_result} msg=${comparison_result.pretty()} Check Response Body Containing List Containing EntityTemporal elements @@ -430,6 +438,17 @@ Check NotificationParams Should Not Be Empty ${response_body['notification']['${expected_additional_member}']} END +Check Notification Containing Entity Element + [Arguments] ${filename} ${notification} + ${expected_entity_in_notification}= Load JSON From File + ... ${EXECDIR}/data/subscriptions/expectations/${filename} + ${ignored_keys}= Create List id + ${comparison_result}= Compare Dictionaries Ignoring Keys + ... ${expected_entity_in_notification} + ... ${notification['data'][0]} + ... ${ignored_keys} + Should Be Empty ${comparison_result} msg=${comparison_result.pretty()} + Check Pagination Prev And Next Headers [Arguments] ${prev_link} ${next_link} ${response_headers} ${expected_links}= Create List ${prev_link} ${next_link} diff --git a/resources/SubscriptionUtils.resource b/resources/SubscriptionUtils.resource new file mode 100644 index 0000000000000000000000000000000000000000..60101652c78257c666165d9a9d007ac0ae7bc5b2 --- /dev/null +++ b/resources/SubscriptionUtils.resource @@ -0,0 +1,30 @@ +*** Settings *** +Documentation Common keywords used in setup steps for subscriptions + +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationSubscription.resource +Resource ${EXECDIR}/resources/ApiUtils/ContextInformationProvision.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + + +*** Keywords *** +Create Subscription And Entity + [Arguments] ${subscription_payload_file_path} ${building_filename} + + ${entity_id}= Generate Random Entity Id ${BUILDING_ID_PREFIX} + Set Suite Variable ${entity_id} + ${create_entity_response}= Create Entity Selecting Content Type + ... ${building_filename} + ... ${entity_id} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_entity_response.status_code} + + ${subscription_id}= Generate Random Entity Id ${SUBSCRIPTION_ID_PREFIX} + Set Suite Variable ${subscription_id} + ${subscription_payload}= Load Subscription Sample With Reachable Endpoint + ... ${subscription_payload_file_path} + ... ${subscription_id} + ${create_subscription_response}= Create Subscription From Subscription Payload + ... ${subscription_payload} + ... ${CONTENT_TYPE_LD_JSON} + Check Response Status Code 201 ${create_subscription_response.status_code}