Use .leftValue on an Xor to extract the left side.
Use .leftValue on an Xor to extract the left side. Like .value, but for the left. If the value is a right, the test will fail.
Extract the Xor.Right
from the Xor.
Extract the Xor.Right
from the Xor. If the value is not a right the test will fail.
Container class for matching success type stuff in
cats.data.Xor
containers, similar toorg.scalatest.OptionValues.Valuable
Meant to allow you to make statements like:
Where it only matches if result is
Valid
and is also greater than 15.Otherwise your test will fail, indicating that it was left instead of right
org.scalatest.OptionValues.Valuable