Commit ff84262f authored by Patricia dos Santos Oliveira's avatar Patricia dos Santos Oliveira
Browse files

remove unused files and lines

parent d43c9c0a
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -10,11 +10,11 @@ Test Template Create Entity Scenarios
${building_id_prefix}=  urn:ngsi-ld:Building:

*** Test Cases ***                        FILENAME                                              CONTENT_TYPE
MinimalEntity                             building-minimal-without-context-sample.jsonld        application/json
EntityWithSimpleProperties                building-simple-attributes-sample.jsonld              application/ld+json
EntityWithRelationshipsProperties         building-relationship-of-property-sample.jsonld       application/ld+json
#EntityWithNoContext                       building-minimal-without-context-sample.jsonld        application/ld+json
EntityWithLocationAttribute               building-location-attribute.jsonld                    application/ld+json
001_01_MinimalEntity                             building-minimal-without-context-sample.jsonld        application/json
001_02_EntityWithSimpleProperties                building-simple-attributes-sample.jsonld              application/ld+json
001_03_EntityWithRelationshipsProperties         building-relationship-of-property-sample.jsonld       application/ld+json
#001_04_EntityWithNoContext                       building-minimal-without-context-sample.jsonld        application/ld+json
001_05_EntityWithLocationAttribute               building-location-attribute.jsonld                    application/ld+json



+2 −2
Original line number Diff line number Diff line
@@ -6,8 +6,8 @@ Resource ${EXECDIR}/resources/AssertionUtils.resource
Test Template  Create Entity With Invalid Request Scenarios

*** Test Cases ***                        FILENAME                              PROBLEM_TYPE                        EXPECTED_CODE
InvalidJson                               invalid-json-sample.jsonld            ${ERROR_TYPE_INVALID_REQUEST}       406
EmptyJson                                 empty-sample.jsonld                   ${ERROR_TYPE_BAD_REQUEST_DATA}      400
002_01_InvalidJson                               invalid-json-sample.jsonld            ${ERROR_TYPE_INVALID_REQUEST}       406
002_02_EmptyJson                                 empty-sample.jsonld                   ${ERROR_TYPE_BAD_REQUEST_DATA}      400

*** Keywords ***
Create Entity With Invalid Request Scenarios
+0 −50
Original line number Diff line number Diff line
*** Settings ***
Documentation   Check that the IUT refuses to create an entity if one exists with the same identifier 
Variables   ../../../../../../resources/variables.py
#Resource    ../../../../../../resources/ApiUtils.resource
Library     REST    ${url}
Library     JSONSchemaLibrary   ${EXECDIR}/schemas
Library     BuiltIn

#Suite Setup      Create Entity  building-minimal.jsonld
#Suite Teardown   Delete Entity by Id  urn:ngsi-ld:Building:3009ef20-9f62-41f5-bd66-92f041b428b9

*** Variable ***
${endpoint}=    entities

*** Test Case ***
AlreadyExists
    [Documentation]  Check that the IUT refuses to create an entity if one exists with the same identifier 
    [Tags]  mandatory  
    Create Entity  building-minimal.jsonld
    Create Entity  building-minimal.jsonld
    Check HTTP Status Code Is  409
    Check HTTP Response Body Json Schema Is  error_response
    Delete Entity by Id  urn:ngsi-ld:Building:3009ef20-9f62-41f5-bd66-92f041b428b9

*** Keywords ***
Create Entity
    [Arguments]  ${filename}
    &{headers}=  Create Dictionary  Content-Type=application/ld+json
    ${response}=  POST  ${endpoint}  body=${EXECDIR}/data/entities/${filename}  headers=${headers}
    Output  request
    Output  response
    Set Test Variable  ${response}

Check HTTP Status Code Is
    [Arguments]  ${status}
    ${response_status}=  convert to string  ${response['status']}
    Should Be Equal  ${response_status}  ${status}

Check HTTP Response Body Json Schema Is
    [Arguments]  ${input}
    Should Contain  ${response['headers']['Content-Type']}  application/json
    ${schema}=  Catenate  SEPARATOR=  ${input}  .schema.json
    Validate Json  ${schema}  ${response['body']}
    Log  Json Schema Validation OK

Delete Entity by Id
    [Arguments]  ${id}
    ${response}=  DELETE  ${endpoint}/${id}
    Output  request
    Output  response
 No newline at end of file
+0 −41
Original line number Diff line number Diff line
*** Settings ***
Documentation   Check that the IUT accepts the creation of an entity
Variables   ../../../../../../resources/variables.py
Library     REST    ${url}
Library     JSONSchemaLibrary   ${EXECDIR}/schemas

Test Template  Create Entity Scenarios

*** Variable ***
${endpoint}=    entities
${id}=  urn:ngsi-ld:Building:3009ef20-9f62-41f5-bd66-92f041b428b9

*** Test Cases ***                        FILENAME
SuccessCases_MinimalEntity                building-minimal.jsonld
SuccessCases_EntityWithSimpleProperties   building-simple-attributes.jsonld

*** Keywords ***
Create Entity Scenarios
     [Arguments]  ${filename}
     Create Entity  ${filename}
     Check HTTP Status Code Is  201
     Delete Entity by Id  ${id}

Create Entity
    [Arguments]  ${filename}
    &{headers}=  Create Dictionary  Content-Type=application/ld+json
    ${response}=  POST  ${endpoint}  body=${EXECDIR}/data/entities/${filename}  headers=${headers}
    Output  request
    Output  response
    Set Test Variable  ${response}

Check HTTP Status Code Is
    [Arguments]  ${status}
    ${response_status}=  convert to string  ${response['status']}
    Should Be Equal  ${response_status}  ${status}

Delete Entity by Id
    [Arguments]  ${id}
    ${response}=  DELETE  ${endpoint}/${id}
    Output  request
    Output  response
 No newline at end of file
+0 −44
Original line number Diff line number Diff line
*** Settings ***
Documentation   Check that the IUT accepts the creation of an entity
Variables   ../../../../../../resources/variables.py
#Resource    ../../../../../../resources/ApiUtils.resource
Library     REST    ${url}

*** Variable ***
${endpoint}=    entities
${id}=  urn:ngsi-ld:Building:3009ef20-9f62-41f5-bd66-92f041b428b9

*** Test Case ***
SuccessCases_MinimalEntity
    [Documentation]  Create an entity with a JSON-LD payload containing the minimal information
    [Tags]  mandatory
    Create Entity  building-minimal.jsonld
    Check HTTP Status Code Is  201
    Delete Entity by Id  ${id}

SuccessCases_EntityWithSimpleProperties
    [Documentation]  Create an entity with a JSON-LD payload containing only simple properties
    Create Entity  building-simple-attributes.jsonld
    Check HTTP Status Code Is  201
    Delete Entity by Id  ${id}


*** Keywords ***
Create Entity
    [Arguments]  ${filename}
    &{headers}=  Create Dictionary  Content-Type=application/ld+json
    ${response}=  POST  ${endpoint}  body=${EXECDIR}/data/entities/${filename}  headers=${headers}
    Output  request
    Output  response
    Set Test Variable  ${response}

Check HTTP Status Code Is
    [Arguments]  ${status}
    ${response_status}=  convert to string  ${response['status']}
    Should Be Equal  ${response_status}  ${status}

Delete Entity by Id
    [Arguments]  ${id}
    ${response}=  DELETE  ${endpoint}/${id}
    Output  request
    Output  response
Loading