Commit 177f3599 authored by kzangeli's avatar kzangeli
Browse files

fix(021_25, 021_08): the expectations of two temporal queries

- 021_25: an unfiltered local temporal query matches both vehicles, and the
  expectation lists only one. It gets an expectation of its own with both
  (vehicles-temporal-representation-021-25.jsonld), and the TC creates its
  vehicles with ids of its own, 021-25-A and 021-25-B, in the TC and in the
  expectation - it shared 021-06-A/B with 021_06 (#96)
- 021_08: the query is q=speed>90, and TS 104 175 clause 11.3.3.4 includes in
  the temporal representation only the Attribute instances "which meet the
  temporal, query and geoquery restrictions". The two speed instances with the
  value 80 are removed from the expectation; fuelLevel is not in the query, so
  its instances stay

Co-Authored-By: default avatarClaude Opus 5.5 <noreply@anthropic.com>
parent c4483a07
Loading
Loading
Loading
Loading
+3 −3
Changes for TP/NGSI-LD/ContextInformation/Consumption/TemporalEntity/QueryTemporalEvolutionOfEntities/021_25.robot: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ Suite Teardown Delete Initial Temporal Entities
*** Variables ***
${first_vehicle_payload_file}=      2020-08-vehicle-temporal-representation.jsonld
${second_vehicle_payload_file}=     2020-09-vehicle-temporal-representation.jsonld
${expectation_file}=                vehicles-temporal-representation-021-06.jsonld
${expectation_file}=                vehicles-temporal-representation-021-25.jsonld


*** Test Cases ***
@@ -36,13 +36,13 @@ ${expectation_file}= vehicles-temporal-representation-021-06.json

*** Keywords ***
Setup Initial Temporal Entities
    ${first_temporal_entity_representation_id}=    Catenate    ${VEHICLE_ID_PREFIX}021-06-A
    ${first_temporal_entity_representation_id}=    Catenate    ${VEHICLE_ID_PREFIX}021-25-A
    ${create_response1}=    Create Temporal Representation Of Entity
    ...    ${first_vehicle_payload_file}
    ...    ${first_temporal_entity_representation_id}
    Check Response Status Code    201    ${create_response1.status_code}
    Set Suite Variable    ${first_temporal_entity_representation_id}
    ${second_temporal_entity_representation_id}=    Catenate    ${VEHICLE_ID_PREFIX}021-06-B
    ${second_temporal_entity_representation_id}=    Catenate    ${VEHICLE_ID_PREFIX}021-25-B
    ${create_response2}=    Create Temporal Representation Of Entity
    ...    ${second_vehicle_payload_file}
    ...    ${second_temporal_entity_representation_id}
+0 −10
Changes for data/temporalEntities/expectations/vehicles-temporal-representation-021-08.jsonld: 0 added lines, 10 removed lines.
Original line number Diff line number Diff line
@@ -25,11 +25,6 @@
            "value":120,
            "observedAt":"2020-08-01T12:03:00Z"
         },
         {
             "type": "Property",
             "value": 80,
             "observedAt": "2020-08-01T12:05:00Z"
         },
         {
            "type":"Property",
            "value":100,
@@ -63,11 +58,6 @@
            "value":120,
            "observedAt":"2020-09-01T12:03:00Z"
         },
         {
             "type": "Property",
             "value": 80,
             "observedAt": "2020-09-01T12:05:00Z"
         },
         {
            "type":"Property",
            "value":100,
+78 −0
Changes for data/temporalEntities/expectations/vehicles-temporal-representation-021-25.jsonld: 78 added lines, 0 removed lines.
Original line number Diff line number Diff line
[
  {
    "id": "urn:ngsi-ld:Vehicle:021-25-A",
    "type": "Vehicle",
    "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:Vehicle:021-25-B",
    "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"
      }
    ],
    "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