HttpResponseTestCase class

Inheritance
Annotations

Constructors

HttpResponseTestCase.new({required String id, String? documentation, required ShapeId protocol, ShapeId? authScheme, String? body, String? bodyMediaType, Map<String, Object?> params = const {}, ShapeId? vendorParamsShape, Map<String, Object?> vendorParams = const {}, Map<String, String> headers = const {}, List<String> forbidHeaders = const [], List<String> requireHeaders = const [], List<String> tags = const [], AppliesTo? appliesTo, required int code})
const
HttpResponseTestCase.fromJson(Map<String, Object?> json)
factory

Properties

appliesTo AppliesTo?
Indicates that the test case is only to be implemented by "client" or "server" implementations. This property is useful for identifying and testing edge cases of clients and servers that are impossible or undesirable to test in both client and server implementations. For example, a "server" test might be useful to ensure a service can gracefully receive a request that optionally contains a payload.
finalinherited
authScheme ShapeId?
A shape ID that specifies the optional authentication scheme to assume. It's possible that specific authentication schemes might influence the serialization logic of an HTTP request. The targeted shape MUST be marked with the AuthDefinitionTrait trait.
finalinherited
body String?
The expected HTTP message body. If no request body is defined, then no assertions are made about the body of the message. Because the body parameter is a string, binary data MUST be represented in body by base64 encoding the data (for example, use "Zm9vCg==" and not "foo").
finalinherited
bodyMediaType String?
The media type of the body. This is used to help test runners to parse and validate the expected data against generated data.
finalinherited
code int
final
documentation String?
A description of the test and what is being asserted defined in CommonMark.
finalinherited
forbidHeaders List<String>
A list of header field names that must not appear in the serialized HTTP request.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
A map of expected HTTP headers. Each key represents a header field name and each value represents the expected header value. An HTTP request is not in compliance with the protocol if any listed header is missing from the serialized request or if the expected header value differs from the serialized request value.
finalinherited
id String
The identifier of the test case. This identifier can be used by protocol test implementations to filter out unsupported test cases by ID, to generate test case names, etc. The provided id MUST match Smithy's smithy:identifier ABNF. No two httpRequestTests test cases can share the same ID.
finalinherited
params Map<String, Object?>
Defines the input parameters used to generate the HTTP request. These parameters MUST be compatible with the input of the operation.
finalinherited
props List<Object?>
The type's equatable properties.
no setteroverride
protocol ShapeId
A shape ID that targets a shape marked with the protocolDefinition trait. Because Smithy services can support multiple protocols, each test MUST specify which protocol is under test.
finalinherited
requireHeaders List<String>
A list of header field names that must appear in the serialized HTTP message, but no assertion is made on the value. Headers listed in headers do not need to appear in this list.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tags List<String>
Attaches a list of tags that allow test cases to be categorized and grouped.
finalinherited
vendorParams Map<String, Object?>
Defines vendor-specific parameters that are used to influence the request. For example, some vendors might utilize environment variables, configuration files on disk, or other means to influence the serialization formats used by clients or servers.
finalinherited
vendorParamsShape ShapeId?
A shape to be used to validate the vendorParams member contents.
finalinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, Object?>
Serializes this as a JSON object.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited