Commit de62a1f9 authored by Elian Kraja's avatar Elian Kraja
Browse files

Fix issue #42

parent 47cd8716
Loading
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -24,11 +24,15 @@ Check HTTP Response Body Json Schema Is
Should Be Present In Json List
    [Arguments]     ${expr}   ${json_field}   ${json_value}
    Log    Check if ${json_field} is present in ${expr} with the value ${json_value}
    :FOR  ${item}  IN  @{expr}
    \  ${are_equal}=    Should Be Equal As Strings    ${item["${json_field}"]}    ${json_value}
    \  Exit For Loop If    ${are_equal}
    Log    Item found ${item}
    [return]    ${item}
    ${result}=    Run Keyword And Return    Should Be Equal As Strings    ${json_value}    ${expr['${json_field}']}   
    [return]   ${result}

    #:FOR  ${item}  IN  @{expr}
    #\  Log	${item}
    #${are_equal}=    Should Be Equal As Strings    ${expr['${item}']}    ${json_value}
    #\  Exit For Loop If    ${are_equal}
    #Log    Item found ${item}
    #[return]    ${item}
    
Should Be Present In Json
    [Arguments]     ${expr}   ${json_field}   ${json_value}
+9 −7
Original line number Diff line number Diff line
@@ -3,15 +3,17 @@
    "clientCorrelator": "0123",
    "callbackReference": {
      "callbackData": "1234",
      "notifyURL": "http://clientApp.example.com/location_notifications/123456"
      "notifyURL": "http://my.callback.com/location-area-circle/some-id"
    },
    "address": "acr:10.0.0.1",
    "address": [
      "10.100.0.4"
    ],
    "checkImmediate": true,
    "enteringLeavingCriteria": "Entering",
    "frequency": 10,
    "latitude": -80.88,
    "longitude": 41.277,
    "radius": 500,
    "frequency": 1,
    "latitude": 43.748993,
    "longitude": 7.437573,
    "radius": 200,
    "trackingAccuracy": 10
  }
}
+5 −3
Original line number Diff line number Diff line
@@ -3,9 +3,11 @@
    "clientCorrelator": "0123",
    "callback": {
      "callbackData": "1234",
      "notifyURL": "http://clientApp.example.com/location_notifications/123456"
      "notifyURL": "http://my.callback.com/location-area-circle/some-id"
    },
    "address": "acr:10.0.0.1",
    "address": [
	"10.0.0.1"
    ],
    "checkImmediate": true,
    "enteringLeavingCriteria": "Entering",
    "frequency": 10,
+7 −7
Original line number Diff line number Diff line
*** Variables ***
# Generic variables
${SCHEMA}                   http
${HOST}                     10.192.2.172
${PORT}                     8081
${SCHEMA}                   https
${HOST}                     try-mec.etsi.org
${PORT}                     443
${response}                         {}
${TOKEN}                            Basic YWxhZGRpbjpvcGVuc2VzYW1l
${apiRoot}        
${apiRoot}        /sbx5v4kyww/mep1
${apiName}        location
${apiVersion}     v2

# Specific variables
${LOC_QRY_UE_ADDRESS}        acr:10.0.0.1
${LOC_QRY_UE_LAT}            -80.86302
${LOC_QRY_UE_LONG}           41.277306
${LOC_QRY_UE_ADDRESS}        10.100.0.2
${LOC_QRY_UE_LAT}            43.731823
${LOC_QRY_UE_LONG}           7.426449
+20 −15
Original line number Diff line number Diff line
{
  "distanceNotificationSubscription": {
    "clientCorrelator": "0123",
    "callbackReference": {
      "callbackData": "1234",
			"notifyURL": "http://application.example.com/notifications/distance_notifications/123456"
      "notifyURL": "http://my.callback.com/location-area-circle/some-id"
    },
		"checkImmediate": "true",
		"clientCorrelator": "0123",
    "monitoredAddress": [
      "10.10.0.1",
      "10.1.0.1"
    ],
    "checkImmediate": true,
    "criteria": "AllWithinDistance",
		"distance": "100",
		"frequency": "10",
		"monitoredAddress": ["acr:10.0.0.1", "acr:10.0.0.2"],
		"referenceAddress": "acr:10.0.0.3",
		"trackingAccuracy": "10"
    "distance": 100,
    "frequency": 10,
    "referenceAddress": [
      "10.100.0.1"
    ],
    "trackingAccuracy": 10
  }
}
Loading