diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_01.robot new file mode 100644 index 0000000000000000000000000000000000000000..44b84152afa3eec8c8e952213358f1c366817e98 --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_01.robot @@ -0,0 +1,52 @@ +*** Settings *** +Documentation Check that you can query the temporal evolution of entities +Resource ${EXECDIR}/resources/ApiUtils.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Suite Setup Setup Initial Entities +Suite Teardown Delete Initial Entities +Test Template Query the temporal evolution of entities + +*** Variable *** +${vehicule_id_prefix}= urn:ngsi-ld:Vehicle: +${bus_id_prefix}= urn:ngsi-ld:Bus: +${first_vehicle_payload_file}= 2020-08-vehicule-temporal-representation-sample.jsonld +${second_vehicle_payload_file}= 2020-09-vehicule-temporal-representation-sample.jsonld +${bus_payload_file}= 2020-08-bus-temporal-representation-sample.jsonld + +*** Test Cases *** TIMEREL TIMEAT EXPECTATION_FILE +After after 2020-08-01T12:05:00Z vehicles-temporal-representation-021-01-01-expectation.jsonld +Before before 2020-09-01T13:05:00Z vehicles-temporal-representation-021-01-02-expectation.jsonld + + +*** Keywords *** +Query the temporal evolution of entities + [Arguments] ${timerel} ${timeAt} ${expectation_file} + [Documentation] Check that you can query the temporal evolution of entities + [Tags] mandatory + + @{entity_types_to_be_retrieved}= Create List Vehicle + + Query Temporal Representation Of Entities entity_types=${entity_types_to_be_retrieved} timerel=${timerel} timeAt=${timeAt} context=${ngsild_test_suite_context} + + @{temporal_entities_representation_ids}= Create List ${first_temporal_entity_representation_id} ${second_temporal_entity_representation_id} + Check Response Status Code Set To 200 + Check Response Body Containing List Containing EntityTemporal elements ${expectation_file} ${temporal_entities_representation_ids} + + +Setup Initial Entities + ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + ${third_temporal_entity_representation_id}= Generate Random Entity Id ${bus_id_prefix} + Create Temporal Representation Of Entity ${first_vehicle_payload_file} ${first_temporal_entity_representation_id} + Create Temporal Representation Of Entity ${second_vehicle_payload_file} ${second_temporal_entity_representation_id} + Create Temporal Representation Of Entity ${bus_payload_file} ${third_temporal_entity_representation_id} + Set Suite Variable ${first_temporal_entity_representation_id} + Set Suite Variable ${second_temporal_entity_representation_id} + Set Suite Variable ${third_temporal_entity_representation_id} + +Delete Initial Entities + Delete Temporal Representation Of Entity ${first_temporal_entity_representation_id} + Delete Temporal Representation Of Entity ${second_temporal_entity_representation_id} + Delete Temporal Representation Of Entity ${third_temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_02.robot new file mode 100644 index 0000000000000000000000000000000000000000..02eec53580039b7441195e52bb033beed117479a --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_02.robot @@ -0,0 +1,41 @@ +*** Settings *** +Documentation Check that you can query the temporal evolution of certain attributes of entities +Resource ${EXECDIR}/resources/ApiUtils.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Suite Setup Setup Initial Entities +Suite Teardown Delete Initial Entities + +*** Variable *** +${vehicule_id_prefix}= urn:ngsi-ld:Vehicle: +${first_vehicle_payload_file}= 2020-08-vehicule-temporal-representation-sample.jsonld +${second_vehicle_payload_file}= 2020-09-vehicule-temporal-representation-sample.jsonld +${expectation_file}= vehicles-temporal-representation-021-02-expectation.jsonld + +*** Test Case *** +Query the temporal evolution of certain attributes of entities + [Documentation] Check that you can query the temporal evolution of certain attributes of entities + [Tags] mandatory + + @{entity_types_to_be_retrieved}= Create List Vehicle + @{temporal_attributes_to_be_retrieved}= Create List speed + + Query Temporal Representation Of Entities entity_types=${entity_types_to_be_retrieved} timerel=after timeAt=2020-07-01T12:05:00Z attrs=${temporal_attributes_to_be_retrieved} context=${ngsild_test_suite_context} + + @{temporal_entities_representation_ids}= Create List ${first_temporal_entity_representation_id} ${second_temporal_entity_representation_id} + Check Response Status Code Set To 200 + Check Response Body Containing List Containing EntityTemporal elements ${expectation_file} ${temporal_entities_representation_ids} + +*** Keywords *** +Setup Initial Entities + ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + Create Temporal Representation Of Entity ${first_vehicle_payload_file} ${first_temporal_entity_representation_id} + Create Temporal Representation Of Entity ${second_vehicle_payload_file} ${second_temporal_entity_representation_id} + Set Suite Variable ${first_temporal_entity_representation_id} + Set Suite Variable ${second_temporal_entity_representation_id} + +Delete Initial Entities + Delete Temporal Representation Of Entity ${first_temporal_entity_representation_id} + Delete Temporal Representation Of Entity ${second_temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_03.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_03.robot new file mode 100644 index 0000000000000000000000000000000000000000..01253a3ddf7c899c25490f73c5d8ea973a344cd2 --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_03.robot @@ -0,0 +1,40 @@ +*** Settings *** +Documentation Check that you can query the temporal evolution of the last N instances of entities attributes +Resource ${EXECDIR}/resources/ApiUtils.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Suite Setup Setup Initial Entities +Suite Teardown Delete Initial Entities + +*** Variable *** +${vehicule_id_prefix}= urn:ngsi-ld:Vehicle: +${first_vehicle_payload_file}= 2020-08-vehicule-temporal-representation-multiple-instances-sample.jsonld +${second_vehicle_payload_file}= 2020-09-vehicule-temporal-representation-sample.jsonld +${expectation_file}= vehicles-temporal-representation-021-03-expectation.jsonld + +*** Test Case *** +Query the temporal evolution of the last N instances of entities attributes + [Documentation] Check that you can query the temporal evolution of the last N instances of entities attributes + [Tags] mandatory + + @{entity_types_to_be_retrieved}= Create List Vehicle + + Query Temporal Representation Of Entities entity_types=${entity_types_to_be_retrieved} timerel=after timeAt=2020-07-01T12:05:00Z lastN=${14} context=${ngsild_test_suite_context} + + @{temporal_entities_representation_ids}= Create List ${first_temporal_entity_representation_id} ${second_temporal_entity_representation_id} + Check Response Status Code Set To 200 + Check Response Body Containing List Containing EntityTemporal elements ${expectation_file} ${temporal_entities_representation_ids} + +*** Keywords *** +Setup Initial Entities + ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + Create Temporal Representation Of Entity ${first_vehicle_payload_file} ${first_temporal_entity_representation_id} + Create Temporal Representation Of Entity ${second_vehicle_payload_file} ${second_temporal_entity_representation_id} + Set Suite Variable ${first_temporal_entity_representation_id} + Set Suite Variable ${second_temporal_entity_representation_id} + +Delete Initial Entities + Delete Temporal Representation Of Entity ${first_temporal_entity_representation_id} + Delete Temporal Representation Of Entity ${second_temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_04.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_04.robot new file mode 100644 index 0000000000000000000000000000000000000000..53380e1f75cc1228cf4687db2b2b74ffb4c1b403 --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_04.robot @@ -0,0 +1,40 @@ +*** Settings *** +Documentation Check that you can query the temporal evolution of entities using a context +Resource ${EXECDIR}/resources/ApiUtils.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Suite Setup Setup Initial Entities +Suite Teardown Delete Initial Entities + +*** Variable *** +${vehicule_id_prefix}= urn:ngsi-ld:Vehicle: +${first_vehicle_payload_file}= 2020-08-vehicule-temporal-representation-sample.jsonld +${second_vehicle_payload_file}= 2020-09-vehicule-temporal-representation-sample.jsonld +${expectation_file}= vehicles-temporal-representation-021-04-expectation.jsonld + +*** Test Case *** +Query the temporal evolution of entities using a context + [Documentation] Check that you can query the temporal evolution of entities using a context + [Tags] mandatory + + @{entity_types_to_be_retrieved}= Create List Vehicle + + Query Temporal Representation Of Entities entity_types=${entity_types_to_be_retrieved} timerel=after timeAt=2020-07-01T12:05:00Z context=${ngsild_test_suite_context} + + @{temporal_entities_representation_ids}= Create List ${first_temporal_entity_representation_id} ${second_temporal_entity_representation_id} + Check Response Status Code Set To 200 + Check Response Body Containing List Containing EntityTemporal elements ${expectation_file} ${temporal_entities_representation_ids} + +*** Keywords *** +Setup Initial Entities + ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + Create Temporal Representation Of Entity ${first_vehicle_payload_file} ${first_temporal_entity_representation_id} + Create Temporal Representation Of Entity ${second_vehicle_payload_file} ${second_temporal_entity_representation_id} + Set Suite Variable ${first_temporal_entity_representation_id} + Set Suite Variable ${second_temporal_entity_representation_id} + +Delete Initial Entities + Delete Temporal Representation Of Entity ${first_temporal_entity_representation_id} + Delete Temporal Representation Of Entity ${second_temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_05.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_05.robot new file mode 100644 index 0000000000000000000000000000000000000000..1955e003caa8ce6ebd1fff803ee6e8c15b771cad --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_05.robot @@ -0,0 +1,41 @@ +*** Settings *** +Documentation Check that you can query the temporal evolution of entities matching the given type(s) +Resource ${EXECDIR}/resources/ApiUtils.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Suite Setup Setup Initial Entities +Suite Teardown Delete Initial Entities + +*** Variable *** +${vehicule_id_prefix}= urn:ngsi-ld:Vehicle: +${bus_id_prefix}= urn:ngsi-ld:Bus: +${vehicle_payload_file}= 2020-08-vehicule-temporal-representation-sample.jsonld +${bus_payload_file}= 2020-08-bus-temporal-representation-sample.jsonld +${expectation_file}= vehicles-temporal-representation-021-05-expectation.jsonld + +*** Test Case *** +Query the temporal evolution of entities matching the given type(s) + [Documentation] Check that you can query the temporal evolution of entities matching the given type(s) + [Tags] mandatory + + @{entity_types_to_be_retrieved}= Create List Vehicle Bus + + Query Temporal Representation Of Entities entity_types=${entity_types_to_be_retrieved} timerel=after timeAt=2020-07-01T12:05:00Z context=${ngsild_test_suite_context} + + @{temporal_entities_representation_ids}= Create List ${first_temporal_entity_representation_id} ${second_temporal_entity_representation_id} + Check Response Status Code Set To 200 + Check Response Body Containing List Containing EntityTemporal elements ${expectation_file} ${temporal_entities_representation_ids} + +*** Keywords *** +Setup Initial Entities + ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + ${second_temporal_entity_representation_id}= Generate Random Entity Id ${bus_id_prefix} + Create Temporal Representation Of Entity ${vehicle_payload_file} ${first_temporal_entity_representation_id} + Create Temporal Representation Of Entity ${bus_payload_file} ${second_temporal_entity_representation_id} + Set Suite Variable ${first_temporal_entity_representation_id} + Set Suite Variable ${second_temporal_entity_representation_id} + +Delete Initial Entities + Delete Temporal Representation Of Entity ${first_temporal_entity_representation_id} + Delete Temporal Representation Of Entity ${second_temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_06.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_06.robot new file mode 100644 index 0000000000000000000000000000000000000000..953470c1705ec7ea792493ee1ad3bc80a57017b8 --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_06.robot @@ -0,0 +1,41 @@ +*** Settings *** +Documentation Check that you can query the temporal evolution of entities matching the given identifier(s) +Resource ${EXECDIR}/resources/ApiUtils.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Suite Setup Setup Initial Entities +Suite Teardown Delete Initial Entities + +*** Variable *** +${vehicule_id_prefix}= urn:ngsi-ld:Vehicle: +${first_vehicle_payload_file}= 2020-08-vehicule-temporal-representation-sample.jsonld +${second_vehicle_payload_file}= 2020-09-vehicule-temporal-representation-sample.jsonld +${expectation_file}= vehicles-temporal-representation-021-06-expectation.jsonld + +*** Test Case *** +Query the temporal evolution of entities matching the given identifier(s) + [Documentation] Check that you can query the temporal evolution of entities matching the given identifier(s) + [Tags] mandatory + + @{entity_types_to_be_retrieved}= Create List Vehicle + @{entity_ids_to_be_retrieved}= Create List ${first_temporal_entity_representation_id} + + Query Temporal Representation Of Entities entity_types=${entity_types_to_be_retrieved} entity_ids=${entity_ids_to_be_retrieved} timerel=after timeAt=2020-07-01T12:05:00Z context=${ngsild_test_suite_context} + + @{temporal_entities_representation_ids}= Create List ${first_temporal_entity_representation_id} + Check Response Status Code Set To 200 + Check Response Body Containing List Containing EntityTemporal elements ${expectation_file} ${temporal_entities_representation_ids} + +*** Keywords *** +Setup Initial Entities + ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + Create Temporal Representation Of Entity ${first_vehicle_payload_file} ${first_temporal_entity_representation_id} + Create Temporal Representation Of Entity ${second_vehicle_payload_file} ${second_temporal_entity_representation_id} + Set Suite Variable ${first_temporal_entity_representation_id} + Set Suite Variable ${second_temporal_entity_representation_id} + +Delete Initial Entities + Delete Temporal Representation Of Entity ${first_temporal_entity_representation_id} + Delete Temporal Representation Of Entity ${second_temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_07.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_07.robot new file mode 100644 index 0000000000000000000000000000000000000000..ec96446ef00ffdd424b1f428a699becd0647b5a8 --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_07.robot @@ -0,0 +1,40 @@ +*** Settings *** +Documentation Check that you can query the temporal evolution of entities matching the given id pattern +Resource ${EXECDIR}/resources/ApiUtils.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Suite Setup Setup Initial Entities +Suite Teardown Delete Initial Entities + +*** Variable *** +${vehicule_id_prefix}= urn:ngsi-ld:Vehicle: +${first_vehicle_payload_file}= 2020-08-vehicule-temporal-representation-sample.jsonld +${second_vehicle_payload_file}= 2020-09-vehicule-temporal-representation-sample.jsonld +${expectation_file}= vehicles-temporal-representation-021-07-expectation.jsonld + +*** Test Case *** +Query the temporal evolution of entities matching the given id pattern + [Documentation] Check that you can query the temporal evolution of entities matching the given id pattern + [Tags] mandatory + + @{entity_types_to_be_retrieved}= Create List Vehicle + + Query Temporal Representation Of Entities entity_types=${entity_types_to_be_retrieved} entity_id_pattern=urn:ngsi-ld:Vehicle:.* timerel=after timeAt=2020-07-01T12:05:00Z context=${ngsild_test_suite_context} + + @{temporal_entities_representation_ids}= Create List ${first_temporal_entity_representation_id} ${second_temporal_entity_representation_id} + Check Response Status Code Set To 200 + Check Response Body Containing List Containing EntityTemporal elements ${expectation_file} ${temporal_entities_representation_ids} + +*** Keywords *** +Setup Initial Entities + ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + Create Temporal Representation Of Entity ${first_vehicle_payload_file} ${first_temporal_entity_representation_id} + Create Temporal Representation Of Entity ${second_vehicle_payload_file} ${second_temporal_entity_representation_id} + Set Suite Variable ${first_temporal_entity_representation_id} + Set Suite Variable ${second_temporal_entity_representation_id} + +Delete Initial Entities + Delete Temporal Representation Of Entity ${first_temporal_entity_representation_id} + Delete Temporal Representation Of Entity ${second_temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_08.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_08.robot new file mode 100644 index 0000000000000000000000000000000000000000..ef0c3a0fadec3fb53468647fe5ebd57a2a38dadd --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_08.robot @@ -0,0 +1,40 @@ +*** Settings *** +Documentation Check that you can query the temporal evolution of entities matching the given NGSI-LD query +Resource ${EXECDIR}/resources/ApiUtils.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Suite Setup Setup Initial Entities +Suite Teardown Delete Initial Entities + +*** Variable *** +${vehicule_id_prefix}= urn:ngsi-ld:Vehicle: +${first_vehicle_payload_file}= 2020-08-vehicule-temporal-representation-sample.jsonld +${second_vehicle_payload_file}= 2020-09-vehicule-temporal-representation-sample.jsonld +${expectation_file}= vehicles-temporal-representation-021-08-expectation.jsonld + +*** Test Case *** +Query the temporal evolution of entities matching the given NGSI-LD query + [Documentation] Check that you can query the temporal evolution of entities matching the given NGSI-LD query + [Tags] mandatory + + @{entity_types_to_be_retrieved}= Create List Vehicle + + Query Temporal Representation Of Entities entity_types=${entity_types_to_be_retrieved} ngsild_query=speed>90;brandName!=Mercedes timerel=after timeAt=2020-07-01T12:05:00Z context=${ngsild_test_suite_context} + + @{temporal_entities_representation_ids}= Create List ${first_temporal_entity_representation_id} ${second_temporal_entity_representation_id} + Check Response Status Code Set To 200 + Check Response Body Containing List Containing EntityTemporal elements ${expectation_file} ${temporal_entities_representation_ids} + +*** Keywords *** +Setup Initial Entities + ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + Create Temporal Representation Of Entity ${first_vehicle_payload_file} ${first_temporal_entity_representation_id} + Create Temporal Representation Of Entity ${second_vehicle_payload_file} ${second_temporal_entity_representation_id} + Set Suite Variable ${first_temporal_entity_representation_id} + Set Suite Variable ${second_temporal_entity_representation_id} + +Delete Initial Entities + Delete Temporal Representation Of Entity ${first_temporal_entity_representation_id} + Delete Temporal Representation Of Entity ${second_temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_09.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_09.robot new file mode 100644 index 0000000000000000000000000000000000000000..9c5ab8551a9092d9f47ea0e7eb28e084edd8c026 --- /dev/null +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_09.robot @@ -0,0 +1,45 @@ +*** Settings *** +Documentation Check that you can query the temporal evolution of entities matching the given NGSI-LD geo-query +Resource ${EXECDIR}/resources/ApiUtils.resource +Resource ${EXECDIR}/resources/AssertionUtils.resource +Resource ${EXECDIR}/resources/JsonUtils.resource + +Suite Setup Setup Initial Entities +Suite Teardown Delete Initial Entities +Test Template Query the temporal evolution of entities matching the given NGSI-LD geo-query + +*** Variable *** +${vehicule_id_prefix}= urn:ngsi-ld:Vehicle: +${first_vehicle_payload_file}= 2020-08-vehicule-temporal-representation-sample.jsonld +${second_vehicle_payload_file}= 2020-10-vehicule-temporal-representation-with-location-sample.jsonld +${expectation_file}= vehicles-temporal-representation-021-09-expectation.jsonld + +*** Test Cases *** GEOREL GEOMETRY COORDINATES GEOPROPERTY EXPECTATION_FILE +Near Point near;maxDistance==2000 Point [-8.503,41.202] ${EMPTY} vehicles-temporal-representation-021-09-01-expectation.jsonld +Within Polygon within Polygon [[-13.503,47.202],[6.541, 52.961],[20.37,44.653],[9.46,32.57],[-15.23,21.37]] location vehicles-temporal-representation-021-09-02-expectation.jsonld + +*** Keywords *** +Query the temporal evolution of entities matching the given NGSI-LD geo-query + [Arguments] ${georel} ${geometry} ${coordinates} ${geoproperty} ${expectation_file} + [Documentation] Check that you can query the temporal evolution of entities matching the given NGSI-LD geo-query + [Tags] mandatory + + @{entity_types_to_be_retrieved}= Create List Vehicle + + Query Temporal Representation Of Entities entity_types=${entity_types_to_be_retrieved} georel=${georel} geometry=${geometry} coordinates=${coordinates} geoproperty=${geoproperty} timerel=after timeAt=2020-07-01T12:05:00Z context=${ngsild_test_suite_context} + + @{temporal_entities_representation_ids}= Create List ${second_temporal_entity_representation_id} + Check Response Status Code Set To 200 + Check Response Body Containing List Containing EntityTemporal elements ${expectation_file} ${temporal_entities_representation_ids} + +Setup Initial Entities + ${first_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + ${second_temporal_entity_representation_id}= Generate Random Entity Id ${vehicule_id_prefix} + Create Temporal Representation Of Entity ${first_vehicle_payload_file} ${first_temporal_entity_representation_id} + Create Temporal Representation Of Entity ${second_vehicle_payload_file} ${second_temporal_entity_representation_id} + Set Suite Variable ${first_temporal_entity_representation_id} + Set Suite Variable ${second_temporal_entity_representation_id} + +Delete Initial Entities + Delete Temporal Representation Of Entity ${first_temporal_entity_representation_id} + Delete Temporal Representation Of Entity ${second_temporal_entity_representation_id} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_01.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_01.robot index 1fedda07d54bbb84f9f16b1848f7c8018036a7a2..d6ffc50bfdd634181c9d968601b93854aea84820 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_01.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_01.robot @@ -9,7 +9,7 @@ Suite Teardown Delete Initial Entities *** Variable *** ${vehicule_id_prefix}= urn:ngsi-ld:Vehicle: -${vehicle_payload_file}= vehicule-temporal-representation-sample.jsonld +${vehicle_payload_file}= 2020-08-vehicule-temporal-representation-sample.jsonld ${vehicle_expectation_file}= vehicle-temporal-representation-020-01-expectation.jsonld *** Test Case *** diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_02.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_02.robot index 54f83eb66c26347f1c2b66dad32a65f2e4481c82..80aaad87329be339218a6246b11686129ae29e8d 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_02.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_02.robot @@ -9,7 +9,7 @@ Suite Teardown Delete Initial Entities *** Variable *** ${vehicule_id_prefix}= urn:ngsi-ld:Vehicle: -${vehicle_payload_file}= vehicule-temporal-representation-sample.jsonld +${vehicle_payload_file}= 2020-08-vehicule-temporal-representation-sample.jsonld ${vehicle_expectation_file}= vehicle-temporal-representation-020-02-expectation.jsonld *** Test Case *** diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_03.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_03.robot index b2b628551f6d506d23a785685fb449b4d2ee954a..a23dc00bfec7d994b0b441a34447c63da8eafad3 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_03.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_03.robot @@ -9,7 +9,7 @@ Suite Teardown Delete Initial Entities *** Variable *** ${vehicule_id_prefix}= urn:ngsi-ld:Vehicle: -${vehicle_payload_file}= vehicule-temporal-representation-sample.jsonld +${vehicle_payload_file}= 2020-08-vehicule-temporal-representation-sample.jsonld ${vehicle_expectation_file}= vehicle-temporal-representation-020-03-expectation.jsonld *** Test Case *** diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_04.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_04.robot index b56fa2891e0e19539d18e34c179860f1176c4df4..f3b5cf899389c7741d27a91bdf9e456aa6a582de 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_04.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_04.robot @@ -10,12 +10,12 @@ Test Template Retrieve the temporal evolution of an entity matching the given N *** Variable *** ${vehicule_id_prefix}= urn:ngsi-ld:Vehicle: -${vehicle_payload_file}= vehicule-temporal-representation-sample.jsonld +${vehicle_payload_file}= 2020-08-vehicule-temporal-representation-sample.jsonld *** Test Cases *** TIMEREL TIMEAT ENDTIMEAT VEHICLE_EXPECTATION_FILE -After after 2018-08-01T13:03:00Z ${EMPTY} vehicle-temporal-representation-020-04-01-expectation.jsonld -Before before 2018-08-01T12:05:00Z ${EMPTY} vehicle-temporal-representation-020-04-02-expectation.jsonld -Between between 2018-08-01T12:00:00Z 2018-08-01T13:00:00Z vehicle-temporal-representation-020-04-03-expectation.jsonld +After after 2020-08-01T13:03:00Z ${EMPTY} vehicle-temporal-representation-020-04-01-expectation.jsonld +Before before 2020-08-01T12:05:00Z ${EMPTY} vehicle-temporal-representation-020-04-02-expectation.jsonld +Between between 2020-08-01T12:00:00Z 2020-08-01T13:00:00Z vehicle-temporal-representation-020-04-03-expectation.jsonld *** Keywords *** Retrieve the temporal evolution of an entity matching the given NGSI-LD temporal query diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_05.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_05.robot index 3810a1c2c089e402aaf94e6d6c1a58641f13ca3a..d7d6e7c36c5443c8dd33eee09a3b2d76f83297be 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_05.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_05.robot @@ -10,7 +10,7 @@ Test Template Retrieve the temporal evolution of the last N instances of entity *** Variable *** ${vehicule_id_prefix}= urn:ngsi-ld:Vehicle: -${vehicle_payload_file}= vehicule-temporal-representation-multiple-instances-sample.jsonld +${vehicle_payload_file}= 2020-08-vehicule-temporal-representation-multiple-instances-sample.jsonld *** Test Cases *** LASTN VEHICLE_EXPECTATION_FILE Retrieve Some Instances ${10} vehicle-temporal-representation-020-05-01-expectation.jsonld diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_08.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_08.robot index 20892e4a6566e62397c5071b59967b26b8dd1cb7..909493fc0c1eb07e9f3c591312859e53c1f1ac69 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_08.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_08.robot @@ -9,7 +9,7 @@ Suite Teardown Delete Initial Entities *** Variable *** ${vehicule_id_prefix}= urn:ngsi-ld:Vehicle: -${vehicle_payload_file}= vehicule-temporal-representation-sample.jsonld +${vehicle_payload_file}= 2020-08-vehicule-temporal-representation-sample.jsonld *** Test Case *** Retrieve the temporal evolution of non-existing entity attributes diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_09.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_09.robot index c67b3d1cc1cd662963691f654b905d4be9a0c236..b93dc6526658d9ca1d4bcca4d3d37456ecb8db1d 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_09.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_09.robot @@ -10,7 +10,7 @@ Test Template Retrieve the temporal evolution of an entity with an invalid requ *** Variable *** ${vehicule_id_prefix}= urn:ngsi-ld:Vehicle: -${vehicle_payload_file}= vehicule-temporal-representation-sample.jsonld +${vehicle_payload_file}= 2020-08-vehicule-temporal-representation-sample.jsonld *** Test Cases *** TIMEREL TIMEAT ENDTIMEAT After after ${EMPTY} ${EMPTY} diff --git a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_10.robot b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_10.robot index 0813a45202df8442f24cb4ecb46c93695d3692bb..bd14fb816ecaad17f625a8d5a75667e9ee1f8085 100644 --- a/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_10.robot +++ b/TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/RetrieveTemporalEvolutionOfEntity/020_10.robot @@ -9,7 +9,7 @@ Suite Teardown Delete Initial Entities *** Variable *** ${vehicule_id_prefix}= urn:ngsi-ld:Vehicle: -${vehicle_payload_file}= vehicule-temporal-representation-sample.jsonld +${vehicle_payload_file}= 2020-08-vehicule-temporal-representation-sample.jsonld ${vehicle_expectation_file}= vehicle-temporal-representation-020-10-expectation.jsonld *** Test Case *** diff --git a/data/temporalEntities/2020-08-bus-temporal-representation-sample.jsonld b/data/temporalEntities/2020-08-bus-temporal-representation-sample.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..22efffc5d0d888cca7d469cc76a0288799ea0f09 --- /dev/null +++ b/data/temporalEntities/2020-08-bus-temporal-representation-sample.jsonld @@ -0,0 +1,48 @@ +{ + "id":"urn:ngsi-ld:Bus:randomUUID", + "type":"Bus", + "brandName":[ + { + "type":"Property", + "value":"Mercedes" + } + ], + "speed":[ + { + "type":"Property", + "value":45, + "observedAt":"2020-08-01T12:03:00Z" + }, + { + "type":"Property", + "value":25, + "observedAt":"2020-08-01T12:05:00Z" + }, + { + "type":"Property", + "value":67, + "observedAt":"2020-08-01T12:07:00Z" + } + ], + "fuelLevel":[ + { + "type":"Property", + "value":210, + "observedAt":"2020-08-01T12:03:00Z" + }, + { + "type":"Property", + "value":145, + "observedAt":"2020-08-01T13:05:00Z" + }, + { + "type":"Property", + "value":124, + "observedAt":"2020-08-01T14:07:00Z" + } + ], + "@context":[ + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld", + "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/temporalEntities/vehicule-temporal-representation-multiple-instances-sample.jsonld b/data/temporalEntities/2020-08-vehicule-temporal-representation-multiple-instances-sample.jsonld similarity index 64% rename from data/temporalEntities/vehicule-temporal-representation-multiple-instances-sample.jsonld rename to data/temporalEntities/2020-08-vehicule-temporal-representation-multiple-instances-sample.jsonld index 605dd0e00592b6e283f7c68408946e2669a4bdd6..23e1fff443e4dbfd7aaba2a5161aa66a18f4d795 100644 --- a/data/temporalEntities/vehicule-temporal-representation-multiple-instances-sample.jsonld +++ b/data/temporalEntities/2020-08-vehicule-temporal-representation-multiple-instances-sample.jsonld @@ -11,169 +11,169 @@ { "type":"Property", "value":120, - "observedAt":"2018-08-01T12:03:00Z" + "observedAt":"2020-08-01T12:03:00Z" }, { "type":"Property", "value":80, - "observedAt":"2018-08-01T12:05:00Z" + "observedAt":"2020-08-01T12:05:00Z" }, { "type":"Property", "value":100, - "observedAt":"2018-08-01T12:07:00Z" + "observedAt":"2020-08-01T12:07:00Z" }, { "type":"Property", "value":110, - "observedAt":"2018-08-01T12:09:00Z" + "observedAt":"2020-08-01T12:09:00Z" }, { "type":"Property", "value":100, - "observedAt":"2018-08-01T12:11:00Z" + "observedAt":"2020-08-01T12:11:00Z" }, { "type":"Property", "value":80, - "observedAt":"2018-08-01T12:13:00Z" + "observedAt":"2020-08-01T12:13:00Z" }, { "type":"Property", "value":50, - "observedAt":"2018-08-01T12:15:00Z" + "observedAt":"2020-08-01T12:15:00Z" }, { "type":"Property", "value":40, - "observedAt":"2018-08-01T12:17:00Z" + "observedAt":"2020-08-01T12:17:00Z" }, { "type":"Property", "value":50, - "observedAt":"2018-08-01T12:19:00Z" + "observedAt":"2020-08-01T12:19:00Z" }, { "type":"Property", "value":60, - "observedAt":"2018-08-01T12:21:00Z" + "observedAt":"2020-08-01T12:21:00Z" }, { "type":"Property", "value":80, - "observedAt":"2018-08-01T12:23:00Z" + "observedAt":"2020-08-01T12:23:00Z" }, { "type":"Property", "value":85, - "observedAt":"2018-08-01T12:25:00Z" + "observedAt":"2020-08-01T12:25:00Z" }, { "type":"Property", "value":105, - "observedAt":"2018-08-01T12:27:00Z" + "observedAt":"2020-08-01T12:27:00Z" }, { "type":"Property", "value":120, - "observedAt":"2018-08-01T12:29:00Z" + "observedAt":"2020-08-01T12:29:00Z" }, { "type":"Property", "value":125, - "observedAt":"2018-08-01T12:31:00Z" + "observedAt":"2020-08-01T12:31:00Z" }, { "type":"Property", "value":130, - "observedAt":"2018-08-01T12:35:00Z" + "observedAt":"2020-08-01T12:35:00Z" } ], "fuelLevel":[ { "type":"Property", "value":67, - "observedAt":"2018-08-01T12:03:00Z" + "observedAt":"2020-08-01T12:03:00Z" }, { "type":"Property", "value":53, - "observedAt":"2018-08-01T13:05:00Z" + "observedAt":"2020-08-01T13:05:00Z" }, { "type":"Property", "value":40, - "observedAt":"2018-08-01T14:07:00Z" + "observedAt":"2020-08-01T14:07:00Z" }, { "type":"Property", "value":35, - "observedAt":"2018-08-01T14:20:00Z" + "observedAt":"2020-08-01T14:20:00Z" }, { "type":"Property", "value":30, - "observedAt":"2018-08-01T15:05:00Z" + "observedAt":"2020-08-01T15:05:00Z" }, { "type":"Property", "value":85, - "observedAt":"2018-08-01T15:07:00Z" + "observedAt":"2020-08-01T15:07:00Z" }, { "type":"Property", "value":80, - "observedAt":"2018-08-01T15:20:00Z" + "observedAt":"2020-08-01T15:20:00Z" }, { "type":"Property", "value":76, - "observedAt":"2018-08-01T16:05:00Z" + "observedAt":"2020-08-01T16:05:00Z" }, { "type":"Property", "value":70, - "observedAt":"2018-08-01T17:07:00Z" + "observedAt":"2020-08-01T17:07:00Z" }, { "type":"Property", "value":50, - "observedAt":"2018-08-01T18:03:00Z" + "observedAt":"2020-08-01T18:03:00Z" }, { "type":"Property", "value":48, - "observedAt":"2018-08-01T19:05:00Z" + "observedAt":"2020-08-01T19:05:00Z" }, { "type":"Property", "value":40, - "observedAt":"2018-08-01T19:07:00Z" + "observedAt":"2020-08-01T19:07:00Z" }, { "type":"Property", "value":35, - "observedAt":"2018-08-01T20:05:00Z" + "observedAt":"2020-08-01T20:05:00Z" }, { "type":"Property", "value":31, - "observedAt":"2018-08-01T20:07:00Z" + "observedAt":"2020-08-01T20:07:00Z" }, { "type":"Property", "value":28, - "observedAt":"2018-08-01T21:03:00Z" + "observedAt":"2020-08-01T21:03:00Z" }, { "type":"Property", "value":24, - "observedAt":"2018-08-01T21:05:00Z" + "observedAt":"2020-08-01T21:05:00Z" }, { "type":"Property", "value":19, - "observedAt":"2018-08-01T22:07:00Z" + "observedAt":"2020-08-01T22:07:00Z" } ], "@context":[ diff --git a/data/temporalEntities/vehicule-temporal-representation-sample.jsonld b/data/temporalEntities/2020-08-vehicule-temporal-representation-sample.jsonld similarity index 76% rename from data/temporalEntities/vehicule-temporal-representation-sample.jsonld rename to data/temporalEntities/2020-08-vehicule-temporal-representation-sample.jsonld index 3423d17c24401ba7ee8914934f39aa5a1e054a43..070d566b580d2a52d5b20c52c013ec6f5e48bb10 100644 --- a/data/temporalEntities/vehicule-temporal-representation-sample.jsonld +++ b/data/temporalEntities/2020-08-vehicule-temporal-representation-sample.jsonld @@ -11,34 +11,34 @@ { "type":"Property", "value":120, - "observedAt":"2018-08-01T12:03:00Z" + "observedAt":"2020-08-01T12:03:00Z" }, { "type":"Property", "value":80, - "observedAt":"2018-08-01T12:05:00Z" + "observedAt":"2020-08-01T12:05:00Z" }, { "type":"Property", "value":100, - "observedAt":"2018-08-01T12:07:00Z" + "observedAt":"2020-08-01T12:07:00Z" } ], "fuelLevel":[ { "type":"Property", "value":67, - "observedAt":"2018-08-01T12:03:00Z" + "observedAt":"2020-08-01T12:03:00Z" }, { "type":"Property", "value":53, - "observedAt":"2018-08-01T13:05:00Z" + "observedAt":"2020-08-01T13:05:00Z" }, { "type":"Property", "value":40, - "observedAt":"2018-08-01T14:07:00Z" + "observedAt":"2020-08-01T14:07:00Z" } ], "@context":[ diff --git a/data/temporalEntities/2020-09-vehicule-temporal-representation-sample.jsonld b/data/temporalEntities/2020-09-vehicule-temporal-representation-sample.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..4f095bf17cff1f03d1b03f3fb05af2bb1e120221 --- /dev/null +++ b/data/temporalEntities/2020-09-vehicule-temporal-representation-sample.jsonld @@ -0,0 +1,48 @@ +{ + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":[ + { + "type":"Property", + "value":"BMW" + } + ], + "speed":[ + { + "type":"Property", + "value":120, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-09-01T12:05:00Z" + }, + { + "type":"Property", + "value":100, + "observedAt":"2020-09-01T12:07:00Z" + } + ], + "fuelLevel":[ + { + "type":"Property", + "value":67, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":53, + "observedAt":"2020-09-01T13:05:00Z" + }, + { + "type":"Property", + "value":40, + "observedAt":"2020-09-01T14:07:00Z" + } + ], + "@context":[ + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld", + "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/temporalEntities/2020-10-vehicule-temporal-representation-with-location-sample.jsonld b/data/temporalEntities/2020-10-vehicule-temporal-representation-with-location-sample.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..e88e09d5fe07b8e20ae14408bc0a92625777a62e --- /dev/null +++ b/data/temporalEntities/2020-10-vehicule-temporal-representation-with-location-sample.jsonld @@ -0,0 +1,66 @@ +{ + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":[ + { + "type":"Property", + "value":"Audi" + } + ], + "speed":[ + { + "type":"Property", + "value":150, + "observedAt":"2020-10-01T12:03:00Z" + }, + { + "type":"Property", + "value":90, + "observedAt":"2020-10-01T12:05:00Z" + }, + { + "type":"Property", + "value":127, + "observedAt":"2020-10-01T12:07:00Z" + } + ], + "fuelLevel":[ + { + "type":"Property", + "value":89, + "observedAt":"2020-10-01T12:03:00Z" + }, + { + "type":"Property", + "value":78, + "observedAt":"2020-10-01T13:05:00Z" + }, + { + "type":"Property", + "value":62, + "observedAt":"2020-10-01T14:07:00Z" + } + ], + "location":[ + { + "type":"Point", + "coordinates":[ + -8.5, + 41.2 + ], + "observedAt":"2020-10-01T12:03:00Z" + }, + { + "type":"Point", + "coordinates":[ + 2.35, + 42.22 + ], + "observedAt":"2020-10-01T12:05:00Z" + } + ], + "@context":[ + "https://raw.githubusercontent.com/easy-global-market/ngsild-api-data-models/feature/add-json-ld-context-for-ngsi-ld-test-suite/ngsi-ld-test-suite/ngsi-ld-test-suite-context.jsonld", + "https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld" + ] +} \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-020-01-expectation.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-020-01-expectation.jsonld index 3671ae37b5371f4c765a29cccb14b75c22fad6c7..b632d1c6c2a22f6e5822ab78d8b0c3192cb0869c 100644 --- a/data/temporalEntities/expectations/vehicle-temporal-representation-020-01-expectation.jsonld +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-020-01-expectation.jsonld @@ -9,35 +9,35 @@ { "type":"Property", "value":120, - "observedAt":"2018-08-01T12:03:00Z" + "observedAt":"2020-08-01T12:03:00Z" }, { "type":"Property", "value":80, - "observedAt":"2018-08-01T12:05:00Z" + "observedAt":"2020-08-01T12:05:00Z" }, { "type":"Property", "value":100, - "observedAt":"2018-08-01T12:07:00Z" + "observedAt":"2020-08-01T12:07:00Z" } ], "https://ngsi-ld-test-suite/context#fuelLevel":[ { "type":"Property", "value":67, - "observedAt":"2018-08-01T12:03:00Z" + "observedAt":"2020-08-01T12:03:00Z" }, { "type":"Property", "value":53, - "observedAt":"2018-08-01T13:05:00Z" + "observedAt":"2020-08-01T13:05:00Z" }, { "type":"Property", "value":40, - "observedAt":"2018-08-01T14:07:00Z" + "observedAt":"2020-08-01T14:07:00Z" } ] } \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-020-02-expectation.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-020-02-expectation.jsonld index ca4ca6ede0ce97ad985626fc094e0a4d4cce5bb8..74f8d7741298c390fb34bcb16b11e3b8e9d4f3ae 100644 --- a/data/temporalEntities/expectations/vehicle-temporal-representation-020-02-expectation.jsonld +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-020-02-expectation.jsonld @@ -9,35 +9,35 @@ { "type":"Property", "value":120, - "observedAt":"2018-08-01T12:03:00Z" + "observedAt":"2020-08-01T12:03:00Z" }, { "type":"Property", "value":80, - "observedAt":"2018-08-01T12:05:00Z" + "observedAt":"2020-08-01T12:05:00Z" }, { "type":"Property", "value":100, - "observedAt":"2018-08-01T12:07:00Z" + "observedAt":"2020-08-01T12:07:00Z" } ], "fuelLevel":[ { "type":"Property", "value":67, - "observedAt":"2018-08-01T12:03:00Z" + "observedAt":"2020-08-01T12:03:00Z" }, { "type":"Property", "value":53, - "observedAt":"2018-08-01T13:05:00Z" + "observedAt":"2020-08-01T13:05:00Z" }, { "type":"Property", "value":40, - "observedAt":"2018-08-01T14:07:00Z" + "observedAt":"2020-08-01T14:07:00Z" } ] } \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-020-03-expectation.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-020-03-expectation.jsonld index facf8b67db6ba8ad242dc776312b703b133bfd91..0c4045ef03096e55d3ba0ebb5d406f001ed8fa53 100644 --- a/data/temporalEntities/expectations/vehicle-temporal-representation-020-03-expectation.jsonld +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-020-03-expectation.jsonld @@ -5,17 +5,17 @@ { "type":"Property", "value":67, - "observedAt":"2018-08-01T12:03:00Z" + "observedAt":"2020-08-01T12:03:00Z" }, { "type":"Property", "value":53, - "observedAt":"2018-08-01T13:05:00Z" + "observedAt":"2020-08-01T13:05:00Z" }, { "type":"Property", "value":40, - "observedAt":"2018-08-01T14:07:00Z" + "observedAt":"2020-08-01T14:07:00Z" } ] } \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-020-04-01-expectation.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-020-04-01-expectation.jsonld index 32bf63c03e5f014198ea0c9769a4a6ef6a24b12a..1a212875b26035032748779c7435135fbbaa99df 100644 --- a/data/temporalEntities/expectations/vehicle-temporal-representation-020-04-01-expectation.jsonld +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-020-04-01-expectation.jsonld @@ -9,12 +9,12 @@ { "type":"Property", "value":53, - "observedAt":"2018-08-01T13:05:00Z" + "observedAt":"2020-08-01T13:05:00Z" }, { "type":"Property", "value":40, - "observedAt":"2018-08-01T14:07:00Z" + "observedAt":"2020-08-01T14:07:00Z" } ] } \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-020-04-02-expectation.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-020-04-02-expectation.jsonld index af46993ba27c4df25a8b7b446888b52318b49ee4..eb29e25af60133d1cae6c0b2bbb1d4b820302005 100644 --- a/data/temporalEntities/expectations/vehicle-temporal-representation-020-04-02-expectation.jsonld +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-020-04-02-expectation.jsonld @@ -8,18 +8,18 @@ "fuelLevel":{ "type":"Property", "value":67, - "observedAt":"2018-08-01T12:03:00Z" + "observedAt":"2020-08-01T12:03:00Z" }, "speed":[ { "type":"Property", "value":120, - "observedAt":"2018-08-01T12:03:00Z" + "observedAt":"2020-08-01T12:03:00Z" }, { "type":"Property", "value":80, - "observedAt":"2018-08-01T12:05:00Z" + "observedAt":"2020-08-01T12:05:00Z" } ] } \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-020-04-03-expectation.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-020-04-03-expectation.jsonld index 8c87d29e3503ab96e24110f7ba1e49c3bcd995a6..4af9cc6cb62ce9a50ebb2b9cc2e9c9138c61d392 100644 --- a/data/temporalEntities/expectations/vehicle-temporal-representation-020-04-03-expectation.jsonld +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-020-04-03-expectation.jsonld @@ -8,23 +8,23 @@ "fuelLevel":{ "type":"Property", "value":67, - "observedAt":"2018-08-01T12:03:00Z" + "observedAt":"2020-08-01T12:03:00Z" }, "speed":[ { "type":"Property", "value":120, - "observedAt":"2018-08-01T12:03:00Z" + "observedAt":"2020-08-01T12:03:00Z" }, { "type":"Property", "value":80, - "observedAt":"2018-08-01T12:05:00Z" + "observedAt":"2020-08-01T12:05:00Z" }, { "type":"Property", "value":100, - "observedAt":"2018-08-01T12:07:00Z" + "observedAt":"2020-08-01T12:07:00Z" } ] } \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-020-05-01-expectation.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-020-05-01-expectation.jsonld index 34e35ca1aa402eed5754108b4666b6f7bb257731..8799061b0f532696146b6babfa082758ed3cc7e1 100644 --- a/data/temporalEntities/expectations/vehicle-temporal-representation-020-05-01-expectation.jsonld +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-020-05-01-expectation.jsonld @@ -9,104 +9,104 @@ { "type":"Property", "value":76, - "observedAt":"2018-08-01T16:05:00Z" + "observedAt":"2020-08-01T16:05:00Z" }, { "type":"Property", "value":70, - "observedAt":"2018-08-01T17:07:00Z" + "observedAt":"2020-08-01T17:07:00Z" }, { "type":"Property", "value":50, - "observedAt":"2018-08-01T18:03:00Z" + "observedAt":"2020-08-01T18:03:00Z" }, { "type":"Property", "value":48, - "observedAt":"2018-08-01T19:05:00Z" + "observedAt":"2020-08-01T19:05:00Z" }, { "type":"Property", "value":40, - "observedAt":"2018-08-01T19:07:00Z" + "observedAt":"2020-08-01T19:07:00Z" }, { "type":"Property", "value":35, - "observedAt":"2018-08-01T20:05:00Z" + "observedAt":"2020-08-01T20:05:00Z" }, { "type":"Property", "value":31, - "observedAt":"2018-08-01T20:07:00Z" + "observedAt":"2020-08-01T20:07:00Z" }, { "type":"Property", "value":28, - "observedAt":"2018-08-01T21:03:00Z" + "observedAt":"2020-08-01T21:03:00Z" }, { "type":"Property", "value":24, - "observedAt":"2018-08-01T21:05:00Z" + "observedAt":"2020-08-01T21:05:00Z" }, { "type":"Property", "value":19, - "observedAt":"2018-08-01T22:07:00Z" + "observedAt":"2020-08-01T22:07:00Z" } ], "speed":[ { "type":"Property", "value":50, - "observedAt":"2018-08-01T12:15:00Z" + "observedAt":"2020-08-01T12:15:00Z" }, { "type":"Property", "value":40, - "observedAt":"2018-08-01T12:17:00Z" + "observedAt":"2020-08-01T12:17:00Z" }, { "type":"Property", "value":50, - "observedAt":"2018-08-01T12:19:00Z" + "observedAt":"2020-08-01T12:19:00Z" }, { "type":"Property", "value":60, - "observedAt":"2018-08-01T12:21:00Z" + "observedAt":"2020-08-01T12:21:00Z" }, { "type":"Property", "value":80, - "observedAt":"2018-08-01T12:23:00Z" + "observedAt":"2020-08-01T12:23:00Z" }, { "type":"Property", "value":85, - "observedAt":"2018-08-01T12:25:00Z" + "observedAt":"2020-08-01T12:25:00Z" }, { "type":"Property", "value":105, - "observedAt":"2018-08-01T12:27:00Z" + "observedAt":"2020-08-01T12:27:00Z" }, { "type":"Property", "value":120, - "observedAt":"2018-08-01T12:29:00Z" + "observedAt":"2020-08-01T12:29:00Z" }, { "type":"Property", "value":125, - "observedAt":"2018-08-01T12:31:00Z" + "observedAt":"2020-08-01T12:31:00Z" }, { "type":"Property", "value":130, - "observedAt":"2018-08-01T12:35:00Z" + "observedAt":"2020-08-01T12:35:00Z" } ] } \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-020-05-02-expectation.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-020-05-02-expectation.jsonld index 6399ccd09bc64eaec07e21b230fc277d70c3965c..f8de9cff06d404fb789298518a06738c279ee16e 100644 --- a/data/temporalEntities/expectations/vehicle-temporal-representation-020-05-02-expectation.jsonld +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-020-05-02-expectation.jsonld @@ -9,169 +9,169 @@ { "type":"Property", "value":67, - "observedAt":"2018-08-01T12:03:00Z" + "observedAt":"2020-08-01T12:03:00Z" }, { "type":"Property", "value":53, - "observedAt":"2018-08-01T13:05:00Z" + "observedAt":"2020-08-01T13:05:00Z" }, { "type":"Property", "value":40, - "observedAt":"2018-08-01T14:07:00Z" + "observedAt":"2020-08-01T14:07:00Z" }, { "type":"Property", "value":35, - "observedAt":"2018-08-01T14:20:00Z" + "observedAt":"2020-08-01T14:20:00Z" }, { "type":"Property", "value":30, - "observedAt":"2018-08-01T15:05:00Z" + "observedAt":"2020-08-01T15:05:00Z" }, { "type":"Property", "value":85, - "observedAt":"2018-08-01T15:07:00Z" + "observedAt":"2020-08-01T15:07:00Z" }, { "type":"Property", "value":80, - "observedAt":"2018-08-01T15:20:00Z" + "observedAt":"2020-08-01T15:20:00Z" }, { "type":"Property", "value":76, - "observedAt":"2018-08-01T16:05:00Z" + "observedAt":"2020-08-01T16:05:00Z" }, { "type":"Property", "value":70, - "observedAt":"2018-08-01T17:07:00Z" + "observedAt":"2020-08-01T17:07:00Z" }, { "type":"Property", "value":50, - "observedAt":"2018-08-01T18:03:00Z" + "observedAt":"2020-08-01T18:03:00Z" }, { "type":"Property", "value":48, - "observedAt":"2018-08-01T19:05:00Z" + "observedAt":"2020-08-01T19:05:00Z" }, { "type":"Property", "value":40, - "observedAt":"2018-08-01T19:07:00Z" + "observedAt":"2020-08-01T19:07:00Z" }, { "type":"Property", "value":35, - "observedAt":"2018-08-01T20:05:00Z" + "observedAt":"2020-08-01T20:05:00Z" }, { "type":"Property", "value":31, - "observedAt":"2018-08-01T20:07:00Z" + "observedAt":"2020-08-01T20:07:00Z" }, { "type":"Property", "value":28, - "observedAt":"2018-08-01T21:03:00Z" + "observedAt":"2020-08-01T21:03:00Z" }, { "type":"Property", "value":24, - "observedAt":"2018-08-01T21:05:00Z" + "observedAt":"2020-08-01T21:05:00Z" }, { "type":"Property", "value":19, - "observedAt":"2018-08-01T22:07:00Z" + "observedAt":"2020-08-01T22:07:00Z" } ], "speed":[ { "type":"Property", "value":120, - "observedAt":"2018-08-01T12:03:00Z" + "observedAt":"2020-08-01T12:03:00Z" }, { "type":"Property", "value":80, - "observedAt":"2018-08-01T12:05:00Z" + "observedAt":"2020-08-01T12:05:00Z" }, { "type":"Property", "value":100, - "observedAt":"2018-08-01T12:07:00Z" + "observedAt":"2020-08-01T12:07:00Z" }, { "type":"Property", "value":110, - "observedAt":"2018-08-01T12:09:00Z" + "observedAt":"2020-08-01T12:09:00Z" }, { "type":"Property", "value":100, - "observedAt":"2018-08-01T12:11:00Z" + "observedAt":"2020-08-01T12:11:00Z" }, { "type":"Property", "value":80, - "observedAt":"2018-08-01T12:13:00Z" + "observedAt":"2020-08-01T12:13:00Z" }, { "type":"Property", "value":50, - "observedAt":"2018-08-01T12:15:00Z" + "observedAt":"2020-08-01T12:15:00Z" }, { "type":"Property", "value":40, - "observedAt":"2018-08-01T12:17:00Z" + "observedAt":"2020-08-01T12:17:00Z" }, { "type":"Property", "value":50, - "observedAt":"2018-08-01T12:19:00Z" + "observedAt":"2020-08-01T12:19:00Z" }, { "type":"Property", "value":60, - "observedAt":"2018-08-01T12:21:00Z" + "observedAt":"2020-08-01T12:21:00Z" }, { "type":"Property", "value":80, - "observedAt":"2018-08-01T12:23:00Z" + "observedAt":"2020-08-01T12:23:00Z" }, { "type":"Property", "value":85, - "observedAt":"2018-08-01T12:25:00Z" + "observedAt":"2020-08-01T12:25:00Z" }, { "type":"Property", "value":105, - "observedAt":"2018-08-01T12:27:00Z" + "observedAt":"2020-08-01T12:27:00Z" }, { "type":"Property", "value":120, - "observedAt":"2018-08-01T12:29:00Z" + "observedAt":"2020-08-01T12:29:00Z" }, { "type":"Property", "value":125, - "observedAt":"2018-08-01T12:31:00Z" + "observedAt":"2020-08-01T12:31:00Z" }, { "type":"Property", "value":130, - "observedAt":"2018-08-01T12:35:00Z" + "observedAt":"2020-08-01T12:35:00Z" } ] } \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicle-temporal-representation-020-10-expectation.jsonld b/data/temporalEntities/expectations/vehicle-temporal-representation-020-10-expectation.jsonld index 6ed056e18f586e26f076f2c7d1c1981bb71ead39..14fa90a436372a4c30f8f1828a09956dee97f3e7 100644 --- a/data/temporalEntities/expectations/vehicle-temporal-representation-020-10-expectation.jsonld +++ b/data/temporalEntities/expectations/vehicle-temporal-representation-020-10-expectation.jsonld @@ -3,13 +3,13 @@ "type":"Vehicle", "brandName": "Volvo", "speed":[ - [ 120, "2018-08-01T12:03:00Z" ], - [ 80, "2018-08-01T12:05:00Z" ], - [ 100, "2018-08-01T12:07:00Z" ] + [ 120, "2020-08-01T12:03:00Z" ], + [ 80, "2020-08-01T12:05:00Z" ], + [ 100, "2020-08-01T12:07:00Z" ] ], "fuelLevel":[ - [ 67, "2018-08-01T12:03:00Z" ], - [ 53, "2018-08-01T13:05:00Z" ], - [ 40, "2018-08-01T14:07:00Z" ] + [ 67, "2020-08-01T12:03:00Z" ], + [ 53, "2020-08-01T13:05:00Z" ], + [ 40, "2020-08-01T14:07:00Z" ] ] } \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicles-temporal-representation-021-01-01-expectation.jsonld b/data/temporalEntities/expectations/vehicles-temporal-representation-021-01-01-expectation.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..6fb2bc953f72e4e30d6efc94fa40b15af3c327ed --- /dev/null +++ b/data/temporalEntities/expectations/vehicles-temporal-representation-021-01-01-expectation.jsonld @@ -0,0 +1,76 @@ +[ + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":{ + "type":"Property", + "value":"Volvo" + }, + "fuelLevel":[ + { + "type":"Property", + "value":53, + "observedAt":"2020-08-01T13:05:00Z" + }, + { + "type":"Property", + "value":40, + "observedAt":"2020-08-01T14:07:00Z" + } + ], + "speed":[ + { + "type":"Property", + "value":80, + "observedAt":"2020-08-01T12:05:00Z" + }, + { + "type":"Property", + "value":100, + "observedAt":"2020-08-01T12:07:00Z" + } + ] + }, + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":{ + "type":"Property", + "value":"BMW" + }, + "fuelLevel":[ + { + "type":"Property", + "value":67, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":53, + "observedAt":"2020-09-01T13:05:00Z" + }, + { + "type":"Property", + "value":40, + "observedAt":"2020-09-01T14:07:00Z" + } + ], + "speed":[ + { + "type":"Property", + "value":120, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-09-01T12:05:00Z" + }, + { + "type":"Property", + "value":100, + "observedAt":"2020-09-01T12:07:00Z" + } + ] + } +] \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicles-temporal-representation-021-01-02-expectation.jsonld b/data/temporalEntities/expectations/vehicles-temporal-representation-021-01-02-expectation.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..5c0a60b087943f3f029f43349b5d22518e6bc7de --- /dev/null +++ b/data/temporalEntities/expectations/vehicles-temporal-representation-021-01-02-expectation.jsonld @@ -0,0 +1,81 @@ +[ + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":{ + "type":"Property", + "value":"Volvo" + }, + "fuelLevel":[ + { + "type":"Property", + "value":67, + "observedAt":"2020-08-01T12:03:00Z" + }, + { + "type":"Property", + "value":53, + "observedAt":"2020-08-01T13:05:00Z" + }, + { + "type":"Property", + "value":40, + "observedAt":"2020-08-01T14:07:00Z" + } + ], + "speed":[ + { + "type":"Property", + "value":120, + "observedAt":"2020-08-01T12:03:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-08-01T12:05:00Z" + }, + { + "type":"Property", + "value":100, + "observedAt":"2020-08-01T12:07:00Z" + } + ] + }, + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":{ + "type":"Property", + "value":"BMW" + }, + "fuelLevel":[ + { + "type":"Property", + "value":67, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":53, + "observedAt":"2020-09-01T13:05:00Z" + } + ], + "speed":[ + { + "type":"Property", + "value":120, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-09-01T12:05:00Z" + }, + { + "type":"Property", + "value":100, + "observedAt":"2020-09-01T12:07:00Z" + } + ] + } +] \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicles-temporal-representation-021-02-expectation.jsonld b/data/temporalEntities/expectations/vehicles-temporal-representation-021-02-expectation.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..105bf3a1c86bfacbdbc2f1d820a5a0f3f7c60fed --- /dev/null +++ b/data/temporalEntities/expectations/vehicles-temporal-representation-021-02-expectation.jsonld @@ -0,0 +1,44 @@ +[ + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "speed":[ + { + "type":"Property", + "value":120, + "observedAt":"2020-08-01T12:03:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-08-01T12:05:00Z" + }, + { + "type":"Property", + "value":100, + "observedAt":"2020-08-01T12:07:00Z" + } + ] + }, + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "speed":[ + { + "type":"Property", + "value":120, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-09-01T12:05:00Z" + }, + { + "type":"Property", + "value":100, + "observedAt":"2020-09-01T12:07:00Z" + } + ] + } +] \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicles-temporal-representation-021-03-expectation.jsonld b/data/temporalEntities/expectations/vehicles-temporal-representation-021-03-expectation.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..4abeba3b33cf9d6cc49fab199f2aa6f539a4027f --- /dev/null +++ b/data/temporalEntities/expectations/vehicles-temporal-representation-021-03-expectation.jsonld @@ -0,0 +1,196 @@ +[ + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":{ + "type":"Property", + "value":"Volvo" + }, + "speed":[ + { + "type":"Property", + "value":100, + "observedAt":"2020-08-01T12:07:00Z" + }, + { + "type":"Property", + "value":110, + "observedAt":"2020-08-01T12:09:00Z" + }, + { + "type":"Property", + "value":100, + "observedAt":"2020-08-01T12:11:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-08-01T12:13:00Z" + }, + { + "type":"Property", + "value":50, + "observedAt":"2020-08-01T12:15:00Z" + }, + { + "type":"Property", + "value":40, + "observedAt":"2020-08-01T12:17:00Z" + }, + { + "type":"Property", + "value":50, + "observedAt":"2020-08-01T12:19:00Z" + }, + { + "type":"Property", + "value":60, + "observedAt":"2020-08-01T12:21:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-08-01T12:23:00Z" + }, + { + "type":"Property", + "value":85, + "observedAt":"2020-08-01T12:25:00Z" + }, + { + "type":"Property", + "value":105, + "observedAt":"2020-08-01T12:27:00Z" + }, + { + "type":"Property", + "value":120, + "observedAt":"2020-08-01T12:29:00Z" + }, + { + "type":"Property", + "value":125, + "observedAt":"2020-08-01T12:31:00Z" + }, + { + "type":"Property", + "value":130, + "observedAt":"2020-08-01T12:35:00Z" + } + ], + "fuelLevel":[ + { + "type":"Property", + "value":35, + "observedAt":"2020-08-01T14:20:00Z" + }, + { + "type":"Property", + "value":30, + "observedAt":"2020-08-01T15:05:00Z" + }, + { + "type":"Property", + "value":85, + "observedAt":"2020-08-01T15:07:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-08-01T15:20:00Z" + }, + { + "type":"Property", + "value":76, + "observedAt":"2020-08-01T16:05:00Z" + }, + { + "type":"Property", + "value":70, + "observedAt":"2020-08-01T17:07:00Z" + }, + { + "type":"Property", + "value":50, + "observedAt":"2020-08-01T18:03:00Z" + }, + { + "type":"Property", + "value":48, + "observedAt":"2020-08-01T19:05:00Z" + }, + { + "type":"Property", + "value":40, + "observedAt":"2020-08-01T19:07:00Z" + }, + { + "type":"Property", + "value":35, + "observedAt":"2020-08-01T20:05:00Z" + }, + { + "type":"Property", + "value":31, + "observedAt":"2020-08-01T20:07:00Z" + }, + { + "type":"Property", + "value":28, + "observedAt":"2020-08-01T21:03:00Z" + }, + { + "type":"Property", + "value":24, + "observedAt":"2020-08-01T21:05:00Z" + }, + { + "type":"Property", + "value":19, + "observedAt":"2020-08-01T22:07:00Z" + } + ] + }, + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":{ + "type":"Property", + "value":"BMW" + }, + "speed":[ + { + "type":"Property", + "value":120, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-09-01T12:05:00Z" + }, + { + "type":"Property", + "value":100, + "observedAt":"2020-09-01T12:07:00Z" + } + ], + "fuelLevel":[ + { + "type":"Property", + "value":67, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":53, + "observedAt":"2020-09-01T13:05:00Z" + }, + { + "type":"Property", + "value":40, + "observedAt":"2020-09-01T14:07:00Z" + } + ] + } +] \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicles-temporal-representation-021-04-expectation.jsonld b/data/temporalEntities/expectations/vehicles-temporal-representation-021-04-expectation.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..fdbbaea536c2f5fce7f6bf3cef002bfc145a1ef9 --- /dev/null +++ b/data/temporalEntities/expectations/vehicles-temporal-representation-021-04-expectation.jsonld @@ -0,0 +1,86 @@ +[ + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":{ + "type":"Property", + "value":"Volvo" + }, + "fuelLevel":[ + { + "type":"Property", + "value":67, + "observedAt":"2020-08-01T12:03:00Z" + }, + { + "type":"Property", + "value":53, + "observedAt":"2020-08-01T13:05:00Z" + }, + { + "type":"Property", + "value":40, + "observedAt":"2020-08-01T14:07:00Z" + } + ], + "speed":[ + { + "type":"Property", + "value":120, + "observedAt":"2020-08-01T12:03:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-08-01T12:05:00Z" + }, + { + "type":"Property", + "value":100, + "observedAt":"2020-08-01T12:07:00Z" + } + ] + }, + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":{ + "type":"Property", + "value":"BMW" + }, + "fuelLevel":[ + { + "type":"Property", + "value":53, + "observedAt":"2020-09-01T13:05:00Z" + }, + { + "type":"Property", + "value":67, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":40, + "observedAt":"2020-09-01T14:07:00Z" + } + ], + "speed":[ + { + "type":"Property", + "value":120, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-09-01T12:05:00Z" + }, + { + "type":"Property", + "value":100, + "observedAt":"2020-09-01T12:07:00Z" + } + ] + } +] \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicles-temporal-representation-021-05-expectation.jsonld b/data/temporalEntities/expectations/vehicles-temporal-representation-021-05-expectation.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..7043d27cbdca07a49a3892375246e52cdbff3d52 --- /dev/null +++ b/data/temporalEntities/expectations/vehicles-temporal-representation-021-05-expectation.jsonld @@ -0,0 +1,86 @@ +[ + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":{ + "type":"Property", + "value":"Volvo" + }, + "fuelLevel":[ + { + "type":"Property", + "value":40, + "observedAt":"2020-08-01T14:07:00Z" + }, + { + "type":"Property", + "value":67, + "observedAt":"2020-08-01T12:03:00Z" + }, + { + "type":"Property", + "value":53, + "observedAt":"2020-08-01T13:05:00Z" + } + ], + "speed":[ + { + "type":"Property", + "value":100, + "observedAt":"2020-08-01T12:07:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-08-01T12:05:00Z" + }, + { + "type":"Property", + "value":120, + "observedAt":"2020-08-01T12:03:00Z" + } + ] + }, + { + "id":"urn:ngsi-ld:Bus:randomUUID", + "type":"Bus", + "brandName":{ + "type":"Property", + "value":"Mercedes" + }, + "fuelLevel":[ + { + "type":"Property", + "value":210, + "observedAt":"2020-08-01T12:03:00Z" + }, + { + "type":"Property", + "value":145, + "observedAt":"2020-08-01T13:05:00Z" + }, + { + "type":"Property", + "value":124, + "observedAt":"2020-08-01T14:07:00Z" + } + ], + "speed":[ + { + "type":"Property", + "value":45, + "observedAt":"2020-08-01T12:03:00Z" + }, + { + "type":"Property", + "value":25, + "observedAt":"2020-08-01T12:05:00Z" + }, + { + "type":"Property", + "value":67, + "observedAt":"2020-08-01T12:07:00Z" + } + ] + } +] \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicles-temporal-representation-021-06-expectation.jsonld b/data/temporalEntities/expectations/vehicles-temporal-representation-021-06-expectation.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..c5cd1101ec21eb43a542347048d76322347ef742 --- /dev/null +++ b/data/temporalEntities/expectations/vehicles-temporal-representation-021-06-expectation.jsonld @@ -0,0 +1,44 @@ +[ + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":{ + "type":"Property", + "value":"Volvo" + }, + "fuelLevel":[ + { + "type":"Property", + "value":40, + "observedAt":"2020-08-01T14:07:00Z" + }, + { + "type":"Property", + "value":67, + "observedAt":"2020-08-01T12:03:00Z" + }, + { + "type":"Property", + "value":53, + "observedAt":"2020-08-01T13:05:00Z" + } + ], + "speed":[ + { + "type":"Property", + "value":100, + "observedAt":"2020-08-01T12:07:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-08-01T12:05:00Z" + }, + { + "type":"Property", + "value":120, + "observedAt":"2020-08-01T12:03:00Z" + } + ] + } +] \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicles-temporal-representation-021-07-expectation.jsonld b/data/temporalEntities/expectations/vehicles-temporal-representation-021-07-expectation.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..fdbbaea536c2f5fce7f6bf3cef002bfc145a1ef9 --- /dev/null +++ b/data/temporalEntities/expectations/vehicles-temporal-representation-021-07-expectation.jsonld @@ -0,0 +1,86 @@ +[ + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":{ + "type":"Property", + "value":"Volvo" + }, + "fuelLevel":[ + { + "type":"Property", + "value":67, + "observedAt":"2020-08-01T12:03:00Z" + }, + { + "type":"Property", + "value":53, + "observedAt":"2020-08-01T13:05:00Z" + }, + { + "type":"Property", + "value":40, + "observedAt":"2020-08-01T14:07:00Z" + } + ], + "speed":[ + { + "type":"Property", + "value":120, + "observedAt":"2020-08-01T12:03:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-08-01T12:05:00Z" + }, + { + "type":"Property", + "value":100, + "observedAt":"2020-08-01T12:07:00Z" + } + ] + }, + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":{ + "type":"Property", + "value":"BMW" + }, + "fuelLevel":[ + { + "type":"Property", + "value":53, + "observedAt":"2020-09-01T13:05:00Z" + }, + { + "type":"Property", + "value":67, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":40, + "observedAt":"2020-09-01T14:07:00Z" + } + ], + "speed":[ + { + "type":"Property", + "value":120, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":80, + "observedAt":"2020-09-01T12:05:00Z" + }, + { + "type":"Property", + "value":100, + "observedAt":"2020-09-01T12:07:00Z" + } + ] + } +] \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicles-temporal-representation-021-08-expectation.jsonld b/data/temporalEntities/expectations/vehicles-temporal-representation-021-08-expectation.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..1923befafa3050ac182261f1a921a67365041487 --- /dev/null +++ b/data/temporalEntities/expectations/vehicles-temporal-representation-021-08-expectation.jsonld @@ -0,0 +1,76 @@ +[ + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":{ + "type":"Property", + "value":"Volvo" + }, + "fuelLevel":[ + { + "type":"Property", + "value":67, + "observedAt":"2020-08-01T12:03:00Z" + }, + { + "type":"Property", + "value":53, + "observedAt":"2020-08-01T13:05:00Z" + }, + { + "type":"Property", + "value":40, + "observedAt":"2020-08-01T14:07:00Z" + } + ], + "speed":[ + { + "type":"Property", + "value":120, + "observedAt":"2020-08-01T12:03:00Z" + }, + { + "type":"Property", + "value":100, + "observedAt":"2020-08-01T12:07:00Z" + } + ] + }, + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":{ + "type":"Property", + "value":"BMW" + }, + "fuelLevel":[ + { + "type":"Property", + "value":53, + "observedAt":"2020-09-01T13:05:00Z" + }, + { + "type":"Property", + "value":67, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":40, + "observedAt":"2020-09-01T14:07:00Z" + } + ], + "speed":[ + { + "type":"Property", + "value":120, + "observedAt":"2020-09-01T12:03:00Z" + }, + { + "type":"Property", + "value":100, + "observedAt":"2020-09-01T12:07:00Z" + } + ] + } +] \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicles-temporal-representation-021-09-01-expectation.jsonld b/data/temporalEntities/expectations/vehicles-temporal-representation-021-09-01-expectation.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..fc6f36e2b08c3055c9f400b46b040b1447b95b72 --- /dev/null +++ b/data/temporalEntities/expectations/vehicles-temporal-representation-021-09-01-expectation.jsonld @@ -0,0 +1,54 @@ +[ + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":{ + "type":"Property", + "value":"Audi" + }, + "speed":[ + { + "type":"Property", + "value":150, + "observedAt":"2020-10-01T12:03:00Z" + }, + { + "type":"Property", + "value":90, + "observedAt":"2020-10-01T12:05:00Z" + }, + { + "type":"Property", + "value":127, + "observedAt":"2020-10-01T12:07:00Z" + } + ], + "fuelLevel":[ + { + "type":"Property", + "value":89, + "observedAt":"2020-10-01T12:03:00Z" + }, + { + "type":"Property", + "value":78, + "observedAt":"2020-10-01T13:05:00Z" + }, + { + "type":"Property", + "value":62, + "observedAt":"2020-10-01T14:07:00Z" + } + ], + "location":[ + { + "type":"Point", + "coordinates":[ + -8.5, + 41.2 + ], + "observedAt":"2020-10-01T12:03:00Z" + } + ] + } +] \ No newline at end of file diff --git a/data/temporalEntities/expectations/vehicles-temporal-representation-021-09-02-expectation.jsonld b/data/temporalEntities/expectations/vehicles-temporal-representation-021-09-02-expectation.jsonld new file mode 100644 index 0000000000000000000000000000000000000000..8d6466fc74e7a62e0097bb1fad402ea4623e79f2 --- /dev/null +++ b/data/temporalEntities/expectations/vehicles-temporal-representation-021-09-02-expectation.jsonld @@ -0,0 +1,62 @@ +[ + { + "id":"urn:ngsi-ld:Vehicle:randomUUID", + "type":"Vehicle", + "brandName":{ + "type":"Property", + "value":"Audi" + }, + "speed":[ + { + "type":"Property", + "value":150, + "observedAt":"2020-10-01T12:03:00Z" + }, + { + "type":"Property", + "value":90, + "observedAt":"2020-10-01T12:05:00Z" + }, + { + "type":"Property", + "value":127, + "observedAt":"2020-10-01T12:07:00Z" + } + ], + "fuelLevel":[ + { + "type":"Property", + "value":89, + "observedAt":"2020-10-01T12:03:00Z" + }, + { + "type":"Property", + "value":78, + "observedAt":"2020-10-01T13:05:00Z" + }, + { + "type":"Property", + "value":62, + "observedAt":"2020-10-01T14:07:00Z" + } + ], + "location":[ + { + "type":"Point", + "coordinates":[ + -8.5, + 41.2 + ], + "observedAt":"2020-10-01T12:03:00Z" + }, + { + "type":"Point", + "coordinates":[ + -8.45, + 41.22 + ], + "observedAt":"2020-10-01T12:05:00Z" + } + ] + } +] \ No newline at end of file diff --git a/resources/ApiUtils.resource b/resources/ApiUtils.resource index 1373360092e8964e358d75f12dac23b398e7b22b..28d925192000fa658b4a719de3f9b4e2d3617dc9 100644 --- a/resources/ApiUtils.resource +++ b/resources/ApiUtils.resource @@ -148,6 +148,32 @@ Retrieve Temporal Representation Of Entity Output response Set Test Variable ${response} +Query Temporal Representation Of Entities + [Arguments] ${context}=${EMPTY} ${entity_types}=${EMPTY} ${entity_ids}=${EMPTY} ${entity_id_pattern}=${EMPTY} ${ngsild_query}=${EMPTY} ${georel}=${EMPTY} ${geometry}=${EMPTY} ${coordinates}=${EMPTY} ${geoproperty}=${EMPTY} ${timerel}=${EMPTY} ${timeAt}=${EMPTY} ${attrs}=${EMPTY} ${lastN}=${EMPTY} + ${entity_types_length} = Get Length ${entity_types} + ${entity_ids_length} = Get Length ${entity_ids} + ${attrs_length} = Get Length ${attrs} + &{headers}= Create Dictionary + &{params}= Create Dictionary + Run Keyword If '${context}'!='' Set To Dictionary ${headers} Link=<${context}>; rel="http://www.w3.org/ns/json-ld#context";type="application/ld+json" + Run Keyword If ${entity_types_length}>0 Set To Dictionary ${params} type=${entity_types} + Run Keyword If ${entity_ids_length}>0 Set To Dictionary ${params} id=${entity_ids} + Run Keyword If '${timerel}'!='' Set To Dictionary ${params} timerel=${timerel} + Run Keyword If '${timeAt}'!='' Set To Dictionary ${params} timeAt=${timeAt} + Run Keyword If ${attrs_length}>0 Set To Dictionary ${params} attrs=${attrs} + Run Keyword If '${lastN}'!='' Set To Dictionary ${params} lastN=${lastN} + Run Keyword If '${entity_id_pattern}'!='' Set To Dictionary ${params} idPattern=${entity_id_pattern} + Run Keyword If '${ngsild_query}'!='' Set To Dictionary ${params} q=${ngsild_query} + Run Keyword If '${georel}'!='' Set To Dictionary ${params} georel=${georel} + Run Keyword If '${geometry}'!='' Set To Dictionary ${params} geometry=${geometry} + Run Keyword If '${coordinates}'!='' Set To Dictionary ${params} coordinates=${coordinates} + Run Keyword If '${geoproperty}'!='' Set To Dictionary ${params} geoproperty=${geoproperty} + + ${response}= GET ${TEMPORAL_ENTITIES_ENDPOINT_PATH} headers=${headers} query=${params} + Output request + Output response + Set Test Variable ${response} + Delete Temporal Representation Of Entity [Arguments] ${temporal_entity_representation_id} diff --git a/resources/AssertionUtils.resource b/resources/AssertionUtils.resource index 0b31186ac60e426afad6d4e6f4342992c620fa76..ef5d6446c20dffbeb3b9d78f68891b2239dbd3ae 100644 --- a/resources/AssertionUtils.resource +++ b/resources/AssertionUtils.resource @@ -45,6 +45,17 @@ Check Response Body Containing EntityTemporal element ${comparaison_result}= Compare Dictionaries Ignoring Keys ${response['body']} ${temporal_entity_representation} ${instance_id_regex_expr} Should Be True ${comparaison_result} msg=EntityTemporal Comparaison Failed +Check Response Body Containing List Containing EntityTemporal elements + [Arguments] ${filename} ${temporal_entities_representation_ids} + ${temporal_entities_representation_payload}= Load Json From File ${EXECDIR}/data/temporalEntities/expectations/${filename} + ${index}= Set Variable 0 + FOR ${temporal_entity_representation_id} IN @{temporal_entities_representation_ids} + ${temporal_entities_representation_payload}= Update Value To Json ${temporal_entities_representation_payload} $.[${index}]..id ${temporal_entity_representation_id} + ${index}= Evaluate ${index} + 1 + END + ${comparaison_result}= Compare Dictionaries Ignoring Keys ${response['body']} ${temporal_entities_representation_payload} ${instance_id_regex_expr} + Should Be True ${comparaison_result} msg=EntityTemporal List Comparaison Failed + Check Response Body Containing ProblemDetails Element Containing Type Element set to [Arguments] ${response} ${type} Should Be Equal ${response['body']['type']} ${type}