MatchesRequest extension

MatchesRequest enhances the RequestOptions by allowing different types of matchers to validate the data and headers of the request.

on
  • RequestOptions

Methods

doesRouteMatch(dynamic actual, dynamic expected) bool
Check to see if route matches the mock specification Allows user to specify route as they intend rather than assuming string is a pattern. Route will be dynamic.
matches(dynamic actual, dynamic expected, {bool exactMaps = false}) bool
Check the map keys and values determined by the definition.
matchesRequest(Request request, bool needsExactBody) bool
Check values against matchers. request is the configured Request which would contain the matchers if used.