dartz_test library

Set of matchers to test values of types defined in the dartz package

Classes

isLeftThat
Matcher that tries to extract the left value of an Either instance to match it against matcher
isRightThat
Matcher that tries to extract the right value of an Either instance to match it against matcher
isSomeThat
Matcher that tries to extract the value of a Some instance to match it against matcher

Extensions

TestEitherX on Either<L, R>
Extension on Either type to use in tests.
TestOptionX on Option<T>
Extension on Option type to use in tests.

Constants

isLeft → const Matcher
Matches if the object is of type Left.
isNone → const Matcher
Matches if the object is of type None
isRight → const Matcher
Matches if the object is of type Right.
isSome → const Matcher
Matches if the object is of type Some

Functions

isLeftOf(Object? expected) → Matcher
Returns a matcher that matches if the actual object is of type Left and the underlying value is equal (for ==) to the expected value.
isRightOf(Object? expected) → Matcher
Returns a matcher that matches if the actual object is of type Right and the underlying value is equal (for ==) to the expected value.
isSomeOf(Object expected) → Matcher
Matcher that matches with a Some instance whose underlying value is equal to expected. Equality is tested with ==