Class TestScript.Setup.Action.Assert

  • All Implemented Interfaces:
    Visitable
    Enclosing class:
    TestScript.Setup.Action

    public static class TestScript.Setup.Action.Assert
    extends BackboneElement
    Evaluates the results of previous operations to determine if the server under test behaves appropriately.
    • Method Detail

      • getLabel

        public String getLabel()
        The label would be used for tracking/logging purposes by test engines.
        Returns:
        An immutable object of type String that may be null.
      • getDescription

        public String getDescription()
        The description would be used by test engines for tracking and reporting purposes.
        Returns:
        An immutable object of type String that may be null.
      • getCompareToSourceId

        public String getCompareToSourceId()
        Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition.
        Returns:
        An immutable object of type String that may be null.
      • getCompareToSourceExpression

        public String getCompareToSourceExpression()
        The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.
        Returns:
        An immutable object of type String that may be null.
      • getCompareToSourcePath

        public String getCompareToSourcePath()
        XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.
        Returns:
        An immutable object of type String that may be null.
      • getContentType

        public Code getContentType()
        The mime-type contents to compare against the request or response message 'Content-Type' header.
        Returns:
        An immutable object of type Code that may be null.
      • getExpression

        public String getExpression()
        The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.
        Returns:
        An immutable object of type String that may be null.
      • getHeaderField

        public String getHeaderField()
        The HTTP header field name e.g. 'Location'.
        Returns:
        An immutable object of type String that may be null.
      • getMinimumId

        public String getMinimumId()
        The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.
        Returns:
        An immutable object of type String that may be null.
      • getNavigationLinks

        public Boolean getNavigationLinks()
        Whether or not the test execution performs validation on the bundle navigation links.
        Returns:
        An immutable object of type Boolean that may be null.
      • getOperator

        public AssertionOperatorType getOperator()
        The operator type defines the conditional behavior of the assert. If not defined, the default is equals.
        Returns:
        An immutable object of type AssertionOperatorType that may be null.
      • getPath

        public String getPath()
        The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.
        Returns:
        An immutable object of type String that may be null.
      • getRequestURL

        public String getRequestURL()
        The value to use in a comparison against the request URL path string.
        Returns:
        An immutable object of type String that may be null.
      • getResource

        public FHIRDefinedType getResource()
        The type of the resource. See http://build.fhir.org/resourcelist.html.
        Returns:
        An immutable object of type FHIRDefinedType that may be null.
      • getResponse

        public AssertionResponseTypes getResponse()
        okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.
        Returns:
        An immutable object of type AssertionResponseTypes that may be null.
      • getResponseCode

        public String getResponseCode()
        The value of the HTTP response code to be tested.
        Returns:
        An immutable object of type String that may be null.
      • getSourceId

        public Id getSourceId()
        Fixture to evaluate the XPath/JSONPath expression or the headerField against.
        Returns:
        An immutable object of type Id that may be null.
      • getValidateProfileId

        public Id getValidateProfileId()
        The ID of the Profile to validate against.
        Returns:
        An immutable object of type Id that may be null.
      • getValue

        public String getValue()
        The value to compare to.
        Returns:
        An immutable object of type String that may be null.
      • getWarningOnly

        public Boolean getWarningOnly()
        Whether or not the test execution will produce a warning only on error for this assert.
        Returns:
        An immutable object of type Boolean that is non-null.
      • accept

        public void accept​(java.lang.String elementName,
                           int elementIndex,
                           Visitor visitor)
        Description copied from interface: Visitable
        Accept a Visitor and invoke the appropriate visit methods. A typical implementation would look like this:
         if (visitor.preVisit(this)) {
             visitor.visitStart(elementName, elementIndex, this);
             if (visitor.visit(elementName, elementIndex, this)) {
                 // visit children
             }
             visitor.visitEnd(elementName, elementIndex, this);
             visitor.postVisit(this);
         }
         
        Specified by:
        accept in interface Visitable
        Specified by:
        accept in class AbstractVisitable
        Parameters:
        elementName - the name of the element in the context of this visit
        elementIndex - the index of the element in a list or -1 if it is not contained within a List
        visitor - the visitor to use
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object