MockRule class

Constructors

MockRule({required String id, int delayMs = 0, int maxUses = 0, LikeMockFailure failure = LikeMockFailure.none, Map<String, String> responseHeaders = const {}, String name = '', String description = '', required String pathPattern, String baseUrlPattern = '', required String method, int statusCode = 200, required String responseBody, String requestBodyPattern = '', String queryParametersPattern = '', String headersPattern = '', bool isEnabled = true, bool useRegex = false})
MockRule.fromMap(Map map)
factory

Properties

baseUrlPattern → String
final
delayMs → int
final
description → String
final
failure → LikeMockFailure
final
hashCode → int
The hash code for this object.
no setterinherited
headersPattern → String
final
id → String
final
isEnabled → bool
final
maxUses → int
final
method → String
final
name → String
final
pathPattern → String
final
queryParametersPattern → String
final
requestBodyPattern → String
final
responseBody → String
final
responseHeaders → Map<String, String>
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
statusCode → int
final
useRegex → bool
final

Methods

copyWith({int? delayMs, int? maxUses, LikeMockFailure? failure, Map<String, String>? responseHeaders, String? id, String? name, String? description, String? pathPattern, String? baseUrlPattern, String? method, int? statusCode, String? responseBody, String? requestBodyPattern, String? queryParametersPattern, String? headersPattern, bool? isEnabled, bool? useRegex}) → MockRule
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

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