Changes for TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_05.robot: 29 added lines, 0 removed lines.
Original line number
Diff line number
Diff line
*** Settings ***
DocumentationCheck that the default @context is used if the Content-Type header is "application/json" and the Link header does not contain a JSON-LD @context
Create one context source registration using the default context with JSON content type
[Documentation]Check that the default @context is used if the Content-Type header is "application/json" and the Link header does not contain a JSON-LD @context
[Tags]mandatory
${registration_id}=Generate Random Entity Id${registration_id_prefix}
${payload}=Load Json From File${EXECDIR}/data/${registration_payload_file_path}
${updated_payload}=Update Value To Json${payload}$..id${registration_id}
${request}${response}=Create Context Source Registration With Return${updated_payload}${CONTENT_TYPE_JSON}
Check Response Status Code201${response['status']}
Changes for TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_06.robot: 24 added lines, 0 removed lines.
Original line number
Diff line number
Diff line
*** Settings ***
DocumentationCheck that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/json" and the request payload body (as JSON) contains a "@context" term
Create one context source registration containing a JSON-LD @context with a JSON content type
[Documentation]Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/json" and the request payload body (as JSON) contains a "@context" term
[Tags]mandatory
${registration_id}=Generate Random Entity Id${registration_id_prefix}
${payload}=Load Json From File${EXECDIR}/data/${registration_payload_file_path}
${updated_payload}=Update Value To Json${payload}$..id${registration_id}
${request}${response}=Create Context Source Registration With Return${updated_payload}${CONTENT_TYPE_JSON}
Check Response Status Code400${response['status']}
Check Response Body Containing ProblemDetails Element Containing Type Element set to${response}${ERROR_TYPE_BAD_REQUEST_DATA}
Check Response Body Containing ProblemDetails Element Containing Title Element${response}
Changes for TP/NGSI-LD/ContextSource/Registration/CreateContextSourceRegistration/033_08.robot: 24 added lines, 0 removed lines.
Original line number
Diff line number
Diff line
*** Settings ***
DocumentationCheck that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/ld+json" and the request payload body does not contain a @context term
Create one context source registration not containing a JSON-LD @context with a JSON-LD content type
[Documentation]Check that an HTTP error response of type BadRequestData is raised if the Content-Type header is "application/ld+json" and the request payload body does not contain a @context term
[Tags]mandatory
${registration_id}=Generate Random Entity Id${registration_id_prefix}
${payload}=Load Json From File${EXECDIR}/data/${registration_payload_file_path}
${updated_payload}=Update Value To Json${payload}$..id${registration_id}
${request}${response}=Create Context Source Registration With Return${updated_payload}${CONTENT_TYPE_LD_JSON}
Check Response Status Code400${response['status']}
Check Response Body Containing ProblemDetails Element Containing Type Element set to${response}${ERROR_TYPE_BAD_REQUEST_DATA}
Check Response Body Containing ProblemDetails Element Containing Title Element${response}