Class TestScript.Setup.Action.Assert.Builder
- java.lang.Object
-
- org.linuxforhealth.fhir.model.builder.AbstractBuilder<Element>
-
- org.linuxforhealth.fhir.model.type.Element.Builder
-
- org.linuxforhealth.fhir.model.type.BackboneElement.Builder
-
- org.linuxforhealth.fhir.model.resource.TestScript.Setup.Action.Assert.Builder
-
- Enclosing class:
- TestScript.Setup.Action.Assert
public static class TestScript.Setup.Action.Assert.Builder extends BackboneElement.Builder
-
-
Field Summary
-
Fields inherited from class org.linuxforhealth.fhir.model.type.BackboneElement.Builder
modifierExtension
-
Fields inherited from class org.linuxforhealth.fhir.model.type.Element.Builder
extension, id
-
Fields inherited from class org.linuxforhealth.fhir.model.builder.AbstractBuilder
validating
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TestScript.Setup.Action.Assert
build()
Build theTestScript.Setup.Action.Assert
TestScript.Setup.Action.Assert.Builder
compareToSourceExpression(java.lang.String compareToSourceExpression)
Convenience method for settingcompareToSourceExpression
.TestScript.Setup.Action.Assert.Builder
compareToSourceExpression(String compareToSourceExpression)
The FHIRPath expression to evaluate against the source fixture.TestScript.Setup.Action.Assert.Builder
compareToSourceId(java.lang.String compareToSourceId)
Convenience method for settingcompareToSourceId
.TestScript.Setup.Action.Assert.Builder
compareToSourceId(String compareToSourceId)
Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition.TestScript.Setup.Action.Assert.Builder
compareToSourcePath(java.lang.String compareToSourcePath)
Convenience method for settingcompareToSourcePath
.TestScript.Setup.Action.Assert.Builder
compareToSourcePath(String compareToSourcePath)
XPath or JSONPath expression to evaluate against the source fixture.TestScript.Setup.Action.Assert.Builder
contentType(Code contentType)
The mime-type contents to compare against the request or response message 'Content-Type' header.TestScript.Setup.Action.Assert.Builder
description(java.lang.String description)
Convenience method for settingdescription
.TestScript.Setup.Action.Assert.Builder
description(String description)
The description would be used by test engines for tracking and reporting purposes.TestScript.Setup.Action.Assert.Builder
direction(AssertionDirectionType direction)
The direction to use for the assertion.TestScript.Setup.Action.Assert.Builder
expression(java.lang.String expression)
Convenience method for settingexpression
.TestScript.Setup.Action.Assert.Builder
expression(String expression)
The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.TestScript.Setup.Action.Assert.Builder
extension(java.util.Collection<Extension> extension)
May be used to represent additional information that is not part of the basic definition of the element.TestScript.Setup.Action.Assert.Builder
extension(Extension... extension)
May be used to represent additional information that is not part of the basic definition of the element.protected TestScript.Setup.Action.Assert.Builder
from(TestScript.Setup.Action.Assert _assert)
TestScript.Setup.Action.Assert.Builder
headerField(java.lang.String headerField)
Convenience method for settingheaderField
.TestScript.Setup.Action.Assert.Builder
headerField(String headerField)
The HTTP header field name e.g.TestScript.Setup.Action.Assert.Builder
id(java.lang.String id)
Unique id for the element within a resource (for internal references).TestScript.Setup.Action.Assert.Builder
label(java.lang.String label)
Convenience method for settinglabel
.TestScript.Setup.Action.Assert.Builder
label(String label)
The label would be used for tracking/logging purposes by test engines.TestScript.Setup.Action.Assert.Builder
minimumId(java.lang.String minimumId)
Convenience method for settingminimumId
.TestScript.Setup.Action.Assert.Builder
minimumId(String minimumId)
The ID of a fixture.TestScript.Setup.Action.Assert.Builder
modifierExtension(java.util.Collection<Extension> modifierExtension)
May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants.TestScript.Setup.Action.Assert.Builder
modifierExtension(Extension... modifierExtension)
May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants.TestScript.Setup.Action.Assert.Builder
navigationLinks(java.lang.Boolean navigationLinks)
Convenience method for settingnavigationLinks
.TestScript.Setup.Action.Assert.Builder
navigationLinks(Boolean navigationLinks)
Whether or not the test execution performs validation on the bundle navigation links.TestScript.Setup.Action.Assert.Builder
operator(AssertionOperatorType operator)
The operator type defines the conditional behavior of the assert.TestScript.Setup.Action.Assert.Builder
path(java.lang.String path)
Convenience method for settingpath
.TestScript.Setup.Action.Assert.Builder
path(String path)
The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.TestScript.Setup.Action.Assert.Builder
requestMethod(TestScriptRequestMethodCode requestMethod)
The request method or HTTP operation code to compare against that used by the client system under test.TestScript.Setup.Action.Assert.Builder
requestURL(java.lang.String requestURL)
Convenience method for settingrequestURL
.TestScript.Setup.Action.Assert.Builder
requestURL(String requestURL)
The value to use in a comparison against the request URL path string.TestScript.Setup.Action.Assert.Builder
resource(FHIRDefinedType resource)
The type of the resource.TestScript.Setup.Action.Assert.Builder
response(AssertionResponseTypes response)
okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.TestScript.Setup.Action.Assert.Builder
responseCode(java.lang.String responseCode)
Convenience method for settingresponseCode
.TestScript.Setup.Action.Assert.Builder
responseCode(String responseCode)
The value of the HTTP response code to be tested.TestScript.Setup.Action.Assert.Builder
sourceId(Id sourceId)
Fixture to evaluate the XPath/JSONPath expression or the headerField against.protected void
validate(TestScript.Setup.Action.Assert _assert)
TestScript.Setup.Action.Assert.Builder
validateProfileId(Id validateProfileId)
The ID of the Profile to validate against.TestScript.Setup.Action.Assert.Builder
value(java.lang.String value)
Convenience method for settingvalue
.TestScript.Setup.Action.Assert.Builder
value(String value)
The value to compare to.TestScript.Setup.Action.Assert.Builder
warningOnly(java.lang.Boolean warningOnly)
Convenience method for settingwarningOnly
.TestScript.Setup.Action.Assert.Builder
warningOnly(Boolean warningOnly)
Whether or not the test execution will produce a warning only on error for this assert.-
Methods inherited from class org.linuxforhealth.fhir.model.type.BackboneElement.Builder
from, validate
-
Methods inherited from class org.linuxforhealth.fhir.model.type.Element.Builder
from, validate
-
Methods inherited from class org.linuxforhealth.fhir.model.builder.AbstractBuilder
isValidating, setValidating
-
-
-
-
Method Detail
-
id
public TestScript.Setup.Action.Assert.Builder id(java.lang.String id)
Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.- Overrides:
id
in classBackboneElement.Builder
- Parameters:
id
- Unique id for inter-element referencing- Returns:
- A reference to this Builder instance
-
extension
public TestScript.Setup.Action.Assert.Builder extension(Extension... extension)
May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Overrides:
extension
in classBackboneElement.Builder
- Parameters:
extension
- Additional content defined by implementations- Returns:
- A reference to this Builder instance
-
extension
public TestScript.Setup.Action.Assert.Builder extension(java.util.Collection<Extension> extension)
May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Overrides:
extension
in classBackboneElement.Builder
- Parameters:
extension
- Additional content defined by implementations- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
modifierExtension
public TestScript.Setup.Action.Assert.Builder modifierExtension(Extension... modifierExtension)
May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Overrides:
modifierExtension
in classBackboneElement.Builder
- Parameters:
modifierExtension
- Extensions that cannot be ignored even if unrecognized- Returns:
- A reference to this Builder instance
-
modifierExtension
public TestScript.Setup.Action.Assert.Builder modifierExtension(java.util.Collection<Extension> modifierExtension)
May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Overrides:
modifierExtension
in classBackboneElement.Builder
- Parameters:
modifierExtension
- Extensions that cannot be ignored even if unrecognized- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
label
public TestScript.Setup.Action.Assert.Builder label(java.lang.String label)
Convenience method for settinglabel
.- Parameters:
label
- Tracking/logging assertion label- Returns:
- A reference to this Builder instance
- See Also:
label(org.linuxforhealth.fhir.model.type.String)
-
label
public TestScript.Setup.Action.Assert.Builder label(String label)
The label would be used for tracking/logging purposes by test engines.- Parameters:
label
- Tracking/logging assertion label- Returns:
- A reference to this Builder instance
-
description
public TestScript.Setup.Action.Assert.Builder description(java.lang.String description)
Convenience method for settingdescription
.- Parameters:
description
- Tracking/reporting assertion description- Returns:
- A reference to this Builder instance
- See Also:
description(org.linuxforhealth.fhir.model.type.String)
-
description
public TestScript.Setup.Action.Assert.Builder description(String description)
The description would be used by test engines for tracking and reporting purposes.- Parameters:
description
- Tracking/reporting assertion description- Returns:
- A reference to this Builder instance
-
direction
public TestScript.Setup.Action.Assert.Builder direction(AssertionDirectionType direction)
The direction to use for the assertion.- Parameters:
direction
- response | request- Returns:
- A reference to this Builder instance
-
compareToSourceId
public TestScript.Setup.Action.Assert.Builder compareToSourceId(java.lang.String compareToSourceId)
Convenience method for settingcompareToSourceId
.- Parameters:
compareToSourceId
- Id of the source fixture to be evaluated- Returns:
- A reference to this Builder instance
- See Also:
compareToSourceId(org.linuxforhealth.fhir.model.type.String)
-
compareToSourceId
public TestScript.Setup.Action.Assert.Builder compareToSourceId(String compareToSourceId)
Id of the source fixture used as the contents to be evaluated by either the "source/expression" or "sourceId/path" definition.- Parameters:
compareToSourceId
- Id of the source fixture to be evaluated- Returns:
- A reference to this Builder instance
-
compareToSourceExpression
public TestScript.Setup.Action.Assert.Builder compareToSourceExpression(java.lang.String compareToSourceExpression)
Convenience method for settingcompareToSourceExpression
.- Parameters:
compareToSourceExpression
- The FHIRPath expression to evaluate against the source fixture- Returns:
- A reference to this Builder instance
- See Also:
compareToSourceExpression(org.linuxforhealth.fhir.model.type.String)
-
compareToSourceExpression
public TestScript.Setup.Action.Assert.Builder compareToSourceExpression(String compareToSourceExpression)
The FHIRPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.- Parameters:
compareToSourceExpression
- The FHIRPath expression to evaluate against the source fixture- Returns:
- A reference to this Builder instance
-
compareToSourcePath
public TestScript.Setup.Action.Assert.Builder compareToSourcePath(java.lang.String compareToSourcePath)
Convenience method for settingcompareToSourcePath
.- Parameters:
compareToSourcePath
- XPath or JSONPath expression to evaluate against the source fixture- Returns:
- A reference to this Builder instance
- See Also:
compareToSourcePath(org.linuxforhealth.fhir.model.type.String)
-
compareToSourcePath
public TestScript.Setup.Action.Assert.Builder compareToSourcePath(String compareToSourcePath)
XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.- Parameters:
compareToSourcePath
- XPath or JSONPath expression to evaluate against the source fixture- Returns:
- A reference to this Builder instance
-
contentType
public TestScript.Setup.Action.Assert.Builder contentType(Code contentType)
The mime-type contents to compare against the request or response message 'Content-Type' header.- Parameters:
contentType
- Mime type to compare against the 'Content-Type' header- Returns:
- A reference to this Builder instance
-
expression
public TestScript.Setup.Action.Assert.Builder expression(java.lang.String expression)
Convenience method for settingexpression
.- Parameters:
expression
- The FHIRPath expression to be evaluated- Returns:
- A reference to this Builder instance
- See Also:
expression(org.linuxforhealth.fhir.model.type.String)
-
expression
public TestScript.Setup.Action.Assert.Builder expression(String expression)
The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.- Parameters:
expression
- The FHIRPath expression to be evaluated- Returns:
- A reference to this Builder instance
-
headerField
public TestScript.Setup.Action.Assert.Builder headerField(java.lang.String headerField)
Convenience method for settingheaderField
.- Parameters:
headerField
- HTTP header field name- Returns:
- A reference to this Builder instance
- See Also:
headerField(org.linuxforhealth.fhir.model.type.String)
-
headerField
public TestScript.Setup.Action.Assert.Builder headerField(String headerField)
The HTTP header field name e.g. 'Location'.- Parameters:
headerField
- HTTP header field name- Returns:
- A reference to this Builder instance
-
minimumId
public TestScript.Setup.Action.Assert.Builder minimumId(java.lang.String minimumId)
Convenience method for settingminimumId
.- Parameters:
minimumId
- Fixture Id of minimum content resource- Returns:
- A reference to this Builder instance
- See Also:
minimumId(org.linuxforhealth.fhir.model.type.String)
-
minimumId
public TestScript.Setup.Action.Assert.Builder minimumId(String minimumId)
The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.- Parameters:
minimumId
- Fixture Id of minimum content resource- Returns:
- A reference to this Builder instance
-
navigationLinks
public TestScript.Setup.Action.Assert.Builder navigationLinks(java.lang.Boolean navigationLinks)
Convenience method for settingnavigationLinks
.- Parameters:
navigationLinks
- Perform validation on navigation links?- Returns:
- A reference to this Builder instance
- See Also:
navigationLinks(org.linuxforhealth.fhir.model.type.Boolean)
-
navigationLinks
public TestScript.Setup.Action.Assert.Builder navigationLinks(Boolean navigationLinks)
Whether or not the test execution performs validation on the bundle navigation links.- Parameters:
navigationLinks
- Perform validation on navigation links?- Returns:
- A reference to this Builder instance
-
operator
public TestScript.Setup.Action.Assert.Builder operator(AssertionOperatorType operator)
The operator type defines the conditional behavior of the assert. If not defined, the default is equals.- Parameters:
operator
- equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval- Returns:
- A reference to this Builder instance
-
path
public TestScript.Setup.Action.Assert.Builder path(java.lang.String path)
Convenience method for settingpath
.- Parameters:
path
- XPath or JSONPath expression- Returns:
- A reference to this Builder instance
- See Also:
path(org.linuxforhealth.fhir.model.type.String)
-
path
public TestScript.Setup.Action.Assert.Builder path(String path)
The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.- Parameters:
path
- XPath or JSONPath expression- Returns:
- A reference to this Builder instance
-
requestMethod
public TestScript.Setup.Action.Assert.Builder requestMethod(TestScriptRequestMethodCode requestMethod)
The request method or HTTP operation code to compare against that used by the client system under test.- Parameters:
requestMethod
- delete | get | options | patch | post | put | head- Returns:
- A reference to this Builder instance
-
requestURL
public TestScript.Setup.Action.Assert.Builder requestURL(java.lang.String requestURL)
Convenience method for settingrequestURL
.- Parameters:
requestURL
- Request URL comparison value- Returns:
- A reference to this Builder instance
- See Also:
requestURL(org.linuxforhealth.fhir.model.type.String)
-
requestURL
public TestScript.Setup.Action.Assert.Builder requestURL(String requestURL)
The value to use in a comparison against the request URL path string.- Parameters:
requestURL
- Request URL comparison value- Returns:
- A reference to this Builder instance
-
resource
public TestScript.Setup.Action.Assert.Builder resource(FHIRDefinedType resource)
The type of the resource. See http://build.fhir.org/resourcelist.html.- Parameters:
resource
- Resource type- Returns:
- A reference to this Builder instance
-
response
public TestScript.Setup.Action.Assert.Builder response(AssertionResponseTypes response)
okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable.- Parameters:
response
- okay | created | noContent | notModified | bad | forbidden | notFound | methodNotAllowed | conflict | gone | preconditionFailed | unprocessable- Returns:
- A reference to this Builder instance
-
responseCode
public TestScript.Setup.Action.Assert.Builder responseCode(java.lang.String responseCode)
Convenience method for settingresponseCode
.- Parameters:
responseCode
- HTTP response code to test- Returns:
- A reference to this Builder instance
- See Also:
responseCode(org.linuxforhealth.fhir.model.type.String)
-
responseCode
public TestScript.Setup.Action.Assert.Builder responseCode(String responseCode)
The value of the HTTP response code to be tested.- Parameters:
responseCode
- HTTP response code to test- Returns:
- A reference to this Builder instance
-
sourceId
public TestScript.Setup.Action.Assert.Builder sourceId(Id sourceId)
Fixture to evaluate the XPath/JSONPath expression or the headerField against.- Parameters:
sourceId
- Fixture Id of source expression or headerField- Returns:
- A reference to this Builder instance
-
validateProfileId
public TestScript.Setup.Action.Assert.Builder validateProfileId(Id validateProfileId)
The ID of the Profile to validate against.- Parameters:
validateProfileId
- Profile Id of validation profile reference- Returns:
- A reference to this Builder instance
-
value
public TestScript.Setup.Action.Assert.Builder value(java.lang.String value)
Convenience method for settingvalue
.- Parameters:
value
- The value to compare to- Returns:
- A reference to this Builder instance
- See Also:
value(org.linuxforhealth.fhir.model.type.String)
-
value
public TestScript.Setup.Action.Assert.Builder value(String value)
The value to compare to.- Parameters:
value
- The value to compare to- Returns:
- A reference to this Builder instance
-
warningOnly
public TestScript.Setup.Action.Assert.Builder warningOnly(java.lang.Boolean warningOnly)
Convenience method for settingwarningOnly
.This element is required.
- Parameters:
warningOnly
- Will this assert produce a warning only on error?- Returns:
- A reference to this Builder instance
- See Also:
warningOnly(org.linuxforhealth.fhir.model.type.Boolean)
-
warningOnly
public TestScript.Setup.Action.Assert.Builder warningOnly(Boolean warningOnly)
Whether or not the test execution will produce a warning only on error for this assert.This element is required.
- Parameters:
warningOnly
- Will this assert produce a warning only on error?- Returns:
- A reference to this Builder instance
-
build
public TestScript.Setup.Action.Assert build()
- Specified by:
build
in interfaceBuilder<Element>
- Specified by:
build
in classBackboneElement.Builder
- Returns:
- An immutable object of type
TestScript.Setup.Action.Assert
- Throws:
java.lang.IllegalStateException
- if the current state cannot be built into a valid Assert per the base specification
-
validate
protected void validate(TestScript.Setup.Action.Assert _assert)
-
from
protected TestScript.Setup.Action.Assert.Builder from(TestScript.Setup.Action.Assert _assert)
-
-