Package com.ibm.fhir.model.resource
Class TestScript.Setup.Action.Assert
- java.lang.Object
-
- com.ibm.fhir.model.visitor.AbstractVisitable
-
- com.ibm.fhir.model.type.Element
-
- com.ibm.fhir.model.type.BackboneElement
-
- com.ibm.fhir.model.resource.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TestScript.Setup.Action.Assert.Builder
-
Field Summary
-
Fields inherited from class com.ibm.fhir.model.type.BackboneElement
modifierExtension
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(java.lang.String elementName, int elementIndex, Visitor visitor)
Accept a Visitor and invoke the appropriate visit methods.static TestScript.Setup.Action.Assert.Builder
builder()
boolean
equals(java.lang.Object obj)
String
getCompareToSourceExpression()
The FHIRPath expression to evaluate against the source fixture.String
getCompareToSourceId()
Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition.String
getCompareToSourcePath()
XPath or JSONPath expression to evaluate against the source fixture.Code
getContentType()
The mime-type contents to compare against the request or response message 'Content-Type' header.String
getDescription()
The description would be used by test engines for tracking and reporting purposes.AssertionDirectionType
getDirection()
The direction to use for the assertion.String
getExpression()
The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.String
getHeaderField()
The HTTP header field name e.g.String
getLabel()
The label would be used for tracking/logging purposes by test engines.String
getMinimumId()
The ID of a fixture.Boolean
getNavigationLinks()
Whether or not the test execution performs validation on the bundle navigation links.AssertionOperatorType
getOperator()
The operator type defines the conditional behavior of the assert.String
getPath()
The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.TestScriptRequestMethodCode
getRequestMethod()
The request method or HTTP operation code to compare against that used by the client system under test.String
getRequestURL()
The value to use in a comparison against the request URL path string.FHIRDefinedType
getResource()
The type of the resource.AssertionResponseTypes
getResponse()
okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.String
getResponseCode()
The value of the HTTP response code to be tested.Id
getSourceId()
Fixture to evaluate the XPath/JSONPath expression or the headerField against.Id
getValidateProfileId()
The ID of the Profile to validate against.String
getValue()
The value to compare to.Boolean
getWarningOnly()
Whether or not the test execution will produce a warning only on error for this assert.boolean
hasChildren()
int
hashCode()
TestScript.Setup.Action.Assert.Builder
toBuilder()
Create a new Builder from the contents of this Element-
Methods inherited from class com.ibm.fhir.model.type.BackboneElement
getModifierExtension
-
-
-
-
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.
-
getDirection
public AssertionDirectionType getDirection()
The direction to use for the assertion.- Returns:
- An immutable object of type
AssertionDirectionType
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.
-
getRequestMethod
public TestScriptRequestMethodCode getRequestMethod()
The request method or HTTP operation code to compare against that used by the client system under test.- Returns:
- An immutable object of type
TestScriptRequestMethodCode
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.
-
hasChildren
public boolean hasChildren()
- Overrides:
hasChildren
in classBackboneElement
-
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 interfaceVisitable
- Specified by:
accept
in classAbstractVisitable
- Parameters:
elementName
- the name of the element in the context of this visitelementIndex
- the index of the element in a list or -1 if it is not contained within a Listvisitor
- the visitor to use
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toBuilder
public TestScript.Setup.Action.Assert.Builder toBuilder()
Description copied from class:Element
Create a new Builder from the contents of this Element- Specified by:
toBuilder
in classBackboneElement
-
builder
public static TestScript.Setup.Action.Assert.Builder builder()
-
-