From 750c884caf7ce334262d8e23cb455a5a97a65c6c Mon Sep 17 00:00:00 2001 From: Benoit Orihuela Date: Sat, 18 Jan 2025 13:24:30 +0100 Subject: [PATCH] feat(001_01): add permutation with a non core GeoProperty --- .../Entities/CreateEntity/001_01.robot | 3 +++ ...ding-non-core-geoproperty-attribute.jsonld | 14 ++++++++++ .../ContextInformation/Provision/001_01.json | 26 +++++++++++++++---- 3 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 data/entities/building-non-core-geoproperty-attribute.jsonld diff --git a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_01.robot b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_01.robot index 3f963fb62..9418ed7bf 100644 --- a/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_01.robot +++ b/TP/NGSI-LD/ContextInformation/Provision/Entities/CreateEntity/001_01.robot @@ -27,6 +27,9 @@ ${building_id_prefix}= urn:ngsi-ld:Building: 001_01_04 EntityWithLocationAttribute [Tags] e-create 5_6_1 building-location-attribute.jsonld application/ld+json +001_01_05 EntityWithNonCoreGeoProperty + [Tags] e-create 5_6_1 + building-non-core-geoproperty-attribute.jsonld application/ld+json *** Keywords *** diff --git a/data/entities/building-non-core-geoproperty-attribute.jsonld b/data/entities/building-non-core-geoproperty-attribute.jsonld new file mode 100644 index 000000000..08b789385 --- /dev/null +++ b/data/entities/building-non-core-geoproperty-attribute.jsonld @@ -0,0 +1,14 @@ +{ + "id": "urn:ngsi-ld:Building:randomUUID", + "type": "Building", + "customLocation": { + "type": "GeoProperty", + "value": { + "type": "Point", + "coordinates": [13.3986, 52.5547] + } + }, + "@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/files/ContextInformation/Provision/001_01.json b/doc/files/ContextInformation/Provision/001_01.json index 039fb13d7..d1bb7f7ce 100644 --- a/doc/files/ContextInformation/Provision/001_01.json +++ b/doc/files/ContextInformation/Provision/001_01.json @@ -1,6 +1,6 @@ { "tp_id": "TP/NGSI-LD/CI/Prov/E/001_01", - "test_objective": "Check that you can create an entity", + "test_objective": "Check that one can create an entity", "reference": "ETSI GS CIM 009 V1.3.1 [], clause 5.6.1", "config_id": "", "parent_release": "v1.3.1", @@ -18,7 +18,7 @@ { "name": "001_01_01 MinimalEntity", "permutation_tp_id": "TP/NGSI-LD/CI/Prov/E/001_01_01", - "doc": "Check that you can create an entity", + "doc": "Check that one can create an entity", "tags": [ "5_6_1", "e-create" @@ -34,7 +34,7 @@ { "name": "001_01_02 EntityWithSimpleProperties", "permutation_tp_id": "TP/NGSI-LD/CI/Prov/E/001_01_02", - "doc": "Check that you can create an entity", + "doc": "Check that one can create an entity", "tags": [ "5_6_1", "e-create" @@ -50,7 +50,7 @@ { "name": "001_01_03 EntityWithRelationshipsProperties", "permutation_tp_id": "TP/NGSI-LD/CI/Prov/E/001_01_03", - "doc": "Check that you can create an entity", + "doc": "Check that one can create an entity", "tags": [ "5_6_1", "e-create" @@ -66,7 +66,7 @@ { "name": "001_01_04 EntityWithLocationAttribute", "permutation_tp_id": "TP/NGSI-LD/CI/Prov/E/001_01_04", - "doc": "Check that you can create an entity", + "doc": "Check that one can create an entity", "tags": [ "5_6_1", "e-create" @@ -78,6 +78,22 @@ "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'POST'\n Request Header['Content-Type'] set to 'application/ld+json' and\n payload defined in file: 'building-location-attribute.jsonld'\n}", "http_verb": "POST", "endpoint": "entities/" + }, + { + "name": "001_01_05 EntityWithNonCoreGeoProperty", + "permutation_tp_id": "TP/NGSI-LD/CI/Prov/E/001_01_05", + "doc": "Check that one can create an entity", + "tags": [ + "5_6_1", + "e-create" + ], + "setup": null, + "teardown": "Delete Initial Entity", + "template": "Create Entity Scenarios", + "then": "then {\n the SUT sends a valid Response for the operations:\n Create Entity Selecting Content Type with Response Status Code set to 201 and\n Create Entity Selecting Content Type with Response Header: Location containing $${entity_id} and\n Retrieve Entity by Id with Check Created Resource Set To and\n Query Parameter: 'created_resource' set to 'created_entity' and\n Query Parameter: 'response_body' set to 'response1.json()' and\n Query Parameter: 'ignored_keys' set to '${None}' list of keys\n}", + "when": "when {\n the SUT receives a Request from the client containing:\n URL set to '/ngsi-ld/v1/entities/'\n method set to 'POST'\n Request Header['Content-Type'] set to 'application/ld+json' and\n payload defined in file: 'building-non-core-geoproperty-attribute.jsonld'\n}", + "http_verb": "POST", + "endpoint": "entities/" } ], "permutations": [ -- GitLab