ValidatedValues

Companion object for easy importing – rather than mixing in – to allow ValidatedValues operations.

This will permit you to invoke a value method on an instance of a cats.data.Validated, which attempts to unwrap the Validated.Valid

Similar to org.scalatest.OptionValues.Valuable

Meant to allow you to make statements like:

 result.value should be > 15 

Where it only matches if result is both valid and greater than 15.

Otherwise your test will fail, indicating that it was an Invalid instead of Valid

See also:

org.scalatest.OptionValues.Valuable

Companion:
class
class Object
trait Matchable
class Any

Type members

Inherited classlikes

final class Validatable[E, T](validated: Validated[E, T], pos: Position)

Container class for matching success type stuff in cats.data.Validated containers, similar to org.scalatest.OptionValues.Valuable

Container class for matching success type stuff in cats.data.Validated containers, similar to org.scalatest.OptionValues.Valuable

Meant to allow you to make statements like:

 result.value should be > 15 result.valid.value should be(Valid(15)) 

Where it only matches if result is Valid(9)

Otherwise your test will fail, indicating that it was left instead of right

Value parameters:
validated

A cats.data.Validated object to try converting to a Validatable

See also:

org.scalatest.OptionValues.Valuable

Inherited from:
ValidatedValues

Implicits

Inherited implicits

implicit def convertValidatedToValidatable[E, T](validated: Validated[E, T])(implicit pos: Position): Validatable[E, T]

Implicit conversion that adds a value method to cats.data.Validated

Implicit conversion that adds a value method to cats.data.Validated

Value parameters:
validated

the cats.data.Validated on which to add the value method

Inherited from:
ValidatedValues