Trait

org.specs2.matcher

ThrownExpectations

Related Doc: package matcher

Permalink

trait ThrownExpectations extends ThrownExpectationsCreation

Thrown expectations will throw a FailureException if a match fails

This trait can be extended to be used in another framework like ScalaTest:

trait ScalaTestExpectations extends ThrownExpectations { override protected def checkFailure[T](m: =>MatchResult[T]) = { m match { case f @ MatchFailure(ok, ko, _, _, _) => throw new TestFailedException(f.message, f.exception, 0) case _ => () } m } }

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ThrownExpectations
  2. ThrownExpectationsCreation
  3. StandardMatchResults
  4. StandardResults
  5. ExpectationsCreation
  6. MatchResultStackTrace
  7. AnyRef
  8. 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 anError: Error

    Permalink
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def checkFailure[T](m: MatchResult[T]): MatchResult[T]

    Permalink

    this method can be overridden to throw exceptions when checking the match result

    this method can be overridden to throw exceptions when checking the match result

    Attributes
    protected
    Definition Classes
    ExpectationsCreation
  7. def checkMatchResultFailure[T](m: MatchResult[T]): MatchResult[T]

    Permalink

    this method can be overriden to throw exceptions when checking the match result

    this method can be overriden to throw exceptions when checking the match result

    Attributes
    protected
    Definition Classes
    ThrownExpectationsCreationExpectationsCreation
  8. def checkResultFailure(result: ⇒ Result): Result

    Permalink

    this method can be overridden to throw exceptions when checking the result

    this method can be overridden to throw exceptions when checking the result

    Attributes
    protected
    Definition Classes
    ThrownExpectationsCreationExpectationsCreation
  9. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def createExpectable[T](t: ⇒ T, alias: Option[(String) ⇒ String]): Expectable[T]

    Permalink

    returns

    an Expectable with a description function

    Definition Classes
    ThrownExpectationsCreationExpectationsCreation
  11. def createExpectable[T](t: ⇒ T, alias: (String) ⇒ String): Expectable[T]

    Permalink

    returns

    an Expectable with a description function

    Definition Classes
    ExpectationsCreation
  12. def createExpectable[T](t: ⇒ T, alias: ⇒ String): Expectable[T]

    Permalink

    returns

    an Expectable with a description

    Definition Classes
    ExpectationsCreation
  13. def createExpectable[T](t: ⇒ T): Expectable[T]

    Permalink

    returns

    an Expectable

    Definition Classes
    ExpectationsCreation
  14. def createExpectableWithShowAs[T](t: ⇒ T, show: ⇒ String): Expectable[T]

    Permalink

    returns

    an Expectable with a function to show the element T

    Definition Classes
    ThrownExpectationsCreationExpectationsCreation
  15. def done: Success

    Permalink
    Definition Classes
    StandardResults
  16. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  18. def failure(f: Failure): Failure

    Permalink
    Attributes
    protected
    Definition Classes
    ThrownExpectationsCreation
  19. def failure(m: String): Failure

    Permalink
    Attributes
    protected
    Definition Classes
    ThrownExpectationsCreation
  20. def failure: Failure

    Permalink
  21. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  22. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  23. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  24. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  25. def ko(m: String): MatchResult[Any]

    Permalink
    Definition Classes
    StandardMatchResults
  26. lazy val ko: MatchResult[Any]

    Permalink
  27. def mapMatchResult[T](m: MatchResult[T]): MatchResult[T]

    Permalink

    this method can be overridden to intercept a MatchResult and change its message before it is thrown

    this method can be overridden to intercept a MatchResult and change its message before it is thrown

    Attributes
    protected
    Definition Classes
    ExpectationsCreation
  28. final def ne(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef
  30. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  31. def ok(m: String): MatchResult[Any]

    Permalink
    Definition Classes
    StandardMatchResults
  32. lazy val ok: MatchResult[Any]

    Permalink
    Definition Classes
    StandardMatchResults
  33. def pending(p: Pending): Pending

    Permalink
    Attributes
    protected
    Definition Classes
    ThrownExpectationsCreation
  34. def pending(m: String): Pending

    Permalink
  35. def pending: Pending

    Permalink
  36. def pending[R](r: ⇒ R)(implicit arg0: AsResult[R]): Pending

    Permalink
    Definition Classes
    StandardResults
  37. def sandboxMatchResult[T](mr: ⇒ MatchResult[T]): MatchResult[T]

    Permalink

    returns

    the value without any side-effects for expectations

    Definition Classes
    ThrownExpectationsCreationExpectationsCreation
  38. def setStacktrace[T](m: MatchResult[T]): MatchResult[T]

    Permalink

    this method can be overridden to avoid filling-in a stacktrace indicating the location of the result

    this method can be overridden to avoid filling-in a stacktrace indicating the location of the result

    Attributes
    protected
    Definition Classes
    MatchResultStackTrace
  39. def skipped(s: Skipped): Skipped

    Permalink
    Attributes
    protected
    Definition Classes
    ThrownExpectationsCreation
  40. def skipped(m: String): Skipped

    Permalink
  41. def skipped: Skipped

    Permalink
  42. def skipped[R](r: ⇒ R)(implicit arg0: AsResult[R]): Skipped

    Permalink
    Definition Classes
    StandardResults
  43. def success(m: String): Success

    Permalink
    Attributes
    protected
    Definition Classes
    ThrownExpectationsCreation
  44. lazy val success: Success

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  47. def todo: Pending

    Permalink
  48. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. final def wait(arg0: Long, arg1: Int): Unit

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. def wontdo: Success

    Permalink
    Definition Classes
    StandardResults

Inherited from StandardMatchResults

Inherited from StandardResults

Inherited from ExpectationsCreation

Inherited from MatchResultStackTrace

Inherited from AnyRef

Inherited from Any

Ungrouped