client_test library
Classes
-
ApiRequest<
TRequest extends RequestBase, TResponse extends ResponseBase> -
ApiRequestConfig<
TResponse extends ResponseBase> - AppContract
- The base contract definition.
- AppStackTrace
-
BaseAppApi<
TConfig extends BaseClientConfig> - The base API implementation for making live and mocked web requests.
- BaseClientConfig
- The configuration for the client API.
-
BaseClientRegistry<
TConfig extends BaseClientConfig> - The server-side injection registry.
- BaseConfig
- The base configuration model
- CognitoConfig
- The required Cognito configuration
- ErrorResponse
- MockHttpClient
- MockRequest
- MockResponse
-
Registry<
TConfig extends BaseConfig> - An injection registry.
- RequestBase
- ResponseBase
- TestClientConfig
Enums
Extensions
-
CollectionExtensions
on Iterable<
T> - DateTimeExtensions on DateTime
- FromStackTraceExtensions on StackTrace
- NumberExtensions on num
- Extensions used with numeric data types.
-
ToStackTraceExtensions
on Iterable<
String>
Functions
-
getTestConfig(
[Map< String, String> ? overrides]) → TestClientConfig -
getTestEnv(
[Map< String, String> ? overrides]) → Map<String, String> -
makeFakes<
T> ({required ThingGenerator< T> factory, int count = 20}) → List<T> -
Generates a non-growable
count
sized list of the items returned byfactory
. -
randomBool(
) → bool - Generates a random bool value.
-
randomId(
[int length = 12]) → String -
Generates a random alpha-numeric ascii encoded value of
the specified
length
(defaults to12
). -
randomInt(
int min, int max) → int -
Generates a random integer between
min
andmax
. -
uriContains(
String part) → Matcher -
uriEndsWith(
String suffix) → Matcher -
uriStartsWith(
String prefix) → Matcher
Typedefs
-
ApiTimeoutHandler<
TResponse> = (FutureOr< TResponse?> Function()?) - The timeout handler definition used by the BaseAppApi.
-
ConfigBuilder<
T, TConfig extends BaseConfig> = T Function(TConfig config) - The function signature of a configuration-driven factory builder
-
JsonDeserializer<
TResponse> = TResponse Function(Map< String, dynamic> json) -
MissingValueHandler<
T> = T? Function(String key) - RandomBool = bool Function()
- The shape of a bool producing function.
- RandomNumber = int Function(int min, int max)
- The shape of a number producing function.
-
ThingGenerator<
T> = T Function(int index, RandomNumber random, RandomBool yesOrNo) -
The shape of a
T
producing function. - UriResolver = Uri Function(String relative)