Trait/Object

org.specs2.matcher

ExceptionMatchers

Related Docs: object ExceptionMatchers | package matcher

Permalink

trait ExceptionMatchers extends ExceptionBaseMatchers with ExceptionBeHaveMatchers

These matchers can be used to check if exceptions are thrown or not

Linear Supertypes
ExceptionBeHaveMatchers, BeHaveMatchers, ExceptionBaseMatchers, ExpectationsCreation, MatchResultStackTrace, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ExceptionMatchers
  2. ExceptionBeHaveMatchers
  3. BeHaveMatchers
  4. ExceptionBaseMatchers
  5. ExpectationsCreation
  6. MatchResultStackTrace
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. class ExceptionClassMatcher extends Matcher[Any]

    Permalink

    Exception matcher checking the type of a thrown exception.

    Exception matcher checking the type of a thrown exception.

    Definition Classes
    ExceptionBaseMatchers
  2. class ExceptionMatcher[E <: Throwable] extends Matcher[Any]

    Permalink

    This matchers matches exception instances.

    This matchers matches exception instances.

    Definition Classes
    ExceptionBaseMatchers
    See also

    throwA

  3. implicit class ExceptionMatcherResult[T] extends AnyRef

    Permalink
    Definition Classes
    ExceptionBeHaveMatchers

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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def be: NeutralMatcher[Any]

    Permalink
    Definition Classes
    BeHaveMatchers
  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 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
  8. def checkResultFailure(r: ⇒ 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
    ExpectationsCreation
  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
    ExpectationsCreation
  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, showAs: ⇒ String): Expectable[T]

    Permalink

    returns

    an Expectable with a function to show the element T

    Definition Classes
    ExpectationsCreation
  15. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  17. def finalize(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  20. def have: NeutralMatcher[Any]

    Permalink
    Definition Classes
    BeHaveMatchers
  21. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  22. 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
  23. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. def not: NotMatcher[Any]

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

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

    Permalink
    Definition Classes
    AnyRef
  27. def sandboxMatchResult[T](mr: ⇒ MatchResult[T]): MatchResult[T]

    Permalink

    returns

    the match result without any side-effects

    Attributes
    protected
    Definition Classes
    ExpectationsCreation
  28. 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
  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  30. def throwA[E <: Throwable](e: E): ExceptionMatcher[E]

    Permalink

    returns

    a matcher checking the value of an Exception

    Definition Classes
    ExceptionBaseMatchers
  31. def throwA[E <: Throwable](message: String = ".*")(implicit m: ClassTag[E]): Matcher[Any]

    Permalink

    returns

    a matcher checking the type of an Exception and its message (as a regexp)

    Definition Classes
    ExceptionBaseMatchers
  32. def throwA[E <: Throwable](implicit m: ClassTag[E]): ExceptionClassMatcher

    Permalink

    returns

    a matcher checking the type of an Exception

    Definition Classes
    ExceptionBaseMatchers
  33. def throwAn[E <: Throwable](e: E): ExceptionMatcher[E]

    Permalink

    alias for throwA

    alias for throwA

    Definition Classes
    ExceptionBaseMatchers
  34. def throwAn[E <: Throwable](message: String = ".*")(implicit m: ClassTag[E]): Matcher[Any]

    Permalink

    alias for throwA

    alias for throwA

    Definition Classes
    ExceptionBaseMatchers
  35. def throwAn[E <: Throwable](implicit m: ClassTag[E]): ExceptionClassMatcher

    Permalink

    alias for throwA

    alias for throwA

    Definition Classes
    ExceptionBaseMatchers
  36. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  37. final def wait(): Unit

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

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

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

Inherited from ExceptionBeHaveMatchers

Inherited from BeHaveMatchers

Inherited from ExceptionBaseMatchers

Inherited from ExpectationsCreation

Inherited from MatchResultStackTrace

Inherited from AnyRef

Inherited from Any

Ungrouped