Commit f96fc52d authored by Houcem Kacem's avatar Houcem Kacem
Browse files

feat: add tp 020_04

parent fd464839
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ Retrieve the temporal evolution of an entity matching the given NGSI-LD temporal
    [Documentation]  Check that you can retrieve the temporal evolution of an entity matching the given NGSI-LD temporal query
    [Tags]  mandatory

    Retrieve Temporal Representation Of Entity   ${temporal_entity_representation_id}   timerel=${timerel}      time=${time}    endTime=${endTime}
    Retrieve Temporal Representation Of Entity   ${temporal_entity_representation_id}   timerel=${timerel}      time=${time}    endTime=${endTime}  context=${ngsild_test_suite_context}
    
    Check Response Status Code Set To  200
    Check Response Body Containing EntityTemporal element       ${vehicle_expectation_file}    ${temporal_entity_representation_id}
+20 −0
Original line number Diff line number Diff line
{
   "id":"urn:ngsi-ld:Vehicle:randomUUID",
   "type":"Vehicle",
   "brandName":{
      "type":"Property",
      "value":"Volvo"
   },
   "fuelLevel":[
      {
         "type":"Property",
         "value":53,
         "observedAt":"2018-08-01T13:05:00Z"
      },
      {
         "type":"Property",
         "value":40,
         "observedAt":"2018-08-01T14:07:00Z"
      }
   ]
}
 No newline at end of file
+25 −0
Original line number Diff line number Diff line
{
   "id":"urn:ngsi-ld:Vehicle:randomUUID",
   "type":"Vehicle",
   "brandName":{
      "type":"Property",
      "value":"Volvo"
   },
   "fuelLevel":{
      "type":"Property",
      "value":67,
      "observedAt":"2018-08-01T12:03:00Z"
   },
   "speed":[
      {
         "type":"Property",
         "value":120,
         "observedAt":"2018-08-01T12:03:00Z"
      },
      {
         "type":"Property",
         "value":80,
         "observedAt":"2018-08-01T12:05:00Z"
      }
   ]
}
 No newline at end of file
+30 −0
Original line number Diff line number Diff line
{
   "id":"urn:ngsi-ld:Vehicle:randomUUID",
   "type":"Vehicle",
   "brandName":{
      "type":"Property",
      "value":"Volvo"
   },
   "fuelLevel":{
      "type":"Property",
      "value":67,
      "observedAt":"2018-08-01T12:03:00Z"
   },
   "speed":[
      {
         "type":"Property",
         "value":120,
         "observedAt":"2018-08-01T12:03:00Z"
      },
      {
         "type":"Property",
         "value":80,
         "observedAt":"2018-08-01T12:05:00Z"
      },
      {
         "type":"Property",
         "value":100,
         "observedAt":"2018-08-01T12:07:00Z"
      }
   ]
}
 No newline at end of file
+4 −1
Original line number Diff line number Diff line
@@ -109,7 +109,7 @@ Create Temporal Representation Of Entity
    Output  response

Retrieve Temporal Representation Of Entity
    [Arguments]  ${temporal_entity_representation_id}   ${attrs}=${EMPTY}      ${options}=${EMPTY}      ${context}=${EMPTY}
    [Arguments]  ${temporal_entity_representation_id}   ${attrs}=${EMPTY}      ${options}=${EMPTY}      ${context}=${EMPTY}     ${timerel}=${EMPTY}      ${time}=${EMPTY}    ${endTime}=${EMPTY}
    ${attrs_length} =  Get Length  ${attrs}
    ${options_length} =  Get Length  ${options}
    &{headers}=  Create Dictionary
@@ -118,6 +118,9 @@ Retrieve Temporal Representation Of Entity
    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     ${attrs_length}>0       Set To Dictionary   ${params}       attrs=${attrs}
    Run Keyword If     ${options_length}>0       Set To Dictionary   ${params}       options=${options}
    Run Keyword If     '${timerel}'!=''       Set To Dictionary   ${params}    timerel=${timerel}
    Run Keyword If     '${time}'!=''       Set To Dictionary   ${params}    time=${time}
    Run Keyword If     '${endTime}'!=''       Set To Dictionary   ${params}    endTime=${endTime}

    ${response}=  GET  ${TEMPORAL_ENTITIES_ENDPOINT_PATH}/${temporal_entity_representation_id}      headers=${headers}      query=${params}
    Output  request