Struct TestScriptSetupActionAssertBuilder

Source
pub struct TestScriptSetupActionAssertBuilder { /* private fields */ }
Expand description

Implementations§

Source§

impl TestScriptSetupActionAssertBuilder

Source

pub fn id(self, value: String) -> TestScriptSetupActionAssertBuilder

Unique id for inter-element referencing

Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.

Source

pub fn extension( self, value: Vec<Extension>, ) -> TestScriptSetupActionAssertBuilder

Additional content defined by implementations

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 managable, 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.

There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.

Source

pub fn modifier_extension( self, value: Vec<Extension>, ) -> TestScriptSetupActionAssertBuilder

Extensions that cannot be ignored even if unrecognized

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 managable, 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).

There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions. The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.

Source

pub fn label(self, value: String) -> TestScriptSetupActionAssertBuilder

Tracking/logging assertion label

The label would be used for tracking/logging purposes by test engines.

This has no impact on the verification itself.

Source

pub fn label_ext( self, value: FieldExtension, ) -> TestScriptSetupActionAssertBuilder

Extension field.

Source

pub fn description(self, value: String) -> TestScriptSetupActionAssertBuilder

Tracking/reporting assertion description

The description would be used by test engines for tracking and reporting purposes.

This has no impact on the verification itself.

Source

pub fn description_ext( self, value: FieldExtension, ) -> TestScriptSetupActionAssertBuilder

Extension field.

Source

pub fn direction( self, value: AssertionDirectionType, ) -> TestScriptSetupActionAssertBuilder

AssertionDirectionType; response | request

The direction to use for the assertion.

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.

Source

pub fn direction_ext( self, value: FieldExtension, ) -> TestScriptSetupActionAssertBuilder

Extension field.

Source

pub fn compare_to_source_id( self, value: String, ) -> TestScriptSetupActionAssertBuilder

Id of the source fixture to be evaluated

Id of the source fixture used as the contents to be evaluated by either the “source/expression” or “sourceId/path” definition.

Source

pub fn compare_to_source_id_ext( self, value: FieldExtension, ) -> TestScriptSetupActionAssertBuilder

Extension field.

Source

pub fn compare_to_source_expression( self, value: String, ) -> TestScriptSetupActionAssertBuilder

The FHIRPath expression to evaluate against the source fixture

The FHIRPath expression for a specific value to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.

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.

Source

pub fn compare_to_source_expression_ext( self, value: FieldExtension, ) -> TestScriptSetupActionAssertBuilder

Extension field.

Source

pub fn compare_to_source_path( self, value: String, ) -> TestScriptSetupActionAssertBuilder

XPath or JSONPath expression to evaluate against the source fixture

XPath or JSONPath expression to evaluate against the source fixture. When compareToSourceId is defined, either compareToSourceExpression or compareToSourcePath must be defined, but not both.

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.

Source

pub fn compare_to_source_path_ext( self, value: FieldExtension, ) -> TestScriptSetupActionAssertBuilder

Extension field.

Source

pub fn content_type(self, value: String) -> TestScriptSetupActionAssertBuilder

MimeType; Mime type to compare against the ‘Content-Type’ header

The mime-type contents to compare against the request or response message ‘Content-Type’ header.

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.

Source

pub fn content_type_ext( self, value: FieldExtension, ) -> TestScriptSetupActionAssertBuilder

Extension field.

Source

pub fn default_manual_completion( self, value: AssertionManualCompletionType, ) -> TestScriptSetupActionAssertBuilder

AssertionManualCompletionType; fail | pass | skip | stop

The default manual completion outcome applied to this assertion.

Manual completion is used to pause the test engine execution and evaluation allowing an external review of the defined assert condition. The defaultManualCompletion defines the default manual completion outcome applied if one of the enumerated values is not applied.

Source

pub fn default_manual_completion_ext( self, value: FieldExtension, ) -> TestScriptSetupActionAssertBuilder

Extension field.

Source

pub fn expression(self, value: String) -> TestScriptSetupActionAssertBuilder

The FHIRPath expression to be evaluated

The FHIRPath expression to be evaluated against the request or response message contents - HTTP headers and payload.

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.

The FHIRPath expression can be evaluated as either a path to a specific value or as a boolean expression against the given FHIR resource. When the FHIRPath is a boolean expression, the assert.value element is not used. See Testing FHIR Use Expressions.

Source

pub fn expression_ext( self, value: FieldExtension, ) -> TestScriptSetupActionAssertBuilder

Extension field.

Source

pub fn header_field(self, value: String) -> TestScriptSetupActionAssertBuilder

HTTP header field name

The HTTP header field name e.g. ‘Location’.

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.

Source

pub fn header_field_ext( self, value: FieldExtension, ) -> TestScriptSetupActionAssertBuilder

Extension field.

Source

pub fn minimum_id(self, value: String) -> TestScriptSetupActionAssertBuilder

Fixture Id of minimum content resource

The ID of a fixture. Asserts that the response contains at a minimum the fixture specified by minimumId.

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.

See Testing FHIR Use minimumId for a more complete description of the test engine’s comparison logic.

Source

pub fn minimum_id_ext( self, value: FieldExtension, ) -> TestScriptSetupActionAssertBuilder

Extension field.

Perform validation on navigation links?

Whether or not the test execution performs validation on the bundle navigation links.

Asserts that the Bundle contains first, last, and next links.

Extension field.

Source

pub fn operator( self, value: AssertionOperatorType, ) -> TestScriptSetupActionAssertBuilder

AssertionOperatorType; equals | notEquals | in | notIn | greaterThan | lessThan | empty | notEmpty | contains | notContains | eval | manualEval

The operator type defines the conditional behavior of the assert.

Operators are useful for both positive and negative testing. If operator is not specified, then the default conditional behavior is implemented as defined in Testing FHIR Assertions.

Source

pub fn operator_ext( self, value: FieldExtension, ) -> TestScriptSetupActionAssertBuilder

Extension field.

Source

pub fn path(self, value: String) -> TestScriptSetupActionAssertBuilder

XPath or JSONPath expression

The XPath or JSONPath expression to be evaluated against the fixture representing the response received from server.

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.

Source

pub fn path_ext( self, value: FieldExtension, ) -> TestScriptSetupActionAssertBuilder

Extension field.

Source

pub fn request_method( self, value: TestScriptRequestMethodCode, ) -> TestScriptSetupActionAssertBuilder

TestScriptRequestMethodCode; delete | get | options | patch | post | put | head

The request method or HTTP operation code to compare against that used by the client system under test.

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.

Source

pub fn request_method_ext( self, value: FieldExtension, ) -> TestScriptSetupActionAssertBuilder

Extension field.

Source

pub fn request_url(self, value: String) -> TestScriptSetupActionAssertBuilder

Request URL comparison value

The value to use in a comparison against the request URL path string.

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.

Source

pub fn request_url_ext( self, value: FieldExtension, ) -> TestScriptSetupActionAssertBuilder

Extension field.

Source

pub fn resource(self, value: String) -> TestScriptSetupActionAssertBuilder

FHIRConcreteType; Resource type

The type of the resource. See the resource list.

This will be expected resource type in response body e.g. in read, vread, search, etc. See the Resource List for complete list of resource types; e.g. <resourceType value=“Patient” .

Source

pub fn resource_ext( self, value: FieldExtension, ) -> TestScriptSetupActionAssertBuilder

Extension field.

Source

pub fn response( self, value: AssertionResponseTypes, ) -> TestScriptSetupActionAssertBuilder

AssertionResponseTypes; continue | switchingProtocols | okay | created | accepted | nonAuthoritativeInformation | noContent | resetContent | partialContent | multipleChoices | movedPermanently | found | seeOther | notModified | useProxy | temporaryRedirect | permanentRedirect | badRequest | unauthorized | paymentRequired | forbidden | notFound | methodNotAllowed | notAcceptable | proxyAuthenticationRequired | requestTimeout | conflict | gone | lengthRequired | preconditionFailed | contentTooLarge | uriTooLong | unsupportedMediaType | rangeNotSatisfiable | expectationFailed | misdirectedRequest | unprocessableContent | upgradeRequired | internalServerError | notImplemented | badGateway | serviceUnavailable | gatewayTimeout | httpVersionNotSupported

continue | switchingProtocols | okay | created | accepted | nonAuthoritativeInformation | noContent | resetContent | partialContent | multipleChoices | movedPermanently | found | seeOther | notModified | useProxy | temporaryRedirect | permanentRedirect | badRequest | unauthorized | paymentRequired | forbidden | notFound | methodNotAllowed | notAcceptable | proxyAuthenticationRequired | requestTimeout | conflict | gone | lengthRequired | preconditionFailed | contentTooLarge | uriTooLong | unsupportedMediaType | rangeNotSatisfiable | expectationFailed | misdirectedRequest | unprocessableContent | upgradeRequired | internalServerError | notImplemented | badGateway | serviceUnavailable | gatewayTimeout | httpVersionNotSupported.

This is a shorter way of achieving similar verifications via “assert.responseCode”. If you need more control, then use “assert.responseCode” e.g. .

Source

pub fn response_ext( self, value: FieldExtension, ) -> TestScriptSetupActionAssertBuilder

Extension field.

Source

pub fn response_code(self, value: String) -> TestScriptSetupActionAssertBuilder

HTTP response code to test

The value of the HTTP response code to be tested.

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.

Source

pub fn response_code_ext( self, value: FieldExtension, ) -> TestScriptSetupActionAssertBuilder

Extension field.

Source

pub fn source_id(self, value: String) -> TestScriptSetupActionAssertBuilder

Fixture Id of source expression or headerField

Fixture to evaluate the XPath/JSONPath expression or the headerField against.

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.

Source

pub fn source_id_ext( self, value: FieldExtension, ) -> TestScriptSetupActionAssertBuilder

Extension field.

Source

pub fn stop_test_on_fail( self, value: bool, ) -> TestScriptSetupActionAssertBuilder

If this assert fails, will the current test execution stop?

Whether or not the current test execution will stop on failure for this assert.

If this element is specified and it is true, then assertion failures should not stop the current test execution from proceeding.

Source

pub fn stop_test_on_fail_ext( self, value: FieldExtension, ) -> TestScriptSetupActionAssertBuilder

Extension field.

Source

pub fn validate_profile_id( self, value: String, ) -> TestScriptSetupActionAssertBuilder

Profile Id of validation profile reference

The ID of the Profile to validate against.

The ID of a Profile fixture. Asserts that the response is valid according to the Profile specified by validateProfileId.

Source

pub fn validate_profile_id_ext( self, value: FieldExtension, ) -> TestScriptSetupActionAssertBuilder

Extension field.

Source

pub fn value(self, value: String) -> TestScriptSetupActionAssertBuilder

The value to compare to

The value to compare to.

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.

Source

pub fn value_ext( self, value: FieldExtension, ) -> TestScriptSetupActionAssertBuilder

Extension field.

Source

pub fn warning_only(self, value: bool) -> TestScriptSetupActionAssertBuilder

Will this assert produce a warning only on error?

Whether or not the test execution will produce a warning only on error for this assert.

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.

Source

pub fn warning_only_ext( self, value: FieldExtension, ) -> TestScriptSetupActionAssertBuilder

Extension field.

Source

pub fn requirement( self, value: Vec<Option<TestScriptSetupActionAssertRequirement>>, ) -> TestScriptSetupActionAssertBuilder

Links or references to the testing requirements

Links or references providing traceability to the testing requirements for this assert.

TestScript and TestReport instances are typically (and expected to be) based on known, defined test requirements and documentation. These links provide traceability from the executable/executed TestScript and TestReport tests to these requirements.

Source

pub fn requirement_ext( self, value: Vec<Option<FieldExtension>>, ) -> TestScriptSetupActionAssertBuilder

Extension field.

Source

pub fn build(self) -> Result<TestScriptSetupActionAssert, BuilderError>

Builds a new TestScriptSetupActionAssert.

§Errors

If a required field has not been initialized.

Trait Implementations§

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,