Validatable

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

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

class Object
trait Matchable
class Any

Value members

Concrete methods

def invalid: Invalid[E]

Returns the Validated passed to the constructor as an Invalid, if it is an Invalid, else throws TestFailedException with a detail message indicating the Validated was not an Invalid.

Returns the Validated passed to the constructor as an Invalid, if it is an Invalid, else throws TestFailedException with a detail message indicating the Validated was not an Invalid.

Allow .invalidValue on an validated to extract the invalid side. Like .value, but for the Invalid.

Allow .invalidValue on an validated to extract the invalid side. Like .value, but for the Invalid.

def valid: Valid[T]

Returns the Validated passed to the constructor as a Valid, if it is a Valid, else throws TestFailedException with a detail message indicating the Validated was not a Valid.

Returns the Validated passed to the constructor as a Valid, if it is a Valid, else throws TestFailedException with a detail message indicating the Validated was not a Valid.

def value: T