Module expectations

Module expectations 

Source
Expand description

Definitions of the expectations that are provided by this crate.

Structs§

All
A combinator expectation that verifies that all containing expectations are met.
AllSatisfy
Any
A combinator expectation that verifies that any containing expectation is met.
AnySatisfies
DoesNotPanicpanic
DoesPanicpanic
ErrorHasSource
ErrorHasSourceMessage
HasAtLeastCharCount
HasAtLeastLength
HasAtLeastNumberOfElements
HasAtMostCharCount
HasAtMostLength
HasCharCount
HasCharCountGreaterThan
HasCharCountInRange
HasCharCountLessThan
HasDebugMessage
HasDisplayMessage
HasError
HasLength
HasLengthGreaterThan
HasLengthInRange
HasLengthLessThan
HasPrecisionOf
HasScaleOf
HasSingleElement
HasValue
IsANumber
IsAfter
IsAlphabetic
IsAlphanumeric
IsAscii
IsAtLeast
IsAtMost
IsBefore
IsBetween
IsCloseTo
IsControlChar
IsDigit
IsEmpty
IsEqualTo
IsErr
IsFalse
IsFinite
IsGreaterThan
IsInRange
IsInfinite
IsInteger
IsLessThan
IsLowerCase
IsNegative
IsNone
IsOk
IsOne
IsPositive
IsSameAs
IsSome
IsTrue
IsUpperCase
IsWhitespace
IsZero
IteratorContains
IteratorContainsAllInOrder
IteratorContainsAllOf
IteratorContainsAnyOf
IteratorContainsExactly
IteratorContainsExactlyInAnyOrder
IteratorContainsOnly
IteratorContainsOnlyOnce
IteratorContainsSequence
IteratorEndsWith
IteratorStartsWith
MapContainsExactlyKeys
MapContainsKey
MapContainsKeys
MapContainsValue
MapContainsValues
MapDoesNotContainKeys
MapDoesNotContainValues
NoneSatisfies
Not
A combinator expectation that inverts the wrapped expectation.
Predicate
Rec
A combinator expectation that memorizes (“records”) the result of the wrapped expectation.
StringContains
StringContainsAnyOf
StringEndsWith
StringMatchesregex
StringStartWith

Traits§

IntoRec
Trait to convert a type into another type that wraps the contained expectation(s) into Rec(s).

Functions§

all
Creates an All expectation combinator from a tuple of expectations.
all_satisfy
any
Creates an Any expectation combinator from a tuple of expectations.
any_satisfies
does_not_panicpanic
Creates a DoesNotPanic expectation.
does_panicpanic
Creates a DoesPanic expectation.
error_has_source
Creates an ErrorHasSource expectation.
error_has_source_message
Creates an ErrorHasSourceMessage expectation.
has_at_least_char_count
Creates a HasAtLeastCharCount expectation.
has_at_least_length
Creates a HasAtLeastLength expectation.
has_at_least_number_of_elements
has_at_most_char_count
Creates a HasAtMostCharCount expectation.
has_at_most_length
Creates a HasAtMostLength expectation.
has_char_count
Creates a HasCharCount expectation.
has_char_count_greater_than
Creates a HasCharCount expectation.
has_char_count_in_range
Creates a HasCharCountInRange expectation.
has_char_count_less_than
Creates a HasCharCountLessThan expectation.
has_debug_message
Creates a HasDebugMessage expectation.
has_display_message
Creates a HasDisplayMessage expectation.
has_error
Creates a HasError expectation.
has_length
Creates a HasLength expectation.
has_length_greater_than
Creates a HasLengthGreaterThan expectation.
has_length_in_range
Creates a HasLengthInRange expectation.
has_length_less_than
Creates a HasLengthLessThan expectation.
has_precision_of
Creates a HasPrecisionOf expectation.
has_scale_of
Creates a HasScaleOf expectation.
has_single_element
has_value
Creates a HasValue expectation.
is_a_number
Creates an IsANumber expectation.
is_after
Creates an IsAfter expectation.
is_alphabetic
Creates an IsAlphabetic expectation.
is_alphanumeric
Creates an IsAlphanumeric expectation.
is_ascii
Creates an IsAscii expectation.
is_at_least
Creates an IsAtLeast expectation.
is_at_most
Creates an IsAtMost expectation.
is_before
Creates an IsBefore expectation.
is_between
Creates an IsBetween expectation.
is_close_to
Creates an IsCloseTo expectation.
is_control_char
Creates an IsControlChar expectation.
is_digit
Creates an IsDigit expectation.
is_empty
Creates an IsEmpty expectation.
is_equal_to
Creates an IsEqualTo expectation.
is_err
Creates an IsErr expectation.
is_false
Creates a IsFalse expectation.
is_finite
Creates an IsFinite expectation.
is_greater_than
Creates an IsGreaterThan expectation.
is_in_range
Creates an IsInRange expectation.
is_infinite
Creates an IsInfinite expectation.
is_integer
Creates an IsInteger expectation.
is_less_than
Creates an IsLessThan expectation.
is_lower_case
Creates an IsLowerCase expectation.
is_negative
Creates an IsNegative expectation.
is_none
Creates an IsNone expectation.
is_ok
Creates an IsOk expectation.
is_one
Creates an IsOne expectation.
is_positive
Creates an IsPositive expectation.
is_same_as
Creates an IsSameAs expectation.
is_some
Creates an IsSome expectation.
is_true
Creates an IsTrue expectation.
is_upper_case
Creates an IsUpperCase expectation.
is_whitespace
Creates an IsWhitespace expectation.
is_zero
Creates an IsZero expectation.
iterator_contains
Creates an IteratorContains expectation.
iterator_contains_all_in_order
Creates an IteratorContainsAllInOrder expectation.
iterator_contains_all_of
Creates an IteratorContainsAllOf expectation.
iterator_contains_any_of
Creates an IteratorContainsAnyOf expectation.
iterator_contains_exactly
Creates an IteratorContainsExactly expectation.
iterator_contains_exactly_in_any_order
Creates an IteratorContainsExactlyInAnyOrder expectation.
iterator_contains_only
Creates an IteratorContainsOnly expectation.
iterator_contains_only_once
Creates an IteratorContainsOnlyOnce expectation.
iterator_contains_sequence
Creates an IteratorContainsAnyOf expectation.
iterator_ends_with
Creates an IteratorEndsWith expectation.
iterator_starts_with
Creates an IteratorStartsWith expectation.
map_contains_exactly_keys
Creates a MapContainsExactlyKeys expectation.
map_contains_key
Creates a MapContainsKey expectation.
map_contains_keys
Creates a MapContainsKeys expectation.
map_contains_value
Creates a MapContainsValue expectation.
map_contains_values
Creates a MapContainsValues expectation.
map_does_not_contain_keys
Creates a MapDoesNotContainKeys expectation.
map_does_not_contain_values
Creates a MapDoesNotContainValues expectation.
none_satisfies
not
Creates a Not expectation combinator wrapping the given expectation.
rec
Creates a Rec expectation combinator that wraps the given expectation.
satisfies
Creates a Predicate expectation from a predicate function.
string_contains
Creates a StringContains expectation.
string_contains_any_of
Creates a StringContainsAnyOf expectation.
string_ends_with
Creates a StringEndsWith expectation.
string_matchesregex
Creates a StringMatches expectation.
string_starts_with
Creates a StringStartWith expectation.