ValidatedMatchers

Import singleton in case you prefer to import rather than mix in.

import ValidatedMatchers._
result should beValid (100)
Companion:
class
class Object
trait Matchable
class Any

Value members

Inherited methods

def beInvalid[E](element: E): Matcher[Validated[E, _]]

Checks if a cats.data.Validated is a specific Invalid element.

Checks if a cats.data.Validated is a specific Invalid element.

Inherited from:
ValidatedMatchers
def beValid[T](element: T): Matcher[Validated[_, T]]

Checks if a cats.data.Validated is an instance of Valid.

Checks if a cats.data.Validated is an instance of Valid.

Inherited from:
ValidatedMatchers
def haveAnInvalid[E : Typeable]: Matcher[Validated[NonEmptyList[Any], _]]

Checks if a cats.data.ValidatedNel contains a failure element matching a specific type Usage:

Checks if a cats.data.ValidatedNel contains a failure element matching a specific type Usage:

 validationObj should haveAnInvalid[someErrorType]

Can also be used to test multiple elements: `

validationObj should (haveAnInvalid[someErrorType] and
                     haveAnInvalid[someOtherErrorType])
Inherited from:
ValidatedMatchers
def haveInvalid[E](element: E): Matcher[Validated[NonEmptyList[E], _]]

Checks if a cats.data.ValidatedNel contains a specific failure element Usage:

Checks if a cats.data.ValidatedNel contains a specific failure element Usage:

 validationObj should haveInvalid (someErrorMessageOrObject)

Can also be used to test multiple elements: `

validationObj should (haveInvalid (someErrorMessageOrObject) and
                     haveInvalid (someOtherErrorMessageOrObject))
Inherited from:
ValidatedMatchers
def invalid[E]: BeMatcher[Validated[E, _]]

Checks if the cats.data.Validated is an Invalid.

Checks if the cats.data.Validated is an Invalid.

Inherited from:
ValidatedMatchers
def valid[T]: BeMatcher[Validated[_, T]]

Checks if a cats.data.Validated is a Valid.

Checks if a cats.data.Validated is a Valid.

Inherited from:
ValidatedMatchers