Data Model Libraries
    Preparing search index...

    Class TestScriptSetupActionAssertComponent

    TestScriptSetupActionAssertComponent Class

    FHIR Specification

    • Short: The assertion to perform
    • Definition: Evaluates the results of previous operations to determine if the server under test behaves appropriately.
    • Comment: In order to evaluate an assertion, the request, response, and results of the most recently executed operation must always be maintained by the test engine.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    Methods

    parse getLabelElement setLabelElement hasLabelElement getLabel setLabel hasLabel getDescriptionElement setDescriptionElement hasDescriptionElement getDescription setDescription hasDescription getDirectionEnumType setDirectionEnumType hasDirectionEnumType getDirectionElement setDirectionElement hasDirectionElement getDirection setDirection hasDirection getCompareToSourceIdElement setCompareToSourceIdElement hasCompareToSourceIdElement getCompareToSourceId setCompareToSourceId hasCompareToSourceId getCompareToSourceExpressionElement setCompareToSourceExpressionElement hasCompareToSourceExpressionElement getCompareToSourceExpression setCompareToSourceExpression hasCompareToSourceExpression getCompareToSourcePathElement setCompareToSourcePathElement hasCompareToSourcePathElement getCompareToSourcePath setCompareToSourcePath hasCompareToSourcePath getContentTypeElement setContentTypeElement hasContentTypeElement getContentType setContentType hasContentType getExpressionElement setExpressionElement hasExpressionElement getExpression setExpression hasExpression getHeaderFieldElement setHeaderFieldElement hasHeaderFieldElement getHeaderField setHeaderField hasHeaderField getMinimumIdElement setMinimumIdElement hasMinimumIdElement getMinimumId setMinimumId hasMinimumId getNavigationLinksElement setNavigationLinksElement hasNavigationLinksElement getNavigationLinks setNavigationLinks hasNavigationLinks getOperatorEnumType setOperatorEnumType hasOperatorEnumType getOperatorElement setOperatorElement hasOperatorElement getOperator setOperator hasOperator getPathElement setPathElement hasPathElement getPath setPath hasPath getRequestMethodEnumType setRequestMethodEnumType hasRequestMethodEnumType getRequestMethodElement setRequestMethodElement hasRequestMethodElement getRequestMethod setRequestMethod hasRequestMethod getRequestURLElement setRequestURLElement hasRequestURLElement getRequestURL setRequestURL hasRequestURL getResourceElement setResourceElement hasResourceElement getResource setResource hasResource getResponseEnumType setResponseEnumType hasResponseEnumType getResponseElement setResponseElement hasResponseElement getResponse setResponse hasResponse getResponseCodeElement setResponseCodeElement hasResponseCodeElement getResponseCode setResponseCode hasResponseCode getSourceIdElement setSourceIdElement hasSourceIdElement getSourceId setSourceId hasSourceId getValidateProfileIdElement setValidateProfileIdElement hasValidateProfileIdElement getValidateProfileId setValidateProfileId hasValidateProfileId getValueElement setValueElement hasValueElement getValue setValue hasValue getWarningOnlyElement setWarningOnlyElement hasWarningOnlyElement getWarningOnly setWarningOnly hasWarningOnly fhirType isEmpty isRequiredFieldsEmpty copy toJSON getModifierExtension setModifierExtension hasModifierExtension getModifierExtensionByUrl addModifierExtension removeModifierExtension getId setId hasId getExtension setExtension hasExtension getExtensionByUrl addExtension removeExtension isResource isDataType isComplexDataType isPrimitive isBooleanPrimitive isStringPrimitive isNumberPrimitive isBigIntPrimitive isDateTimePrimitive copyValues

    Constructors

    Properties

    label?: StringType

    TestScript.setup.action.assert.label Element

    FHIR Specification

    • Short: Tracking/logging assertion label
    • Definition: The label would be used for tracking/logging purposes by test engines.
    • Comment: This has no impact on the verification itself.
    • FHIR Type: string
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false
    description?: StringType

    TestScript.setup.action.assert.description Element

    FHIR Specification

    • Short: Tracking/reporting assertion description
    • Definition: The description would be used by test engines for tracking and reporting purposes.
    • Comment: This has no impact on the verification itself.
    • FHIR Type: string
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false
    assertDirectionCodesEnum: AssertDirectionCodesEnum

    FHIR CodeSystem: AssertDirectionCodes

    direction?: EnumCodeType

    TestScript.setup.action.assert.direction Element

    FHIR Specification

    • Short: response | request
    • Definition: The direction to use for the assertion.
    • Comment: If the direction is specified as "response" (the default), then the processing of this assert is against the received response message. If the direction is specified as "request", then the processing of this assert is against the sent request message.
    • FHIR Type: code
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false

    CodeSystem Enumeration: AssertDirectionCodesEnum

    compareToSourceId?: StringType

    TestScript.setup.action.assert.compareToSourceId Element

    FHIR Specification

    • Short: Id of the source fixture to be evaluated
    • Definition: Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition.
    • FHIR Type: string
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false
    compareToSourceExpression?: StringType

    TestScript.setup.action.assert.compareToSourceExpression Element

    FHIR Specification

    • Short: The FHIRPath expression to evaluate against the source fixture
    • Definition: The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.
    • Comment: Thefhirpath expression to be evaluated against the expected fixture to compare to. Ignored if "assert.value" is used. The evaluation will be done before the assertion is evaluated.
    • FHIR Type: string
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false
    compareToSourcePath?: StringType

    TestScript.setup.action.assert.compareToSourcePath Element

    FHIR Specification

    • Short: XPath or JSONPath expression to evaluate against the source fixture
    • Definition: XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.
    • Comment: The XPath or JSONPath expression to be evaluated against the expected fixture to compare to. Ignored if "assert.value" is used. The evaluation will be done before the assertion is evaluated.
    • FHIR Type: string
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false
    contentType?: CodeType

    TestScript.setup.action.assert.contentType Element

    FHIR Specification

    • Short: Mime type to compare against the 'Content-Type' header
    • Definition: The mime-type contents to compare against the request or response message 'Content-Type' header.
    • Comment: If this is specified, then test engine shall confirm that the content-type of the last operation's headers is set to this value. If "assert.sourceId" element is specified, then the evaluation will be done against the headers mapped to that sourceId (and not the last operation's headers). If you'd like to have more control over the string, then use 'assert.headerField' instead.
    • FHIR Type: code
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false
    expression?: StringType

    TestScript.setup.action.assert.expression Element

    FHIR Specification

    • Short: The FHIRPath expression to be evaluated
    • Definition: The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.
    • Comment: If both "expression" and a "fixtureId" are specified, then the expression will be evaluated against the request or response body mapped to the fixtureId. If "expression" is specified and a "fixtureId" is not, then the expression will be evaluated against the response body of the last operation. Test engines are to store the request and response body and headers of the last operation at all times for subsequent assertions.
    • FHIR Type: string
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false
    headerField?: StringType

    TestScript.setup.action.assert.headerField Element

    FHIR Specification

    • Short: HTTP header field name
    • Definition: The HTTP header field name e.g. 'Location'.
    • Comment: If "headerField" is specified then "value" must be specified. If "sourceId" is not specified, then "headerField" will be evaluated against the last operation's response headers. Test engines are to keep track of the last operation's response body and response headers.
    • FHIR Type: string
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false
    minimumId?: StringType

    TestScript.setup.action.assert.minimumId Element

    FHIR Specification

    • Short: Fixture Id of minimum content resource
    • Definition: The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.
    • Comment: Asserts that the response contains all the element/content in another fixture pointed to by minimumId. This can be a statically defined fixture or one that is dynamically set via responseId.
    • FHIR Type: string
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false
    navigationLinks?: BooleanType

    TestScript.setup.action.assert.navigationLinks Element

    FHIR Specification

    • Short: Perform validation on navigation links?
    • Definition: Whether or not the test execution performs validation on the bundle navigation links.
    • Comment: Asserts that the Bundle contains first, last, and next links.
    • FHIR Type: boolean
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false
    assertOperatorCodesEnum: AssertOperatorCodesEnum

    FHIR CodeSystem: AssertOperatorCodes

    operator?: EnumCodeType

    TestScript.setup.action.assert.operator Element

    FHIR Specification

    • Short: equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval
    • Definition: The operator type defines the conditional behavior of the assert. If not defined, the default is equals.
    • Comment: Operators are useful especially for negative testing. If operator is not specified, then the "equals" operator is assumed; e.g. <code> <assert> <operator value="in" /> <responseCode value="200,201,204" /> </assert> <assert> <operator value="notEquals" /> <response value="okay"/> </assert> <assert> <operator value="greaterThan" /> <responseHeader> <field value="Content-Length" /> <value value="0" /> </responseHeader/> </assert> </code> .
    • FHIR Type: code
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false

    CodeSystem Enumeration: AssertOperatorCodesEnum

    path?: StringType

    TestScript.setup.action.assert.path Element

    FHIR Specification

    • Short: XPath or JSONPath expression
    • Definition: The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.
    • Comment: If both "path" and a "fixtureId" are specified, then the path will be evaluated against the request or response body mapped to the fixtureId. If "path" is specified and a "fixtureId" is not, then the path will be evaluated against the response body of the last operation. Test engines are to store the request and response body and headers of the last operation at all times for subsequent assertions.
    • FHIR Type: string
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false
    httpOperationsEnum: HttpOperationsEnum

    FHIR CodeSystem: HttpOperations

    requestMethod?: EnumCodeType

    TestScript.setup.action.assert.requestMethod Element

    FHIR Specification

    • Short: delete | get | options | patch | post | put | head
    • Definition: The request method or HTTP operation code to compare against that used by the client system under test.
    • Comment: If "requestMethod" is specified then it will be used in place of "value". The "requestMethod" will evaluate against the last operation's request HTTP operation.
    • FHIR Type: code
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false

    CodeSystem Enumeration: HttpOperationsEnum

    requestURL?: StringType

    TestScript.setup.action.assert.requestURL Element

    FHIR Specification

    • Short: Request URL comparison value
    • Definition: The value to use in a comparison against the request URL path string.
    • Comment: If "requestURL" is specified then it will be used in place of "value". The "requestURL" will evaluate against the last operation's full request URL path string.
    • FHIR Type: string
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false
    resource?: CodeType

    TestScript.setup.action.assert.resource Element

    FHIR Specification

    assertResponseCodeTypesEnum: AssertResponseCodeTypesEnum

    FHIR CodeSystem: AssertResponseCodeTypes

    response?: EnumCodeType

    TestScript.setup.action.assert.response Element

    FHIR Specification

    • Short: okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable
    • Definition: okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.
    • Comment: This is a shorter way of achieving similar verifications via "assert.responseCode". If you need more control, then use "assert.responseCode" e.g. .
    • FHIR Type: code
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false

    CodeSystem Enumeration: AssertResponseCodeTypesEnum

    responseCode?: StringType

    TestScript.setup.action.assert.responseCode Element

    FHIR Specification

    • Short: HTTP response code to test
    • Definition: The value of the HTTP response code to be tested.
    • Comment: To be used with "operator" attribute value. Asserts that the response code equals this value if "operator" is not specified. If the operator is "in" or "notIn" then the responseCode would be a comma-separated list of values e.g. "200,201". Otherwise, it's expected to be a numeric value. If "fixture" is not specified, then the "responseBodyId" value of the last operation is assumed.
    • FHIR Type: string
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false
    sourceId?: IdType

    TestScript.setup.action.assert.sourceId Element

    FHIR Specification

    • Short: Fixture Id of source expression or headerField
    • Definition: Fixture to evaluate the XPath/JSONPath expression or the headerField against.
    • Comment: This can be a statically defined fixture (at the top of the testscript) or a dynamically set fixture created by responseId of the action.operation element.
    • FHIR Type: id
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false
    validateProfileId?: IdType

    TestScript.setup.action.assert.validateProfileId Element

    FHIR Specification

    • Short: Profile Id of validation profile reference
    • Definition: The ID of the Profile to validate against.
    • Comment: The ID of a Profile fixture. Asserts that the response is valid according to the Profile specified by validateProfileId.
    • FHIR Type: id
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false
    value?: StringType

    TestScript.setup.action.assert.value Element

    FHIR Specification

    • Short: The value to compare to
    • Definition: The value to compare to.
    • Comment: The string-representation of a number, string, or boolean that is expected. Test engines do have to look for placeholders (${}) and replace the variable placeholders with the variable values at runtime before comparing this value to the actual value.
    • FHIR Type: string
    • Cardinality: 0..1
    • isModifier: false
    • isSummary: false
    warningOnly: null | BooleanType

    TestScript.setup.action.assert.warningOnly Element

    FHIR Specification

    • Short: Will this assert produce a warning only on error?
    • Definition: Whether or not the test execution will produce a warning only on error for this assert.
    • Comment: If this element is specified and it is true, then assertion failures can be logged by test engine but should not stop the test script execution from proceeding. There are likely cases where the spec is not clear on what should happen. If the spec says something is optional (maybe a response header for example), but a server doesn't do it, we could choose to issue a warning.
    • FHIR Type: boolean
    • Cardinality: 1..1
    • isModifier: false
    • isSummary: false

    Methods

    • Parse the provided TestScriptSetupActionAssertComponent JSON to instantiate the TestScriptSetupActionAssertComponent data model.

      Parameters

      • sourceJson: Value

        JSON representing FHIR TestScriptSetupActionAssertComponent

      • OptionaloptSourceField: string

        Optional data source field (e.g. <complexTypeName>.<complexTypeFieldName>); defaults to TestScriptSetupActionAssertComponent

      Returns undefined | TestScriptSetupActionAssertComponent

      TestScriptSetupActionAssertComponent data model or undefined for TestScriptSetupActionAssertComponent

      JsonError if the provided JSON is not a valid JSON object

    • Determines if the modifierExtension property exists.

      Parameters

      • Optionalurl: string

        the url that identifies a specific Extension

      Returns boolean

      true if an Extension has the provided url; false otherwise

      If the url is provided, determines if an Extension having the provided url exists. If the url is not provided, determines if the modifierExtension property exists and has any values.

      AssertionError for invalid url

    • Returns undefined | string

      the id property value

    • Assigns the provided value to the id property.

      Parameters

      • value: undefined | string

        the id value

      Returns this

      this

      PrimitiveTypeError for invalid value

    • Returns boolean

      true if id exists and has a value; false otherwise

    • Determines if the extension property exists.

      Parameters

      • Optionalurl: string

        the url that identifies a specific Extension

      Returns boolean

      true if an Extension has the provided url; false otherwise

      If the url is provided, determines if an Extension having the provided url exists. If the url is not provided, determines if the extension property exists and has any values.

      AssertionError for invalid url

    • Determines if the extension property exists.

      Parameters

      • url: string

        the url that identifies a specific Extension

      Returns undefined | IExtension

      an Extension having the provided url

      If the url is provided, determines if an Extension having the provided url exists. If the url is not provided, determines if the extension property exists and has any values.

      AssertionError for invalid url

    • Adds the provided Extension to the extension property array.

      Parameters

      • extension: undefined | IExtension

        the Extension value to add to the extension property array

      Returns this

      this

    • Removes the Extension having the provided url from the extension property array.

      Parameters

      • url: string

        the url that identifies a specific Extension to remove

      Returns void

      AssertionError for invalid url

    • Returns boolean

      true if the instance is a FHIR complex or primitive datatype; false otherwise