I am relatively new to Scala Test, and so I consulted the documentation on how to test on Either
values.
I tried to replicate the instructions like that:
import org.scalatest.EitherValues
import org.scalatest.flatspec.AnyFlatSpec
class EitherTest extends AnyFlatSpec with EitherValues {
val either: Either[Exception, Int] = Right(42)
either.right.value should be > 1
}
This implementation does not do the trick, I get a syntax error. What did I do wrong?
Error:
Error:(9, 22) value should is not a member of Int either.right.value should be > 1 Error:(9, 29) not found: value be either.right.value should be > 1 – Hannes 14 hours ago