Commit 3acae903 authored by lopesg's avatar lopesg
Browse files

refactored some keywords

parent a824be12
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -7,6 +7,8 @@ Resource ${EXECDIR}/resources/JsonUtils.resource
*** Variable ***
${building_id_prefix}=  urn:ngsi-ld:Building:
${expected_error_message}=  Already exists.
${filename}=  building-minimal-sample.jsonld
${content_type}=  application/ld+json

*** Test Case ***
Create one valid entity and one invalid entity
@@ -14,13 +16,13 @@ Create one valid entity and one invalid entity
    [Tags]  mandatory

    ${entity_id}=     Generate Random Entity Id    ${building_id_prefix}
    
    Create Entity   building-minimal-sample.jsonld    ${entity_id}
    Create Entity Selecting Content Type   ${filename}    ${entity_id}    ${content_type}
    Check Response Status Code Set To  201

    #creating entity with the same id
    Create Entity   building-minimal-sample.jsonld    ${entity_id}
    Create Entity Selecting Content Type   ${filename}    ${entity_id}    ${content_type}
    Check Response Status Code Set To  409
    Check Response Body Details Containing Information Error  ${expected_error_message}

    [Teardown]    Delete Entity by Id       ${entity_id}
+0 −1
Original line number Diff line number Diff line
@@ -91,7 +91,6 @@ Create Entity
    ${response}=  POST  ${ENTITIES_ENDPOINT_PATH}  body=${entity}  headers=${headers}
    Output  request
    Output  response
    Set Test Variable  ${response}

Batch Create Entities
    [Arguments]  @{entities_to_be_created}      ${content_type}=${CONTENT_TYPE_LD_JSON}     ${context}=${EMPTY}