Class/Object

org.specs2.matcher

Expectable

Related Docs: object Expectable | package matcher

Permalink

class Expectable[+T] extends AnyRef

The Expectable class models anything which can be checked by applying a Matcher

It stores a value which is only evaluated when necessary and an optional additional description for that value.

The Expectable object is responsible for creating its own description, based on the value toString method and and an additional description.

Self Type
Expectable[T]
Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Expectable
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def applyMatcher[S >: T](m: ⇒ Matcher[S]): MatchResult[S]

    Permalink

    apply a matcher on the value and return a MatchResult which can later on be transformed to a simple Result

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def check[S >: T](result: MatchResult[S]): MatchResult[S]

    Permalink

    additional checks can be done on the result, such as throwing an exception

  7. def checkResult(result: Result): Result

    Permalink

    additional checks can be done on a result, such as throwing an exception

  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  9. def describe(v: Any): String

    Permalink

    returns

    a description of any value with the custom description

  10. def description: String

    Permalink

    returns

    a description of the value provided by the user a combination of the value show by specs2 and an optional description

  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  13. def evaluate: Expectable[T]

    Permalink

    evaluate the value and return the same expectable

  14. def evaluateOnce: Expectable[T]

    Permalink

    evaluate the value once and return an expectable with the same expression, ready to be evaluated again

  15. def flatMap[S](f: (T) ⇒ Expectable[S]): Expectable[S]

    Permalink

    apply a function to the value

  16. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  17. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. def map[S](other: S): Expectable[S]

    Permalink

    change the expectable value

  20. def map[S](f: (T) ⇒ S): Expectable[S]

    Permalink

    apply a function to the expectable value

  21. def mapDescription(d: String): Expectable[T]

    Permalink
  22. def mapDescription(d: (String) ⇒ String): Expectable[T]

    Permalink
  23. def mapDescription(d: Option[(String) ⇒ String]): Expectable[T]

    Permalink

    apply a function to the description function

  24. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  25. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  26. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  27. def optionalDescription: Option[(String) ⇒ String]

    Permalink

    returns

    the optional description function

  28. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  29. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  30. def updateDescription(d: (String) ⇒ String): Expectable[T]

    Permalink

    update the description with another description

  31. lazy val value: T

    Permalink

    the value is only evaluated if necessary

  32. lazy val valueDefinition: () ⇒ T

    Permalink

    definition of the value, possibly evaluating to different results each time it is invoked

  33. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped