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
Type members
Inherited classlikes
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 aValidatable
- See also:
org.scalatest.OptionValues.Valuable
- Inherited from:
- ValidatedValues
Implicits
Inherited implicits
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 thevalue
method
- Inherited from:
- ValidatedValues