Commit 67da27cd authored by thomas Bousselin's avatar thomas Bousselin
Browse files

feat: avoid Should be equal

parent f95c2d21
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -98,8 +98,6 @@ Setup Initial Context Source Registrations
    Compose IOP Configuration    ${first_configuration}

Delete Entities And Delete Registrations
    Delete Context Source Registration With Return    ${registration_id1}    broker_url=${broker_A_url}
    Delete Context Source Registration With Return    ${registration_id2}    broker_url=${broker_A_url}
    Delete Entity    ${first_entity_id}    broker_url=${broker_B_url}
    Delete Entity    ${second_entity_id}    broker_url=${broker_B_url}
    Delete Entity    ${second_entity_id}    broker_url=${broker_C_url}
    @{broker_count}=    Create List    ${broker_A_url}    ${broker_B_url}    ${broker_C_url}
    @{entities_to_delete}=    Create List    ${first_entity_id}    ${second_entity_id}
    Delete Registrations And Entities    ${broker_count}    ${entities_to_delete}
+2 −2
Original line number Diff line number Diff line
@@ -52,14 +52,14 @@ IOP_003_02_01 Query Entities Of Type OffstreetParking Via GET
    Remove From Dictionary    ${first_expected}    @context    name
    Set To Dictionary    ${first_expected}    location=${first_location_source}[location]
    ${first_entity}=    Get Value From JSON    ${response.json()}    $[?(@.id=='${first_entity_id}')]
    Should Be Equal    ${first_entity}[0]    ${first_expected}
    Check Resource Set To    ${first_expected}    ${first_entity}[0]

    ${second_expected}=    Load Entity    ${second_entity_no_location_payload_filename}    ${second_entity_id}
    ${second_location_source}=    Load Entity    ${location_name_payload_filename}    ${second_entity_id}
    Remove From Dictionary    ${second_expected}    @context    name
    Set To Dictionary    ${second_expected}    location=${second_location_source}[location]
    ${second_entity}=    Get Value From JSON    ${response.json()}    $[?(@.id=='${second_entity_id}')]
    Should Be Equal    ${second_entity}[0]    ${second_expected}
    Check Resource Set To    ${second_expected}    ${second_entity}[0]


*** Keywords ***
+4 −4
Original line number Diff line number Diff line
@@ -60,24 +60,24 @@ IOP_003_02_02 Query Entities Of Type OffstreetParking And Vehicle With Attrs
    ...    ${first_parking_entity_id}
    Keep In Dictionary    ${first_parking_expected}    id    type    location
    ${first_parking}=    Get Value From JSON    ${response.json()}    $[?(@.id=='${first_parking_entity_id}')]
    Should Be Equal    ${first_parking}[0]    ${first_parking_expected}
    Check Resource Set To    ${first_parking_expected}    ${first_parking}[0]

    ${second_parking_expected}=    Load Entity
    ...    ${second_parking_location_name_payload_filename}
    ...    ${second_parking_entity_id}
    Keep In Dictionary    ${second_parking_expected}    id    type    location
    ${second_parking}=    Get Value From JSON    ${response.json()}    $[?(@.id=='${second_parking_entity_id}')]
    Should Be Equal    ${second_parking}[0]    ${second_parking_expected}
    Check Resource Set To    ${second_parking_expected}    ${second_parking}[0]

    ${first_vehicle_expected}=    Load Entity    ${first_vehicle_payload_filename}    ${first_vehicle_entity_id}
    Keep In Dictionary    ${first_vehicle_expected}    id    type    location
    ${first_vehicle}=    Get Value From JSON    ${response.json()}    $[?(@.id=='${first_vehicle_entity_id}')]
    Should Be Equal    ${first_vehicle}[0]    ${first_vehicle_expected}
    Check Resource Set To    ${first_vehicle_expected}    ${first_vehicle}[0]

    ${second_vehicle_expected}=    Load Entity    ${second_vehicle_payload_filename}    ${second_vehicle_entity_id}
    Keep In Dictionary    ${second_vehicle_expected}    id    type    location
    ${second_vehicle}=    Get Value From JSON    ${response.json()}    $[?(@.id=='${second_vehicle_entity_id}')]
    Should Be Equal    ${second_vehicle}[0]    ${second_vehicle_expected}
    Check Resource Set To    ${second_vehicle_expected}    ${second_vehicle}[0]


*** Keywords ***
+2 −2
Original line number Diff line number Diff line
@@ -55,12 +55,12 @@ IOP_003_03_01 Query Entities Of Type OffstreetParking Via GET
    ...    availableSpotsNumber=${latest_attribute_source}[availableSpotsNumber]
    Remove From Dictionary    ${first_expected}    @context
    ${first_entity}=    Get Value From JSON    ${response.json()}    $[?(@.id=='${first_entity_id}')]
    Should Be Equal    ${first_entity}[0]    ${first_expected}
    Check Resource Set To    ${first_expected}    ${first_entity}[0]

    ${second_expected}=    Load Entity    ${offstreet_no_location_payload_filename}    ${second_entity_id}
    Remove From Dictionary    ${second_expected}    @context
    ${second_entity}=    Get Value From JSON    ${response.json()}    $[?(@.id=='${second_entity_id}')]
    Should Be Equal    ${second_entity}[0]    ${second_expected}
    Check Resource Set To    ${second_expected}    ${second_entity}[0]


*** Keywords ***
+4 −4
Original line number Diff line number Diff line
@@ -57,24 +57,24 @@ IOP_003_03_02 Query Entities Of Type OffstreetParking And Vehicle With Attrs
    ...    ${first_parking_entity_id}
    Keep In Dictionary    ${first_parking_expected}    id    type    location
    ${first_parking}=    Get Value From JSON    ${response.json()}    $[?(@.id=='${first_parking_entity_id}')]
    Should Be Equal    ${first_parking}[0]    ${first_parking_expected}
    Check Resource Set To    ${first_parking_expected}    ${first_parking}[0]

    ${second_parking_expected}=    Load Entity
    ...    ${second_full_offstreet_payload_filename}
    ...    ${second_parking_entity_id}
    Keep In Dictionary    ${second_parking_expected}    id    type    location
    ${second_parking}=    Get Value From JSON    ${response.json()}    $[?(@.id=='${second_parking_entity_id}')]
    Should Be Equal    ${second_parking}[0]    ${second_parking_expected}
    Check Resource Set To    ${second_parking_expected}    ${second_parking}[0]

    ${first_vehicle_expected}=    Load Entity    ${first_vehicle_payload_filename}    ${first_vehicle_entity_id}
    Keep In Dictionary    ${first_vehicle_expected}    id    type    location
    ${first_vehicle}=    Get Value From JSON    ${response.json()}    $[?(@.id=='${first_vehicle_entity_id}')]
    Should Be Equal    ${first_vehicle}[0]    ${first_vehicle_expected}
    Check Resource Set To    ${first_vehicle_expected}    ${first_vehicle}[0]

    ${second_vehicle_expected}=    Load Entity    ${second_vehicle_payload_filename}    ${second_vehicle_entity_id}
    Keep In Dictionary    ${second_vehicle_expected}    id    type    location
    ${second_vehicle}=    Get Value From JSON    ${response.json()}    $[?(@.id=='${second_vehicle_entity_id}')]
    Should Be Equal    ${second_vehicle}[0]    ${second_vehicle_expected}
    Check Resource Set To    ${second_vehicle_expected}    ${second_vehicle}[0]


*** Keywords ***
Loading