class Valuable[A, B] extends AnyRef
Wrapper class that adds a valueAt
method to PartialFunction
, allowing
you to make statements like:
pf.valueAt("VI") should equal (6)
- Alphabetic
- By Inheritance
- Valuable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Valuable(pf: PartialFunction[A, B], pos: Position)
- pf
An
PartialFunction
to convert toValuable
, which provides thevalueAt
method.
Value Members
-
def
valueAt(input: A): B
Returns the result of applying the wrapped
PartialFunction
to the passed input, if it is defined at that input, else throwsTestFailedException
with a detail message indicating thePartialFunction
was not defined at the given input.Returns the result of applying the wrapped
PartialFunction
to the passed input, if it is defined at that input, else throwsTestFailedException
with a detail message indicating thePartialFunction
was not defined at the given input.