MockAwsRequest class

A mock version of AwsRequest to help with testing

Constructors

MockAwsRequest(String awsAccessKey, String awsSecretKey, String region, {required Future<Response> mockFunction(Request), String? service, Duration timeout = const Duration(seconds: 10)})

Properties

awsAccessKey String
AWS access key
getter/setter pair
awsSecretKey String
AWS secret key
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
mockFunction Future<Response> Function(Request)
The function used to specify responses
getter/setter pair
region String
The region to send the request to
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
service String?
The aws service you are sending a request to
getter/setter pair
timeout Duration
The timeout on the request
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send({required AwsRequestType type, String? service, List<String> signedHeaders = const [], Map<String, String> headers = defaultHeaders, String jsonBody = '', String queryPath = '/', Map<String, String>? queryString, Duration? timeout}) Future<Response>
Builds, signs, and mocks aws http requests.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

staticSend({required String awsAccessKey, required String awsSecretKey, required String region, required String service, required AwsRequestType type, required Future<Response> mockFunction(Request), List<String> signedHeaders = const [], Map<String, String> headers = defaultHeaders, String jsonBody = '', String queryPath = '/', Map<String, String>? queryString, Duration timeout = const Duration(seconds: 10)}) Future<Response>
Statically Builds, signs, and mocks an aws http request.