Commit 59e3f774 authored by Benoit Orihuela's avatar Benoit Orihuela
Browse files

refactor: isolate and check setup steps

parent 9200f0c0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -30,11 +30,12 @@ ${filename}= building-simple-attributes-sample.json
*** Keywords ***
Setup Initial Entity
    ${entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    Create Entity Selecting Content Type
    ${create_response}=    Create Entity Selecting Content Type
    ...    ${filename}
    ...    ${entity_id}
    ...    ${CONTENT_TYPE_JSON}
    ...    ${ngsild_test_suite_context}
    Check Response Status Code    201    ${create_response.status_code}
    Set Suite Variable    ${entity_id}

Delete Initial Entity
+2 −1
Original line number Diff line number Diff line
@@ -28,11 +28,12 @@ ${expectation_file}= types/expectations/attribute-027-01-expectation.json
*** Keywords ***
Setup Initial Entity
    ${entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    Create Entity Selecting Content Type
    ${create_response}=    Create Entity Selecting Content Type
    ...    ${filename}
    ...    ${entity_id}
    ...    ${CONTENT_TYPE_JSON}
    ...    ${ngsild_test_suite_context}
    Check Response Status Code    201    ${create_response.status_code}
    Set Suite Variable    ${entity_id}

Delete Initial Entity
+2 −1
Original line number Diff line number Diff line
@@ -36,11 +36,12 @@ Retrieve Available Attributes

Setup Initial Entity
    ${entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    Create Entity Selecting Content Type
    ${create_response}=    Create Entity Selecting Content Type
    ...    ${filename}
    ...    ${entity_id}
    ...    ${CONTENT_TYPE_JSON}
    ...    ${ngsild_test_suite_context}
    Check Response Status Code    201    ${create_response.status_code}
    Set Test Variable    ${entity_id}

Delete Initial Entity
+5 −3
Original line number Diff line number Diff line
@@ -31,17 +31,19 @@ ${filename}= building-simple-attributes-sample.json
Setup Initial Entities
    ${first_entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    ${second_entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    Create Entity Selecting Content Type
    ${create_response1}=    Create Entity Selecting Content Type
    ...    ${filename}
    ...    ${first_entity_id}
    ...    ${CONTENT_TYPE_JSON}
    ...    ${ngsild_test_suite_context}
    Create Entity Selecting Content Type
    Check Response Status Code    201    ${create_response1.status_code}
    Set Suite Variable    ${first_entity_id}
    ${create_response2}=    Create Entity Selecting Content Type
    ...    ${filename}
    ...    ${second_entity_id}
    ...    ${CONTENT_TYPE_JSON}
    ...    ${ngsild_test_suite_context}
    Set Suite Variable    ${first_entity_id}
    Check Response Status Code    201    ${create_response2.status_code}
    Set Suite Variable    ${second_entity_id}

Delete Initial Entities
+5 −3
Original line number Diff line number Diff line
@@ -29,17 +29,19 @@ ${expectation_file}= types/expectations/entity-type-info-024-01-expectati
Setup Initial Entities
    ${first_entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    ${second_entity_id}=    Generate Random Entity Id    ${building_id_prefix}
    Create Entity Selecting Content Type
    ${create_response1}=    Create Entity Selecting Content Type
    ...    ${filename}
    ...    ${first_entity_id}
    ...    ${CONTENT_TYPE_JSON}
    ...    ${ngsild_test_suite_context}
    Create Entity Selecting Content Type
    Check Response Status Code    201    ${create_response1.status_code}
    Set Suite Variable    ${first_entity_id}
    ${create_response2}=    Create Entity Selecting Content Type
    ...    ${filename}
    ...    ${second_entity_id}
    ...    ${CONTENT_TYPE_JSON}
    ...    ${ngsild_test_suite_context}
    Set Suite Variable    ${first_entity_id}
    Check Response Status Code    201    ${create_response2.status_code}
    Set Suite Variable    ${second_entity_id}

Delete Initial Entities
Loading