Newer
Older
Documentation Check that you can query entitites based on a list of properties
Resource ${EXECDIR}/resources/ApiUtils.resource
Resource ${EXECDIR}/resources/AssertionUtils.resource
Resource ${EXECDIR}/resources/JsonUtils.resource
Suite Teardown Delete Entities
*** Variables ***
${building_id_prefix}= urn:ngsi-ld:Building:
${filename}= building-location-attribute-sample.jsonld
${expectation_filename}= building-geoproperty-query-expectation.jsonld
${entity_type}= https://ngsi-ld-test-suite/context#Building
${geometry_property}= location
*** Test Cases ***
Query several entities based on a list of properties
[Documentation] Check that you can query entitites based on a list of properties
[Tags] e-query 5_7_2
${first_entity_id}= Generate Random Entity Id ${building_id_prefix}
Set Suite Variable ${first_entity_id}
${response}= Create Entity Selecting Content Type
... ${filename}
... ${first_entity_id}
... ${CONTENT_TYPE_LD_JSON}
Check Response Status Code 201 ${response.status_code}
${second_entity_id}= Generate Random Entity Id ${building_id_prefix}
Set Suite Variable ${second_entity_id}
${response}= Create Entity Selecting Content Type
... ${filename}
... ${second_entity_id}
... ${CONTENT_TYPE_LD_JSON}
Check Response Status Code 201 ${response.status_code}
@{entities_ids_to_be_compared}= Create List ${first_entity_id} ${second_entity_id}
${entities_ids_to_be_retrieved}= Catenate SEPARATOR=, ${first_entity_id} ${second_entity_id}
${entity_types_to_be_retrieved}= Catenate SEPARATOR=, ${entity_type}
${response}= Query Entities
... entity_types=${entity_types_to_be_retrieved}
... geoproperty=${geometry_property}
... accept=${CONTENT_TYPE_LD_JSON}
Check Response Status Code 200 ${response.status_code}
Check Response Body Containing List Containing Entity elements
... ${expectation_filename}
... ${entities_ids_to_be_compared}
Delete Entity by Id Returning Response ${first_entity_id}
Delete Entity by Id Returning Response ${second_entity_id}