Commit bef6f1d9 authored by Marco Cavalli's avatar Marco Cavalli
Browse files
parents 21b65d1c 5860f7fe
Loading
Loading
Loading
Loading
+13 −10
Original line number Diff line number Diff line
@@ -34,7 +34,10 @@ ${parking_entity_type}= https://ngsi-ld-test-suite/context#OffStreetParking
    ...    accept=${CONTENT_TYPE_GEOJSON}
    ...    context=${ngsild_test_suite_context}
    Check Response Status Code    200    ${response.status_code}
    ${alternatives}=	Create List	${expectation_filename}	${expectation_filename_alt1}	${expectation_filename_alt2}
    ${alternatives}=    Create List
    ...    ${expectation_filename}
    ...    ${expectation_filename_alt1}
    ...    ${expectation_filename_alt2}
    Check Body With Alternatives
    ...    response_body=${response.json()}
    ...    alternatives=${alternatives}
+11 −8
Original line number Diff line number Diff line
@@ -32,13 +32,16 @@ ${entity_type}= https://ngsi-ld-test-suite/context#Building
    ...    accept=${CONTENT_TYPE_GEOJSON}
    ...    context=${ngsild_test_suite_context}


    Check Response Status Code    200    ${response.status_code}
    ${alternatives}=	Create List	${expectation_filename}	${expectation_filename_alt1}	${expectation_filename_alt2}
    ${alternatives}=    Create List
    ...    ${expectation_filename}
    ...    ${expectation_filename_alt1}
    ...    ${expectation_filename_alt2}
    Check Body With Alternatives
    ...    response_body=${response.json()}
    ...    alternatives=${alternatives}


*** Keywords ***
Create Initial Entities
    ${first_entity_id}=    Catenate    ${building_id_prefix}019-05-01
+2 −2
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@ Resource ${EXECDIR}/resources/ApiUtils/ContextInformationConsumption.
Resource            ${EXECDIR}/resources/AssertionUtils.resource
Resource            ${EXECDIR}/resources/JsonUtils.resource

Test Setup          Create Entity
Test Setup          Create Initial Entity
Test Teardown       Delete Created Entity


@@ -35,7 +35,7 @@ ${options_parameter}= keyValues


*** Keywords ***
Create Entity
Create Initial Entity
    ${entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    Set Test Variable    ${entity_id}
    ${create_response}=    Create Entity Selecting Content Type
+7 −6
Original line number Diff line number Diff line
@@ -22,13 +22,14 @@ Batch Merge Entity With Invalid Request Scenarios
    Check Response Status Code    ${expected_status_code}    ${response.status_code}
    IF    '${expected_status_code}'=='400'
        Check Response Body Containing ProblemDetails Element Containing Type Element set to
        ...    ${response.json()}
        ...    ${problem_type}
        Check Response Body Containing ProblemDetails Element Containing Title Element    ${response.json()}
        ...    response_body=${response.json()}
        ...    type=${problem_type}
        Check Response Body Containing ProblemDetails Element Containing Title Element
        ...    response_body=${response.json()}
    ELSE
        Check Response Body Containing ProblemDetails Element Containing Type Element set to
        ...    ${response.json()['errors'][0]['error']}
        ...    ${problem_type}
        ...    response_body=${response.json()['errors'][0]['error']}
        ...    type=${problem_type}
        Check Response Body Containing ProblemDetails Element Containing Title Element
        ...    ${response.json()['errors'][0]['error']}
        ...    response_body=${response.json()['errors'][0]['error']}
    END
+7 −6
Original line number Diff line number Diff line
@@ -24,13 +24,14 @@ Batch Update Entity With Invalid Request Scenarios
    Check Response Status Code    ${expected_status_code}    ${response.status_code}
    IF    '${expected_status_code}'=='400'
        Check Response Body Containing ProblemDetails Element Containing Type Element set to
        ...    ${response.json()}
        ...    ${problem_type}
        Check Response Body Containing ProblemDetails Element Containing Title Element    ${response.json()}
        ...    response_body=${response.json()}
        ...    type=${problem_type}
        Check Response Body Containing ProblemDetails Element Containing Title Element
        ...    response_body=${response.json()}
    ELSE
        Check Response Body Containing ProblemDetails Element Containing Type Element set to
        ...    ${response.json()['errors'][0]['error']}
        ...    ${problem_type}
        ...    response_body=${response.json()['errors'][0]['error']}
        ...    type=${problem_type}
        Check Response Body Containing ProblemDetails Element Containing Title Element
        ...    ${response.json()['errors'][0]['error']}
        ...    response_body=${response.json()['errors'][0]['error']}
    END
Loading