RightValuable

org.scalatest.EitherValues.RightValuable
class RightValuable[L, R](rightProj: RightProjection[L, R], pos: Position) extends Serializable

Wrapper class that adds a value method to RightProjection, allowing you to make statements like:

either.right.value should be > 9

Value parameters

rightProj

A RightProjection to convert to RightValuable, which provides the value method.

Attributes

Graph
Supertypes
trait Serializable
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def value: R

Returns the Right value contained in the wrapped RightProjection, if defined as a Right, else throws TestFailedException with a detail message indicating the Either was defined as a Right, not a Left.

Returns the Right value contained in the wrapped RightProjection, if defined as a Right, else throws TestFailedException with a detail message indicating the Either was defined as a Right, not a Left.

Attributes