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 classTestScript.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 voidaccept(String elementName, int elementIndex, Visitor visitor)Accept a Visitor and invoke the appropriate visit methods.static TestScript.Setup.Action.Assert.Builderbuilder()booleanequals(Object obj)StringgetCompareToSourceExpression()The FHIRPath expression to evaluate against the source fixture.StringgetCompareToSourceId()Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition.StringgetCompareToSourcePath()XPath or JSONPath expression to evaluate against the source fixture.CodegetContentType()The mime-type contents to compare against the request or response message 'Content-Type' header.StringgetDescription()The description would be used by test engines for tracking and reporting purposes.AssertionDirectionTypegetDirection()The direction to use for the assertion.StringgetExpression()The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.StringgetHeaderField()The HTTP header field name e.g.StringgetLabel()The label would be used for tracking/logging purposes by test engines.StringgetMinimumId()The ID of a fixture.BooleangetNavigationLinks()Whether or not the test execution performs validation on the bundle navigation links.AssertionOperatorTypegetOperator()The operator type defines the conditional behavior of the assert.StringgetPath()The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.TestScriptRequestMethodCodegetRequestMethod()The request method or HTTP operation code to compare against that used by the client system under test.StringgetRequestURL()The value to use in a comparison against the request URL path string.FHIRDefinedTypegetResource()The type of the resource.AssertionResponseTypesgetResponse()okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.StringgetResponseCode()The value of the HTTP response code to be tested.IdgetSourceId()Fixture to evaluate the XPath/JSONPath expression or the headerField against.IdgetValidateProfileId()The ID of the Profile to validate against.StringgetValue()The value to compare to.BooleangetWarningOnly()Whether or not the test execution will produce a warning only on error for this assert.booleanhasChildren()inthashCode()TestScript.Setup.Action.Assert.BuildertoBuilder()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
Stringthat 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
Stringthat may be null.
-
getDirection
public AssertionDirectionType getDirection()
The direction to use for the assertion.- Returns:
- An immutable object of type
AssertionDirectionTypethat 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
Stringthat 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
Stringthat 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
Stringthat 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
Codethat 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
Stringthat may be null.
-
getHeaderField
public String getHeaderField()
The HTTP header field name e.g. 'Location'.- Returns:
- An immutable object of type
Stringthat 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
Stringthat 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
Booleanthat 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
AssertionOperatorTypethat 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
Stringthat 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
TestScriptRequestMethodCodethat 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
Stringthat 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
FHIRDefinedTypethat 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
AssertionResponseTypesthat may be null.
-
getResponseCode
public String getResponseCode()
The value of the HTTP response code to be tested.- Returns:
- An immutable object of type
Stringthat may be null.
-
getSourceId
public Id getSourceId()
Fixture to evaluate the XPath/JSONPath expression or the headerField against.- Returns:
- An immutable object of type
Idthat may be null.
-
getValidateProfileId
public Id getValidateProfileId()
The ID of the Profile to validate against.- Returns:
- An immutable object of type
Idthat may be null.
-
getValue
public String getValue()
The value to compare to.- Returns:
- An immutable object of type
Stringthat 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
Booleanthat is non-null.
-
hasChildren
public boolean hasChildren()
- Overrides:
hasChildrenin classBackboneElement
-
accept
public void accept(String elementName, int elementIndex, Visitor visitor)
Description copied from interface:VisitableAccept 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:
acceptin interfaceVisitable- Specified by:
acceptin 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
-
toBuilder
public TestScript.Setup.Action.Assert.Builder toBuilder()
Description copied from class:ElementCreate a new Builder from the contents of this Element- Specified by:
toBuilderin classBackboneElement
-
builder
public static TestScript.Setup.Action.Assert.Builder builder()
-
-