Commit 21afd0e0 authored by lopesg's avatar lopesg
Browse files

added tags

parent 321c8859
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ ${registration_filename}= csourceRegistrations/context-source-registration-with
*** Test Cases *** 
043_01 Create entity
    [Documentation]  Verify throwing 503 – LDContextNotAvaliable error if remote JSON-LD @context cannot be retrieved (Create entity)
    [Tags]  cb

    ${entity_id}=  Generate Random Entity Id    ${building_id_prefix}    
    ${request}    ${response}=    Create Entity Selecting Content Type   ${building_filename}      ${entity_id}     ${CONTENT_TYPE_LD_JSON}
@@ -33,6 +34,7 @@ ${registration_filename}= csourceRegistrations/context-source-registration-with

043_02 Create subscription
    [Documentation]  Verify throwing 503 – LDContextNotAvaliable error if remote JSON-LD @context cannot be retrieved (Create subscription)
    [Tags]  cb

    ${subscription_id}=  Generate Random Entity Id    ${subscription_id_prefix}    
    ${response}=    Create Subscription    ${subscription_id}    ${subscription_filename}    ${CONTENT_TYPE_LD_JSON}
@@ -45,6 +47,7 @@ ${registration_filename}= csourceRegistrations/context-source-registration-with

043_03 Create Temporal Representation of Entities
    [Documentation]  Verify throwing 503 – LDContextNotAvaliable error if remote JSON-LD @context cannot be retrieved (Create Temporal Representation of Entities)
    [Tags]  cb

    ${temporal_entity_representation_id}=     Generate Random Entity Id    ${tea_id_prefix}
    ${response}=  Create Or Update Temporal Representation Of Entity Selecting Content Type  ${temporal_entity_representation_id}    ${tea_filename}     ${CONTENT_TYPE_LD_JSON}
@@ -56,6 +59,7 @@ ${registration_filename}= csourceRegistrations/context-source-registration-with

043_04 Batch entity create
    [Documentation]  Verify throwing 503 – LDContextNotAvaliable error if remote JSON-LD @context cannot be retrieved (Batch entity create)
    [Tags]  cb

    ${first_entity_id}=     Generate Random Entity Id    ${building_id_prefix}
    ${second_entity_id}=     Generate Random Entity Id    ${building_id_prefix}
@@ -72,6 +76,7 @@ ${registration_filename}= csourceRegistrations/context-source-registration-with

043_05 Create context source registration
    [Documentation]  Verify throwing 503 – LDContextNotAvaliable error if remote JSON-LD @context cannot be retrieved (Create context source registration)
    [Tags]  cb
    
    ${registration_id_prefix}=     Generate Random Entity Id    ${registration_id_prefix}

+2 −2
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ ${subscription_fragment}= csourceSubscriptions/fragments/subscription-update-sa
*** Test Cases ***                               
044_01_01_endpoint /entities/{entityId}/attrs/{attrId}
    [Documentation]  Verify that PATCH HTTP requests can be done with "application/merge-patch+json" as Content-Type 
    [Tags]  mandatory
    [Tags]  cb
    ${entity_id}=       Generate Random Entity Id    ${vehicle_id_prefix}    
    ${request}    ${response}=    Create Entity Selecting Content Type    ${vehicle_filename}    ${entity_id}    ${CONTENT_TYPE_LD_JSON}    
    Check Response Status Code  201    ${response['status']}
@@ -29,7 +29,7 @@ ${subscription_fragment}= csourceSubscriptions/fragments/subscription-update-sa
 
044_01_02_endpoint /subscriptions/{subscriptionId}       
    [Documentation]  Verify that PATCH HTTP requests can be done with "application/merge-patch+json" as Content-Type 
    [Tags]  mandatory
    [Tags]  cb
    ${subscription_id}=       Generate Random Entity Id    ${subscription_id_prefix}    
    ${response}=    Create Subscription    ${subscription_id}    ${subscription_filename}    ${CONTENT_TYPE_LD_JSON}
    Check Response Status Code  201    ${response['status']}
+5 −1
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ ${teatype}= Vehicle
*** Test Cases ***
044_02_01_endpoint /entities/{entityId}
    [Documentation]  Verify that on a GET HTTP request if nothing is specified on the Accept header, "application/json" is assumed (/entities/{entityId})
    [Tags]  cb
    ${id}=     Generate Random Entity Id    ${building_id_prefix}
    ${request}    ${response}=    Create Entity Selecting Content Type  ${building_filename}     ${id}    ${CONTENT_TYPE_LD_JSON}
    Check Response Status Code  201    ${response['status']}
@@ -41,6 +42,7 @@ ${teatype}= Vehicle

044_02_02_endpoint /subscriptions/{subscriptionId}
    [Documentation]  Verify that on a GET HTTP request if nothing is specified on the Accept header, "application/json" is assumed (/subscriptions/{subscriptionId})
    [Tags]  cb

    ${id}=  Generate Random Entity Id    ${subscription_id_prefix}    
    ${response}=    Create Subscription    ${id}    ${subscription_filename}    ${CONTENT_TYPE_LD_JSON}
@@ -55,6 +57,7 @@ ${teatype}= Vehicle

044_02_03_endpoint /csourceRegistrations/
    [Documentation]  Verify that on a GET HTTP request if nothing is specified on the Accept header, "application/json" is assumed (/csourceRegistrations/)
    [Tags]  cb

    ${registration_id}=     Generate Random Entity Id    ${registration_id_prefix}
    ${payload}=    Load Json From File    ${EXECDIR}/data/${registration_filename}
@@ -71,6 +74,7 @@ ${teatype}= Vehicle

044_02_04_endpoint /temporal/entities
    [Documentation]  Verify that on a GET HTTP request if nothing is specified on the Accept header, "application/json" is assumed (/temporal/entities)
    [Tags]  cb
    
    ${temporal_entity_representation_id}=     Generate Random Entity Id    ${tea_id_prefix}
    Create Temporal Representation Of Entity  ${tea_filename}     ${temporal_entity_representation_id}
+7 −2
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ ${building_filename}= building-simple-attributes-sample.jsonld
*** Test Cases ***
044_03_01_endpoint patch /entities/{entityId}/attrs/{attrId}
    [Documentation]  Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (patch /entities/{entityId}/attrs/{attrId})
    [Tags]  cb

    ${entity_id}=     Generate Random Entity Id    ${vehicle_id_prefix}
    ${request}    ${response}=    Create Entity Selecting Content Type  ${vehicle_filename}     ${entity_id}    ${CONTENT_TYPE_LD_JSON}
@@ -35,6 +36,7 @@ ${building_filename}= building-simple-attributes-sample.jsonld

044_03_02_endpoint patch /subscriptions/{subscriptionId}
    [Documentation]  Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (patch /subscriptions/{subscriptionId})
    [Tags]  cb

    ${id}=  Generate Random Entity Id  ${subscription_id_prefix}    
    ${response}=  Create Subscription  ${id}    ${subscription_filename}    ${CONTENT_TYPE_LD_JSON}
@@ -47,6 +49,7 @@ ${building_filename}= building-simple-attributes-sample.jsonld

044_03_03_endpoint post /entities/
    [Documentation]  Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (post /entities/)
    [Tags]  cb

    ${entity_id}=     Generate Random Entity Id    ${building_id_prefix}
    ${request}    ${response}=    Create Entity Selecting Content Type   ${building_filename}      ${entity_id}     ${EMPTY}
@@ -56,6 +59,7 @@ ${building_filename}= building-simple-attributes-sample.jsonld

044_03_04_endpoint post /subscriptions/
    [Documentation]  Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (post /subscriptions/)
    [Tags]  cb

    ${subscriptions_id}=     Generate Random Entity Id    ${subscription_id_prefix}
    ${response}=  Create Subscription  ${subscriptions_id}    ${subscription_filename}    ${EMPTY}
@@ -64,8 +68,8 @@ ${building_filename}= building-simple-attributes-sample.jsonld
    [Teardown]  Delete Subscription  ${subscriptions_id}

044_03_05_endpoint post /entityOperations/create

    [Documentation]  Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (post /entityOperations/create)
    [Tags]  cb

    ${first_entity_id}=     Generate Random Entity Id    ${building_id_prefix}
    ${second_entity_id}=     Generate Random Entity Id    ${building_id_prefix}
@@ -82,6 +86,7 @@ ${building_filename}= building-simple-attributes-sample.jsonld

044_03_06_endpoint post /temporal/entities/
    [Documentation]  Verify throwing 415 HTTP status code (Unsupported Media Type) if "Content-Type" header is not "application/json" or "application/ld+json" (post /temporal/entities/)
    [Tags]  cb
    
    ${temporal_entity_representation_id}=     Generate Random Entity Id    ${tea_id_prefix}
    ${response}=  Create Or Update Temporal Representation Of Entity Selecting Content Type  ${temporal_entity_representation_id}    ${tea_filename}     ${EMPTY}
+5 −4
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ ${subscription_filename}= csourceSubscriptions/subscription-sample.jsonld
*** Test Cases ***
044_04_01_endpoint get /entities/{entityId}
    [Documentation]  Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header does not imply "application/json" nor "application/ld+json" (get /entities/{entityId})
    
    [Tags]  cb
    ${entity_id}=     Generate Random Entity Id    ${building_id_prefix}
    ${request}    ${response}=    Create Entity Selecting Content Type  ${building_filename}     ${entity_id}    ${CONTENT_TYPE_LD_JSON}
    Check Response Status Code  201    ${response['status']}
@@ -29,7 +29,7 @@ ${subscription_filename}= csourceSubscriptions/subscription-sample.jsonld

044_04_02_endpoint get /subscriptions/{subscriptionId}
    [Documentation]  Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header does not imply "application/json" nor "application/ld+json" (get /subscriptions/{subscriptionId})
    
    [Tags]  cb    
    ${id}=  Generate Random Entity Id    ${subscription_id_prefix}    
    ${response}=    Create Subscription    ${id}    ${subscription_filename}    ${CONTENT_TYPE_LD_JSON}
    Check Response Status Code  201    ${response['status']}
@@ -41,18 +41,19 @@ ${subscription_filename}= csourceSubscriptions/subscription-sample.jsonld

044_04_03_endpoint get /csourceRegistrations/
    [Documentation]  Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header does not imply "application/json" nor "application/ld+json" (get /csourceRegistrations/)

    [Tags]  cb
    Query Context Source Registrations  type=Building    accept=${accept}
    Check Response Status Code Set To  ${status_code}

044_04_04_endpoint get /csourceSubscriptions/
    [Documentation]  Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header does not imply "application/json" nor "application/ld+json" (get /csourceSubscriptions/)
    
    [Tags]  cb    
    Query Context Source Registration Subscriptions  accept=${accept}
    Check Response Status Code Set To  ${status_code}

044_04_05_endpoint get /temporal/entities
    [Documentation]  Verify throwing 406 HTTP status code (Not Acceptable Media Type) if the "Accept" header does not imply "application/json" nor "application/ld+json" (get /temporal/entities)
    [Tags]  cb
    ${entity_types_to_be_retrieved}=  Catenate    SEPARATOR=,     Vehicle
    Query Temporal Representation Of Entities   entity_types=${entity_types_to_be_retrieved}    timerel=after    timeAt=2020-08-01T12:05:00Z    accept=${accept}
    Check Response Status Code Set To  ${status_code}
 No newline at end of file
Loading