org.scalatest.matchers

MustMatchers

object MustMatchers extends MustMatchers

Companion object that facilitates the importing of Matchers members as an alternative to mixing it the trait. One use case is to import Matchers members so you can use them in the Scala interpreter:

$scala -classpath scalatest.jar
Welcome to Scala version 2.7.3.final (Java HotSpot(TM) Client VM, Java 1.5.0_16).
Type in expressions to have them evaluated.
Type :help for more information.

scala> import org.scalatest.Matchers._ import org.scalatest.Matchers._

scala> 1 must equal (2) org.scalatest.TestFailedException: 1 did not equal 2 at org.scalatest.matchers.Helper$.newTestFailedException(Matchers.template:40) at org.scalatest.matchers.MustMatchers$MustMethodHelper$.mustMatcher(MustMatchers.scala:826) at org.scalatest.matchers.MustMatchers$IntMustWrapper.must(MustMatchers.scala:1123) at .<init>(<console>:9) at .<clinit>(<console>) at RequestR...

scala> "hello, world" must startWith ("hello")

scala> 7 must (be >= (3) and not be <= (7)) org.scalatest.TestFailedException: 7 was greater than or equal to 3, but 7 was less than or equal to 7 at org.scalatest.matchers.Helper$.newTestFailedException(Matchers.template:40) at org.scalatest.matchers.MustMatchers$MustMethodHelper$.mustMatcher(MustMatchers.scala:826) at org.scalatest.matchers.MustMatchers$IntMustWrapper.must(MustMatchers.scala:1123) at .<init>(...

Annotations
@deprecated
Deprecated

Please use org.scalatest.Matchers instead.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MustMatchers
  2. MustMatchers
  3. Explicitly
  4. MatcherWords
  5. LoneElement
  6. MustVerb
  7. Tolerance
  8. Assertions
  9. LegacyTripleEquals
  10. EqualityConstraints
  11. AnyRef
  12. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. final class AWord extends AnyRef

    This class is part of the ScalaTest matchers DSL.

  2. final class AnWord extends AnyRef

    This class is part of the ScalaTest matchers DSL.

  3. class AnyMustWrapper[T] extends AnyRef

    This class is part of the ScalaTest matchers DSL.

  4. final class ArrayMustWrapper[E] extends AnyMustWrapper[Array[E]]

    This class is part of the ScalaTest matchers DSL.

  5. trait ContainMethods[T] extends AnyRef

    Definition Classes
    MustMatchers
  6. class DecidedWord extends AnyRef

    Definition Classes
    Explicitly
  7. final class HavePropertyMatcherGenerator extends AnyRef

    This class is part of the ScalaTest matchers DSL.

  8. final class JavaCollectionMustWrapper[E, L[_] <: Collection[_]] extends AnyMustWrapper[L[E]]

    This class is part of the ScalaTest matchers DSL.

  9. final class JavaMapMustWrapper[K, V, L[_, _] <: Map[_, _]] extends AnyMustWrapper[L[K, V]]

    This class is part of the ScalaTest matchers DSL.

  10. final class KeyWord extends AnyRef

    This class is part of the ScalaTest matchers DSL.

  11. final class LoneElementTraversableWrapper[T] extends AnyRef

    Definition Classes
    LoneElement
  12. final class MapMustWrapper[K, V, L[_, _] <: GenMap[_, _]] extends AnyMustWrapper[L[K, V]]

    This class is part of the ScalaTest matchers DSL.

  13. final class PlusOrMinusWrapper[T] extends AnyRef

    Wrapper class with a +- method that, given a Numeric argument, returns an Interval.

  14. final class RegexWord extends AnyRef

    This class is part of the ScalaTest matchers DSL.

  15. final class RegexWrapper extends AnyRef

    This class is part of the ScalaTest matchers DSL.

  16. class ResultOfBeWordForAny[T] extends AnyRef

    This class is part of the ScalaTest matchers DSL.

  17. sealed class ResultOfBeWordForCollectedAny[T] extends AnyRef

    This class is part of the ScalaTest matchers DSL.

  18. final class ResultOfBeWordForCollectedArray[T] extends ResultOfBeWordForCollectedAny[Array[T]]

    This class is part of the ScalaTest matchers DSL.

  19. sealed class ResultOfCollectedAny[T] extends AnyRef

    This class is part of the ScalaTest matchers DSL.

  20. final class ResultOfCollectedArray[T] extends ResultOfCollectedAny[Array[T]]

    This class is part of the ScalaTest matchers DSL.

  21. final class ResultOfCollectedGenMap[K, V] extends ResultOfCollectedAny[GenMap[K, V]]

    This class is part of the ScalaTest matchers DSL.

  22. final class ResultOfCollectedGenTraversable[E, C[_] <: GenTraversable[_]] extends ResultOfCollectedAny[C[E]]

    This class is part of the ScalaTest matchers DSL.

  23. final class ResultOfCollectedString extends ResultOfCollectedAny[String]

    This class is part of the ScalaTest matchers DSL.

  24. final class ResultOfContainWordForCollectedArray[T] extends AnyRef

    This class is part of the ScalaTest matchers DSL.

  25. final class ResultOfContainWordForCollectedGenMap[K, V] extends AnyRef

    This class is part of the ScalaTest matchers DSL.

  26. final class ResultOfContainWordForCollectedGenTraversable[E, C[_] <: GenTraversable[_]] extends AnyRef

    This class is part of the ScalaTest matchers DSL.

  27. final class ResultOfContainWordForJavaCollection[E, L[_] <: Collection[_]] extends AnyRef

    This class is part of the ScalaTest matchers DSL.

  28. final class ResultOfContainWordForJavaMap[K, V] extends AnyRef

    This class is part of the ScalaTest matchers DSL.

  29. final class ResultOfContainWordForMap[K, V] extends ContainMethods[(K, V)]

    This class is part of the ScalaTest matchers DSL.

  30. class ResultOfContainWordForTraversable[E] extends ContainMethods[E]

    This class is part of the ScalaTest matchers DSL.

  31. final class ResultOfElementWordApplication[T] extends AnyRef

    This class is part of the ScalaTest matchers DSL.

  32. final class ResultOfEndWithWordForCollectedString extends AnyRef

    This class is part of the ScalaTest matchers DSL.

  33. final class ResultOfEndWithWordForString extends AnyRef

    This class is part of the ScalaTest matchers DSL.

  34. final class ResultOfEvaluatingApplication extends AnyRef

    This class is part of the ScalaTest matchers DSL.

  35. final class ResultOfFullyMatchWordForCollectedString extends AnyRef

    This class is part of the ScalaTest matchers DSL.

  36. final class ResultOfFullyMatchWordForString extends AnyRef

    This class is part of the ScalaTest matchers DSL.

  37. final class ResultOfHaveWordForCollectedExtent[A] extends AnyRef

    This class is part of the ScalaTest matchers DSL.

  38. final class ResultOfHaveWordForExtent[A] extends AnyRef

    This class is part of the ScalaTest matchers DSL.

  39. final class ResultOfIncludeWordForCollectedString extends AnyRef

    This class is part of the ScalaTest matchers DSL.

  40. final class ResultOfIncludeWordForString extends AnyRef

    This class is part of the ScalaTest matchers DSL.

  41. class ResultOfNewContainWord[L] extends AnyRef

    Definition Classes
    MustMatchers
  42. sealed class ResultOfNotWordForCollectedAny[T] extends AnyRef

    This class is part of the ScalaTest matchers DSL.

  43. sealed class ResultOfNotWordForCollectedArray[E, T <: Array[E]] extends ResultOfNotWordForCollectedAny[T]

    This class is part of the ScalaTest matchers DSL.

  44. final class ResultOfNotWordForCollectedGenMap[K, V, T <: GenMap[K, V]] extends ResultOfNotWordForCollectedAny[T]

    This class is part of the ScalaTest matchers DSL.

  45. sealed class ResultOfNotWordForCollectedGenTraversable[E, C[_] <: GenTraversable[_]] extends ResultOfNotWordForCollectedAny[C[E]]

    This class is part of the ScalaTest matchers DSL.

  46. final class ResultOfNotWordForCollectedString extends ResultOfNotWordForCollectedAny[String]

    This class is part of the ScalaTest matchers DSL.

  47. final class ResultOfProduceInvocation[T] extends AnyRef

    This class is part of the ScalaTest matchers DSL.

  48. final class ResultOfStartWithWordForCollectedString extends AnyRef

    This class is part of the ScalaTest matchers DSL.

  49. final class ResultOfStartWithWordForString extends AnyRef

    This class is part of the ScalaTest matchers DSL.

  50. final class StringMustWrapper extends AnyMustWrapper[String] with StringMustWrapperForVerb

    This class is part of the ScalaTest matchers DSL.

  51. trait StringMustWrapperForVerb extends AnyRef

    This class supports the syntax of FlatSpec, WordSpec, fixture.FlatSpec, and fixture.WordSpec.

  52. class TheAfterWord extends AnyRef

    Definition Classes
    Explicitly
  53. final class TheSameInstanceAsPhrase extends AnyRef

    This class is part of the ScalaTest matchers DSL.

  54. class TraversableMustWrapper[E, L[_] <: GenTraversable[_]] extends AnyMustWrapper[L[E]]

    This class is part of the ScalaTest matchers DSL.

  55. final class ValueWord extends AnyRef

    This class is part of the ScalaTest matchers DSL.

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. def !==[T](right: Interval[T]): TripleEqualsInvocationOnInterval[T]

    Returns a TripleEqualsInvocationOnInterval[T], given an Interval[T], to facilitate the “<left> should !== (<pivot> +- <tolerance>)” syntax of Matchers.

    Returns a TripleEqualsInvocationOnInterval[T], given an Interval[T], to facilitate the “<left> should !== (<pivot> +- <tolerance>)” syntax of Matchers.

    right

    the Interval[T] against which to compare the left-hand value

    returns

    a TripleEqualsInvocationOnInterval wrapping the passed Interval[T] value, with expectingEqual set to false.

    Definition Classes
    EqualityConstraints
  4. def !==(right: Null): TripleEqualsInvocation[Null]

    Returns a TripleEqualsInvocation[Null], given a null reference, to facilitate the “<left> should !== null” syntax of Matchers.

    Returns a TripleEqualsInvocation[Null], given a null reference, to facilitate the “<left> should !== null” syntax of Matchers.

    right

    a null reference

    returns

    a TripleEqualsInvocation wrapping the passed null value, with expectingEqual set to false.

    Definition Classes
    EqualityConstraints
  5. def !==[T](right: T): TripleEqualsInvocation[T]

    Returns a TripleEqualsInvocation[T], given an object of type T, to facilitate the “<left> should !== <right>” syntax of Matchers.

    Returns a TripleEqualsInvocation[T], given an object of type T, to facilitate the “<left> should !== <right>” syntax of Matchers.

    right

    the right-hand side value for an equality assertion

    returns

    a TripleEqualsInvocation wrapping the passed right value, with expectingEqual set to false.

    Definition Classes
    EqualityConstraints
  6. final def ##(): Int

    Definition Classes
    AnyRef → Any
  7. def <[T](right: T)(implicit arg0: (T) ⇒ Ordered[T]): ResultOfLessThanComparison[T]

    This method enables the following syntax:

    This method enables the following syntax:

    num must (not be < (10) and not be > (17))
                       ^
    

    Definition Classes
    MustMatchers
  8. def <=[T](right: T)(implicit arg0: (T) ⇒ Ordered[T]): ResultOfLessThanOrEqualToComparison[T]

    This method enables the following syntax:

    This method enables the following syntax:

    num must (not be <= (10) and not be > (17))
                       ^
    

    Definition Classes
    MustMatchers
  9. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  11. def ===[T](right: Interval[T]): TripleEqualsInvocationOnInterval[T]

    Returns a TripleEqualsInvocationOnInterval[T], given an Interval[T], to facilitate the “<left> should === (<pivot> +- <tolerance>)” syntax of Matchers.

    Returns a TripleEqualsInvocationOnInterval[T], given an Interval[T], to facilitate the “<left> should === (<pivot> +- <tolerance>)” syntax of Matchers.

    right

    the Interval[T] against which to compare the left-hand value

    returns

    a TripleEqualsInvocationOnInterval wrapping the passed Interval[T] value, with expectingEqual set to true.

    Definition Classes
    EqualityConstraints
  12. def ===(right: Null): TripleEqualsInvocation[Null]

    Returns a TripleEqualsInvocation[Null], given a null reference, to facilitate the “<left> should === null” syntax of Matchers.

    Returns a TripleEqualsInvocation[Null], given a null reference, to facilitate the “<left> should === null” syntax of Matchers.

    right

    a null reference

    returns

    a TripleEqualsInvocation wrapping the passed null value, with expectingEqual set to true.

    Definition Classes
    EqualityConstraints
  13. def ===[T](right: T): TripleEqualsInvocation[T]

    Returns a TripleEqualsInvocation[T], given an object of type T, to facilitate the “<left> should === <right>” syntax of Matchers.

    Returns a TripleEqualsInvocation[T], given an object of type T, to facilitate the “<left> should === <right>” syntax of Matchers.

    right

    the right-hand side value for an equality assertion

    returns

    a TripleEqualsInvocation wrapping the passed right value, with expectingEqual set to true.

    Definition Classes
    EqualityConstraints
  14. def >[T](right: T)(implicit arg0: (T) ⇒ Ordered[T]): ResultOfGreaterThanComparison[T]

    This method enables the following syntax:

    This method enables the following syntax:

    num must (not be > (10) and not be < (7))
                       ^
    

    Definition Classes
    MustMatchers
  15. def >=[T](right: T)(implicit arg0: (T) ⇒ Ordered[T]): ResultOfGreaterThanOrEqualToComparison[T]

    This method enables the following syntax:

    This method enables the following syntax:

    num must (not be >= (10) and not be < (7))
                       ^
    

    Definition Classes
    MustMatchers
  16. val a: AWord

    This field enables the following syntax:

    This field enables the following syntax:

    badBook must not be a ('goodRead)
                          ^
    

    Definition Classes
    MustMatchers
  17. val after: TheAfterWord

    Definition Classes
    Explicitly
  18. def all[K, V](xs: GenTraversable[GenMap[K, V]]): ResultOfCollectedGenMap[K, V]

    Definition Classes
    MustMatchers
  19. def all[T](xs: GenTraversable[Array[T]]): ResultOfCollectedArray[T]

    Definition Classes
    MustMatchers
  20. def all[E, C[_] <: GenTraversable[_]](xs: GenTraversable[C[E]]): ResultOfCollectedGenTraversable[E, C]

    Definition Classes
    MustMatchers
  21. def all(xs: GenTraversable[String]): ResultOfCollectedString

    Definition Classes
    MustMatchers
  22. def all[T](xs: GenTraversable[T]): ResultOfCollectedAny[T]

    Definition Classes
    MustMatchers
  23. def allOf[T](xs: T*)(implicit equality: Equality[T]): AllOfContainMatcher[T]

    This method enables the following syntax:

    This method enables the following syntax:

    List(1, 2, 3) must contain (allOf(1, 2))
                                  ^
    

    Definition Classes
    MustMatchers
  24. val an: AnWord

    This field enables the following syntax:

    This field enables the following syntax:

    badBook must not be an (excellentRead)
                          ^
    

    Definition Classes
    MustMatchers
  25. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  26. def assert(o: Option[String]): Unit

    Assert that an Option[String] is None.

    Assert that an Option[String] is None. If the condition is None, this method returns normally. Else, it throws TestFailedException with the String value of the Some included in the TestFailedException's detail message.

    This form of assert is usually called in conjunction with an implicit conversion to Equalizer, using a === comparison, as in:

    assert(a === b)
    

    For more information on how this mechanism works, see the documentation for Equalizer.

    o

    the Option[String] to assert

    Definition Classes
    Assertions
    Exceptions thrown
    TestFailedException

    if the Option[String] is Some.

  27. def assert(o: Option[String], clue: Any): Unit

    Assert that an Option[String] is None.

    Assert that an Option[String] is None. If the condition is None, this method returns normally. Else, it throws TestFailedException with the String value of the Some, as well as the String obtained by invoking toString on the specified clue, included in the TestFailedException's detail message.

    This form of assert is usually called in conjunction with an implicit conversion to Equalizer, using a === comparison, as in:

    assert(a === b, "extra info reported if assertion fails")
    

    For more information on how this mechanism works, see the documentation for Equalizer.

    o

    the Option[String] to assert

    clue

    An objects whose toString method returns a message to include in a failure report.

    Definition Classes
    Assertions
    Exceptions thrown
    NullPointerException

    if message is null.

    TestFailedException

    if the Option[String] is Some.

  28. def assert(condition: Boolean, clue: Any): Unit

    Assert that a boolean condition, described in String message, is true.

    Assert that a boolean condition, described in String message, is true. If the condition is true, this method returns normally. Else, it throws TestFailedException with the String obtained by invoking toString on the specified clue as the exception's detail message.

    condition

    the boolean condition to assert

    clue

    An objects whose toString method returns a message to include in a failure report.

    Definition Classes
    Assertions
    Exceptions thrown
    NullPointerException

    if message is null.

    TestFailedException

    if the condition is false.

  29. def assert(condition: Boolean): Unit

    Assert that a boolean condition is true.

    Assert that a boolean condition is true. If the condition is true, this method returns normally. Else, it throws TestFailedException.

    condition

    the boolean condition to assert

    Definition Classes
    Assertions
    Exceptions thrown
    TestFailedException

    if the condition is false.

  30. def assertResult(expected: Any)(actual: Any): Unit

    Assert that the value passed as expected equals the value passed as actual.

    Assert that the value passed as expected equals the value passed as actual. If the actual value equals the expected value (as determined by ==), assertResult returns normally. Else, assertResult throws a TestFailedException whose detail message includes the expected and actual values.

    expected

    the expected value

    actual

    the actual value, which should equal the passed expected value

    Definition Classes
    Assertions
    Exceptions thrown
    TestFailedException

    if the passed actual value does not equal the passed expected value.

  31. def assertResult(expected: Any, clue: Any)(actual: Any): Unit

    Assert that the value passed as expected equals the value passed as actual.

    Assert that the value passed as expected equals the value passed as actual. If the actual equals the expected (as determined by ==), assertResult returns normally. Else, if actual is not equal to expected, assertResult throws a TestFailedException whose detail message includes the expected and actual values, as well as the String obtained by invoking toString on the passed clue.

    expected

    the expected value

    clue

    An object whose toString method returns a message to include in a failure report.

    actual

    the actual value, which should equal the passed expected value

    Definition Classes
    Assertions
    Exceptions thrown
    TestFailedException

    if the passed actual value does not equal the passed expected value.

  32. def assume(o: Option[String]): Unit

    Assume that an Option[String] is None.

    Assume that an Option[String] is None. If the condition is None, this method returns normally. Else, it throws TestCanceledException with the String value of the Some included in the TestCanceledException's detail message.

    This form of assume is usually called in conjunction with an implicit conversion to Equalizer, using a === comparison, as in:

    assert(a === b)
    

    For more information on how this mechanism works, see the documentation for Equalizer.

    o

    the Option[String] to assert

    Definition Classes
    Assertions
    Exceptions thrown
    TestFailedException

    if the Option[String] is Some.

  33. def assume(o: Option[String], clue: Any): Unit

    Assume that an Option[String] is None.

    Assume that an Option[String] is None. If the condition is None, this method returns normally. Else, it throws TestCanceledException with the String value of the Some, as well as the String obtained by invoking toString on the specified clue, included in the TestCanceledException's detail message.

    This form of assume is usually called in conjunction with an implicit conversion to Equalizer, using a === comparison, as in:

    assume(a === b, "extra info reported if assertion fails")
    

    For more information on how this mechanism works, see the documentation for Equalizer.

    o

    the Option[String] to assert

    clue

    An objects whose toString method returns a message to include in a failure report.

    Definition Classes
    Assertions
    Exceptions thrown
    NullPointerException

    if message is null.

    TestCanceledException

    if the Option[String] is Some.

  34. def assume(condition: Boolean, clue: Any): Unit

    Assume that a boolean condition, described in String message, is true.

    Assume that a boolean condition, described in String message, is true. If the condition is true, this method returns normally. Else, it throws TestCanceledException with the String obtained by invoking toString on the specified clue as the exception's detail message.

    condition

    the boolean condition to assume

    clue

    An objects whose toString method returns a message to include in a failure report.

    Definition Classes
    Assertions
    Exceptions thrown
    NullPointerException

    if message is null.

    TestFailedException

    if the condition is false.

  35. def assume(condition: Boolean): Unit

    Assume that a boolean condition is true.

    Assume that a boolean condition is true. If the condition is true, this method returns normally. Else, it throws TestCanceledException.

    condition

    the boolean condition to assert

    Definition Classes
    Assertions
    Exceptions thrown
    TestCanceledException

    if the condition is false.

  36. def atLeast[K, V](num: Int, xs: GenTraversable[GenMap[K, V]]): ResultOfCollectedGenMap[K, V]

    Definition Classes
    MustMatchers
  37. def atLeast[T](num: Int, xs: GenTraversable[Array[T]]): ResultOfCollectedArray[T]

    Definition Classes
    MustMatchers
  38. def atLeast[E, C[_] <: GenTraversable[_]](num: Int, xs: GenTraversable[C[E]]): ResultOfCollectedGenTraversable[E, C]

    Definition Classes
    MustMatchers
  39. def atLeast(num: Int, xs: GenTraversable[String]): ResultOfCollectedString

    Definition Classes
    MustMatchers
  40. def atLeast[T](num: Int, xs: GenTraversable[T]): ResultOfCollectedAny[T]

    Definition Classes
    MustMatchers
  41. def atMost[K, V](num: Int, xs: GenTraversable[GenMap[K, V]]): ResultOfCollectedGenMap[K, V]

    Definition Classes
    MustMatchers
  42. def atMost[T](num: Int, xs: GenTraversable[Array[T]]): ResultOfCollectedArray[T]

    Definition Classes
    MustMatchers
  43. def atMost[E, C[_] <: GenTraversable[_]](num: Int, xs: GenTraversable[C[E]]): ResultOfCollectedGenTraversable[E, C]

    Definition Classes
    MustMatchers
  44. def atMost(num: Int, xs: GenTraversable[String]): ResultOfCollectedString

    Definition Classes
    MustMatchers
  45. def atMost[T](num: Int, xs: GenTraversable[T]): ResultOfCollectedAny[T]

    Definition Classes
    MustMatchers
  46. val be: BeWord

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    obj should (be theSameInstanceAs (string) and be theSameInstanceAs (string))
                ^
    

    Definition Classes
    MatcherWords
  47. def between[K, V](from: Int, upTo: Int, xs: GenTraversable[GenMap[K, V]]): ResultOfCollectedGenMap[K, V]

    Definition Classes
    MustMatchers
  48. def between[T](from: Int, upTo: Int, xs: GenTraversable[Array[T]]): ResultOfCollectedArray[T]

    Definition Classes
    MustMatchers
  49. def between[E, C[_] <: GenTraversable[_]](from: Int, upTo: Int, xs: GenTraversable[C[E]]): ResultOfCollectedGenTraversable[E, C]

    Definition Classes
    MustMatchers
  50. def between(from: Int, upTo: Int, xs: GenTraversable[String]): ResultOfCollectedString

    Definition Classes
    MustMatchers
  51. def between[T](from: Int, upTo: Int, xs: GenTraversable[T]): ResultOfCollectedAny[T]

    Definition Classes
    MustMatchers
  52. def cancel(cause: Throwable): Nothing

    Throws TestCanceledException, with the passed Throwable cause, to indicate a test failed.

    Throws TestCanceledException, with the passed Throwable cause, to indicate a test failed. The getMessage method of the thrown TestCanceledException will return cause.toString.

    cause

    a Throwable that indicates the cause of the cancellation.

    Definition Classes
    Assertions
    Exceptions thrown
    NullPointerException

    if cause is null

  53. def cancel(message: String, cause: Throwable): Nothing

    Throws TestCanceledException, with the passed String message as the exception's detail message and Throwable cause, to indicate a test failed.

    Throws TestCanceledException, with the passed String message as the exception's detail message and Throwable cause, to indicate a test failed.

    message

    A message describing the failure.

    cause

    A Throwable that indicates the cause of the failure.

    Definition Classes
    Assertions
    Exceptions thrown
    NullPointerException

    if message or cause is null

  54. def cancel(message: String): Nothing

    Throws TestCanceledException, with the passed String message as the exception's detail message, to indicate a test was canceled.

    Throws TestCanceledException, with the passed String message as the exception's detail message, to indicate a test was canceled.

    message

    A message describing the cancellation.

    Definition Classes
    Assertions
    Exceptions thrown
    NullPointerException

    if message is null

  55. def cancel(): Nothing

    Throws TestCanceledException to indicate a test was canceled.

    Throws TestCanceledException to indicate a test was canceled.

    Definition Classes
    Assertions
  56. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  57. val contain: ContainWord

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    list should (contain ('a') and have length (7))
                 ^
    

    Definition Classes
    MatcherWords
  58. def conversionCheckedEqualityConstraint[A, B](implicit equalityOfA: Equality[A], cnv: (B) ⇒ A): EqualityConstraint[A, B]

    Provides an EqualityConstraint[A, B] class for any two types A and B, enforcing the type constraint that B is implicitly convertible to A, given an implicit Equality[A].

    Provides an EqualityConstraint[A, B] class for any two types A and B, enforcing the type constraint that B is implicitly convertible to A, given an implicit Equality[A].

    The implicitly passed Equality[A] must be used to determine equality by the returned EqualityConstraint's areEqual method.

    This method is overridden and made implicit by subtraits ConversionCheckedTripleEquals) and ConversionCheckedLegacyTripleEquals, and overriden as non-implicit by the other subtraits in this package.

    equalityOfA

    an Equality[A] type class to which the EqualityConstraint.areEqual method will delegate to determine equality.

    cnv

    an implicit conversion from B to A

    returns

    an EqualityConstraint[A, B] whose areEqual method delegates to the areEqual method of the passed Equality[A].

    Definition Classes
    LegacyTripleEqualsEqualityConstraints
  59. implicit def convertMapMatcherToJavaMapMatcher[K, V](mapMatcher: Matcher[GenMap[K, V]]): Matcher[Map[K, V]]

    This implicit conversion method enables the following syntax (javaMap is a java.util.Map):

    This implicit conversion method enables the following syntax (javaMap is a java.util.Map):

    javaMap must (contain key ("two"))
    

    The (contain key ("two")) expression will result in a Matcher[scala.collection.GenMap[String, Any]]. This implicit conversion method will convert that matcher to a Matcher[java.util.Map[String, Any]].

    Definition Classes
    MustMatchers
  60. implicit def convertNumericToPlusOrMinusWrapper[T](pivot: T)(implicit arg0: Numeric[T]): PlusOrMinusWrapper[T]

    Implicitly converts an object of a Numeric type to a PlusOrMinusWrapper, to enable a +- method to be invoked on that object.

    Implicitly converts an object of a Numeric type to a PlusOrMinusWrapper, to enable a +- method to be invoked on that object.

    Definition Classes
    Tolerance
  61. implicit def convertSymbolToHavePropertyMatcherGenerator(symbol: Symbol): HavePropertyMatcherGenerator

    This implicit conversion method converts a Symbol to a HavePropertyMatcherGenerator, to enable the symbol to be used with the have ('author ("Dickens")) syntax.

    This implicit conversion method converts a Symbol to a HavePropertyMatcherGenerator, to enable the symbol to be used with the have ('author ("Dickens")) syntax.

    Definition Classes
    MustMatchers
  62. implicit def convertToAnyMustWrapper[T](o: T): AnyMustWrapper[T]

    Implicitly converts an object of type T to a AnyMustWrapper[T], to enable must methods to be invokable on that object.

    Implicitly converts an object of type T to a AnyMustWrapper[T], to enable must methods to be invokable on that object.

    Definition Classes
    MustMatchers
  63. implicit def convertToArrayMustWrapper[T](o: Array[T]): ArrayMustWrapper[T]

    Implicitly converts an object of type scala.Array[T] to a ArrayMustWrapper[T], to enable must methods to be invokable on that object.

    Implicitly converts an object of type scala.Array[T] to a ArrayMustWrapper[T], to enable must methods to be invokable on that object.

    Definition Classes
    MustMatchers
  64. def convertToCheckingEqualizer[T](left: T): CheckingEqualizer[T]

    Convert to an CheckingEqualizer that provides === and !== operators that result in Boolean and enforce a type constraint.

    Convert to an CheckingEqualizer that provides === and !== operators that result in Boolean and enforce a type constraint.

    This method is overridden and made implicit by subtraits TypeCheckedTripleEquals and ConversionCheckedTripleEquals, and overriden as non-implicit by the other subtraits in this package.

    left

    the object whose type to convert to CheckingEqualizer.

    Definition Classes
    LegacyTripleEqualsEqualityConstraints
    Exceptions thrown
    NullPointerException

    if left is null.

  65. def convertToEqualizer[T](left: T): Equalizer[T]

    Convert to an Equalizer that provides === and !== operators that result in Boolean and enforce no type constraint.

    Convert to an Equalizer that provides === and !== operators that result in Boolean and enforce no type constraint.

    This method is overridden and made implicit by subtrait TripleEquals and overriden as non-implicit by the other subtraits in this package.

    left

    the object whose type to convert to Equalizer.

    Definition Classes
    LegacyTripleEqualsEqualityConstraints
    Exceptions thrown
    NullPointerException

    if left is null.

  66. implicit def convertToJavaCollectionMustWrapper[E, L[_] <: Collection[_]](o: L[E]): JavaCollectionMustWrapper[E, L]

    Implicitly converts an object of type java.util.Collection[T] to a JavaCollectionMustWrapper[T], to enable must methods to be invokable on that object.

    Implicitly converts an object of type java.util.Collection[T] to a JavaCollectionMustWrapper[T], to enable must methods to be invokable on that object.

    Definition Classes
    MustMatchers
  67. implicit def convertToJavaMapMustWrapper[K, V, L[_, _] <: Map[_, _]](o: L[K, V]): JavaMapMustWrapper[K, V, L]

    Implicitly converts an object of type java.util.Map[K, V] to a JavaMapMustWrapper[K, V], to enable must methods to be invokable on that object.

    Implicitly converts an object of type java.util.Map[K, V] to a JavaMapMustWrapper[K, V], to enable must methods to be invokable on that object.

    Definition Classes
    MustMatchers
  68. def convertToLegacyCheckingEqualizer[T](left: T): LegacyCheckingEqualizer[T]

    Convert to a LegacyCheckingEqualizer that provides === and !== operators that result in Option[String] and enforce a type constraint.

    Convert to a LegacyCheckingEqualizer that provides === and !== operators that result in Option[String] and enforce a type constraint.

    This method is overridden and made implicit by subtraits TypeCheckedLegacyTripleEquals and ConversionCheckedLegacyTripleEquals, and overriden as non-implicit by the other subtraits in this package.

    left

    the object whose type to convert to LegacyCheckingEqualizer.

    Definition Classes
    LegacyTripleEqualsEqualityConstraints
    Exceptions thrown
    NullPointerException

    if left is null.

  69. implicit def convertToLegacyEqualizer[T](left: T): LegacyEqualizer[T]

    Convert to a LegacyEqualizer that provides === and !== operators that result in Option[String] and enforce no type constraint.

    Convert to a LegacyEqualizer that provides === and !== operators that result in Option[String] and enforce no type constraint.

    This method is overridden and made implicit by subtrait LegacyTripleEquals and overriden as non-implicit by the other subtraits in this package.

    left

    the object whose type to convert to LegacyEqualizer.

    Definition Classes
    LegacyTripleEqualsEqualityConstraints
    Exceptions thrown
    NullPointerException

    if left is null.

  70. implicit def convertToMapMustWrapper[K, V, L[_, _] <: GenMap[_, _]](o: L[K, V]): MapMustWrapper[K, V, L]

    Implicitly converts an object of type scala.collection.GenMap[K, V] to a MapMustWrapper[K, V], to enable must methods to be invokable on that object.

    Implicitly converts an object of type scala.collection.GenMap[K, V] to a MapMustWrapper[K, V], to enable must methods to be invokable on that object.

    Definition Classes
    MustMatchers
  71. implicit def convertToRegexWrapper(o: Regex): RegexWrapper

    Implicitly converts an object of type scala.util.matching.Regex to a RegexWrapper, to enable withGroup and withGroups methods to be invokable on that object.

    Implicitly converts an object of type scala.util.matching.Regex to a RegexWrapper, to enable withGroup and withGroups methods to be invokable on that object.

    Definition Classes
    MustMatchers
  72. implicit def convertToStringMustWrapper(o: String): StringMustWrapper

    Implicitly converts an object of type java.lang.String to a StringMustWrapper, to enable must methods to be invokable on that object.

    Implicitly converts an object of type java.lang.String to a StringMustWrapper, to enable must methods to be invokable on that object.

    Definition Classes
    MustMatchersMustVerb
  73. def convertToTraversableLoneElementWrapper[T](xs: GenTraversable[T]): LoneElementTraversableWrapper[T]

    Turn off implicit conversion of LoneElement, so that if user accidentally mixin LoneElement it does conflict with convertToTraversableMustWrapper

    Turn off implicit conversion of LoneElement, so that if user accidentally mixin LoneElement it does conflict with convertToTraversableMustWrapper

    Definition Classes
    MustMatchersLoneElement
  74. implicit def convertToTraversableMustWrapper[E, L[_] <: GenTraversable[_]](o: L[E]): TraversableMustWrapper[E, L]

    Implicitly converts an object of type scala.Collection[T] to a CollectionMustWrapper, to enable must methods to be invokable on that object.

    Implicitly converts an object of type scala.Collection[T] to a CollectionMustWrapper, to enable must methods to be invokable on that object.

    Definition Classes
    MustMatchers
  75. implicit def convertTraversableMatcherToArrayMatcher[T](traversableMatcher: Matcher[GenTraversable[T]]): Matcher[Array[T]]

    This implicit conversion method enables the following syntax:

    This implicit conversion method enables the following syntax:

    Array(1, 2) must (not contain (3) and not contain (2))
    

    The (not contain ("two")) expression will result in a Matcher[GenTraversable[String]]. This implicit conversion method will convert that matcher to a Matcher[Array[String]].

    Definition Classes
    MustMatchers
  76. implicit def convertTraversableMatcherToJavaCollectionMatcher[T](traversableMatcher: Matcher[GenTraversable[T]]): Matcher[Collection[T]]

    This implicit conversion method enables the following syntax (javaColl is a java.util.Collection):

    This implicit conversion method enables the following syntax (javaColl is a java.util.Collection):

    javaColl must contain ("two")
    

    The (contain ("two")) expression will result in a Matcher[GenTraversable[String]]. This implicit conversion method will convert that matcher to a Matcher[java.util.Collection[String]].

    Definition Classes
    MustMatchers
  77. val decided: DecidedWord

    Definition Classes
    Explicitly
  78. implicit def defaultEquality[A]: Equality[A]

    Return an Equality[A] for any type A that determines equality via the == operator on type A.

    Return an Equality[A] for any type A that determines equality via the == operator on type A.

    returns

    a DefaultEquality for type A

    Definition Classes
    LegacyTripleEqualsEqualityConstraints
  79. def doCollected[T](collected: Collected, xs: GenTraversable[T], methodName: String, stackDepth: Int)(fun: (T) ⇒ Unit): Unit

    Definition Classes
    MustMatchers
  80. implicit def enablersForArray[E]: Length[Array[E]] with Size[Array[E]]

    Definition Classes
    MustMatchers
  81. implicit def enablersForGenSeq[E, SEQ[_] <: GenSeq[_]]: Length[SEQ[E]] with Size[SEQ[E]]

    Definition Classes
    MustMatchers
  82. implicit def enablersForGenTraversable[E, TRAV[_] <: GenTraversable[_]]: Size[TRAV[E]]

    Definition Classes
    MustMatchers
  83. implicit def enablersForJavaCollection[E, JCOL[_] <: Collection[_]]: Size[JCOL[E]]

    Definition Classes
    MustMatchers
  84. implicit def enablersForJavaList[E, JLIST[_] <: List[_]]: Length[JLIST[E]] with Size[JLIST[E]]

    Definition Classes
    MustMatchers
  85. implicit def enablersForJavaMap[K, V, JMAP[_, _] <: Map[_, _]]: Size[JMAP[K, V]]

    Definition Classes
    MustMatchers
  86. implicit def enablersForMap[K, V, MAP[_, _] <: GenMap[_, _]]: Size[MAP[K, V]]

    Definition Classes
    MustMatchers
  87. implicit val enablersForString: Length[String] with Size[String]

    Definition Classes
    MustMatchers
  88. val endWith: EndWithWord

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    string should (endWith ("ago") and include ("score"))
                   ^
    

    Definition Classes
    MatcherWords
  89. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  90. def equal(o: Null): Matcher[AnyRef]

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result must equal (null)
           ^
    

    Definition Classes
    MustMatchers
  91. def equal[T](interval: Interval[T]): Matcher[T]

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result must equal (100 +- 1)
                  ^
    

    Definition Classes
    MustMatchers
  92. def equal(right: Any): MatcherFactory1[Any, Equality]

    This method enables the following syntax:

    This method enables the following syntax:

    result should equal (7)
                  ^
    

    The left should equal (right) syntax works by calling == on the left value, passing in the right value, on every type except arrays. If both left and right are arrays, deep will be invoked on both left and right before comparing them with ==. Thus, even though this expression will yield false, because Array's equals method compares object identity:

    Array(1, 2) == Array(1, 2) // yields false
    

    The following expression will not result in a TestFailedException, because ScalaTest will compare the two arrays structurally, taking into consideration the equality of the array's contents:

    Array(1, 2) should equal (Array(1, 2)) // succeeds (i.e., does not throw TestFailedException)
    

    If you ever do want to verify that two arrays are actually the same object (have the same identity), you can use the be theSameInstanceAs syntax.

    Definition Classes
    MatcherWords
  93. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  94. def evaluating(fun: ⇒ Any): ResultOfEvaluatingApplication

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    evaluating { "hi".charAt(-1) } must produce [StringIndexOutOfBoundsException]
    ^
    

    Definition Classes
    MustMatchers
  95. def every[K, V](xs: GenTraversable[GenMap[K, V]]): ResultOfCollectedGenMap[K, V]

    Definition Classes
    MustMatchers
  96. def every[T](xs: GenTraversable[Array[T]]): ResultOfCollectedArray[T]

    Definition Classes
    MustMatchers
  97. def every[E, C[_] <: GenTraversable[_]](xs: GenTraversable[C[E]]): ResultOfCollectedGenTraversable[E, C]

    Definition Classes
    MustMatchers
  98. def every(xs: GenTraversable[String]): ResultOfCollectedString

    Definition Classes
    MustMatchers
  99. def every[T](xs: GenTraversable[T]): ResultOfCollectedAny[T]

    Definition Classes
    MustMatchers
  100. def exactly[K, V](num: Int, xs: GenTraversable[GenMap[K, V]]): ResultOfCollectedGenMap[K, V]

    Definition Classes
    MustMatchers
  101. def exactly[T](num: Int, xs: GenTraversable[Array[T]]): ResultOfCollectedArray[T]

    Definition Classes
    MustMatchers
  102. def exactly[E, C[_] <: GenTraversable[_]](num: Int, xs: GenTraversable[C[E]]): ResultOfCollectedGenTraversable[E, C]

    Definition Classes
    MustMatchers
  103. def exactly(num: Int, xs: GenTraversable[String]): ResultOfCollectedString

    Definition Classes
    MustMatchers
  104. def exactly[T](num: Int, xs: GenTraversable[T]): ResultOfCollectedAny[T]

    Definition Classes
    MustMatchers
  105. def fail(cause: Throwable): Nothing

    Throws TestFailedException, with the passed Throwable cause, to indicate a test failed.

    Throws TestFailedException, with the passed Throwable cause, to indicate a test failed. The getMessage method of the thrown TestFailedException will return cause.toString.

    cause

    a Throwable that indicates the cause of the failure.

    Definition Classes
    Assertions
    Exceptions thrown
    NullPointerException

    if cause is null

  106. def fail(message: String, cause: Throwable): Nothing

    Throws TestFailedException, with the passed String message as the exception's detail message and Throwable cause, to indicate a test failed.

    Throws TestFailedException, with the passed String message as the exception's detail message and Throwable cause, to indicate a test failed.

    message

    A message describing the failure.

    cause

    A Throwable that indicates the cause of the failure.

    Definition Classes
    Assertions
    Exceptions thrown
    NullPointerException

    if message or cause is null

  107. def fail(message: String): Nothing

    Throws TestFailedException, with the passed String message as the exception's detail message, to indicate a test failed.

    Throws TestFailedException, with the passed String message as the exception's detail message, to indicate a test failed.

    message

    A message describing the failure.

    Definition Classes
    Assertions
    Exceptions thrown
    NullPointerException

    if message is null

  108. def fail(): Nothing

    Throws TestFailedException to indicate a test failed.

    Throws TestFailedException to indicate a test failed.

    Definition Classes
    Assertions
  109. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  110. val fullyMatch: FullyMatchWord

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    string should (fullyMatch regex ("Hel*o, wor.d") and not have length (99))
                   ^
    

    Definition Classes
    MatcherWords
  111. final def getClass(): Class[_]

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

    Definition Classes
    AnyRef → Any
  113. val have: HaveWord

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    list should (have length (3) and not contain ('a'))
                 ^
    

    Definition Classes
    MatcherWords
  114. def inOrder[T](xs: T*)(implicit equality: Equality[T]): InOrderContainMatcher[T]

    This method enables the following syntax:

    This method enables the following syntax:

    List(1, 2, 3) must contain (inOrder(1, 2))
                                  ^
    

    Definition Classes
    MustMatchers
  115. def inOrderOnly[T](xs: T*)(implicit equality: Equality[T]): InOrderOnlyContainMatcher[T]

    This method enables the following syntax:

    This method enables the following syntax:

    List(1, 2, 3) must contain (inOrderOnly(1, 2))
                                  ^
    

    Definition Classes
    MustMatchers
  116. val include: IncludeWord

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    string should (include ("hope") and not startWith ("no"))
                   ^
    

    Definition Classes
    MatcherWords
  117. def intercept[T <: AnyRef](f: ⇒ Any)(implicit manifest: Manifest[T]): T

    Intercept and return an exception that's expected to be thrown by the passed function value.

    Intercept and return an exception that's expected to be thrown by the passed function value. The thrown exception must be an instance of the type specified by the type parameter of this method. This method invokes the passed function. If the function throws an exception that's an instance of the specified type, this method returns that exception. Else, whether the passed function returns normally or completes abruptly with a different exception, this method throws TestFailedException.

    Note that the type specified as this method's type parameter may represent any subtype of AnyRef, not just Throwable or one of its subclasses. In Scala, exceptions can be caught based on traits they implement, so it may at times make sense to specify a trait that the intercepted exception's class must mix in. If a class instance is passed for a type that could not possibly be used to catch an exception (such as String, for example), this method will complete abruptly with a TestFailedException.

    f

    the function value that should throw the expected exception

    manifest

    an implicit Manifest representing the type of the specified type parameter.

    returns

    the intercepted exception, if it is of the expected type

    Definition Classes
    Assertions
    Exceptions thrown
    TestFailedException

    if the passed function does not complete abruptly with an exception that's an instance of the specified type passed expected value.

  118. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  119. val key: KeyWord

    This field enables the following syntax:

    This field enables the following syntax:

    map must not contain key (10)
                           ^
    

    Definition Classes
    MustMatchers
  120. def legacyEqual(right: Any): Matcher[Any]

    Definition Classes
    MatcherWords
  121. val length: LengthWord

    This field enables the following syntax:

    This field enables the following syntax:

    "hi" should not have length (3)
                         ^
    

    Definition Classes
    MatcherWords
  122. def lowPriorityConversionCheckedEqualityConstraint[A, B](implicit equalityOfB: Equality[B], cnv: (A) ⇒ B): EqualityConstraint[A, B]

    Provides an EqualityConstraint[A, B] class for any two types A and B, enforcing the type constraint that A is implicitly convertible to B, given an implicit Equality[A].

    Provides an EqualityConstraint[A, B] class for any two types A and B, enforcing the type constraint that A is implicitly convertible to B, given an implicit Equality[A].

    The implicitly passed Equality[A] must be used to determine equality by the returned EqualityConstraint's areEqual method.

    This method is overridden and made implicit by subtraits LowPriorityConversionCheckedConstraint (extended by ConversionCheckedTripleEquals), and LowPriorityConversionCheckedLegacyConstraint (extended by ConversionCheckedLegacyTripleEquals), and overriden as non-implicit by the other subtraits in this package.

    cnv

    an implicit conversion from A to B

    returns

    an EqualityConstraint[A, B] whose areEqual method delegates to the areEqual method of the passed Equality[A].

    Definition Classes
    LegacyTripleEqualsEqualityConstraints
  123. def lowPriorityTypeCheckedEqualityConstraint[A, B](implicit equalityOfA: Equality[A], ev: <:<[A, B]): EqualityConstraint[A, B]

    Provides an EqualityConstraint[A, B] class for any two types A and B, enforcing the type constraint that A must be a subtype of B, given an implicit Equality[A].

    Provides an EqualityConstraint[A, B] class for any two types A and B, enforcing the type constraint that A must be a subtype of B, given an implicit Equality[A].

    The implicitly passed Equality[A] must be used to determine equality by the returned EqualityConstraint's areEqual method.

    This method is overridden and made implicit by subtraits LowPriorityTypeCheckedConstraint (extended by TypeCheckedTripleEquals), and LowPriorityTypeCheckedLegacyConstraint (extended by TypeCheckedLegacyTripleEquals), and overriden as non-implicit by the other subtraits in this package.

    equalityOfA

    an Equality[A] type class to which the EqualityConstraint.areEqual method will delegate to determine equality.

    ev

    evidence that A is a subype of B

    returns

    an EqualityConstraint[A, B] whose areEqual method delegates to the areEqual method of the passed Equality[A].

    Definition Classes
    LegacyTripleEqualsEqualityConstraints
  124. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  125. val newContain: NewContainWord

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    list should (contain ('a') and have length (7))
                 ^
    

    Definition Classes
    MatcherWords
  126. def newOneOf(xs: Any*): ResultOfNewOneOfApplication

    This method enables the following syntax:

    This method enables the following syntax:

    List(1, 2, 3) must contain (oneOf(1, 2))
                                  ^
    

    Definition Classes
    MustMatchers
  127. def no[K, V](xs: GenTraversable[GenMap[K, V]]): ResultOfCollectedGenMap[K, V]

    Definition Classes
    MustMatchers
  128. def no[T](xs: GenTraversable[Array[T]]): ResultOfCollectedArray[T]

    Definition Classes
    MustMatchers
  129. def no[E, C[_] <: GenTraversable[_]](xs: GenTraversable[C[E]]): ResultOfCollectedGenTraversable[E, C]

    Definition Classes
    MustMatchers
  130. def no(xs: GenTraversable[String]): ResultOfCollectedString

    Definition Classes
    MustMatchers
  131. def no[T](xs: GenTraversable[T]): ResultOfCollectedAny[T]

    Definition Classes
    MustMatchers
  132. def noneOf[T](xs: T*)(implicit equality: Equality[T]): NoneOfContainMatcher[T]

    This method enables the following syntax:

    This method enables the following syntax:

    List(1, 2, 3) must contain (noneOf(1, 2))
                                  ^
    

    Definition Classes
    MustMatchers
  133. val not: NotWord

    This field enables syntax like the following:

    This field enables syntax like the following:

    myFile should (not be an (directory) and not have ('name ("foo.bar")))
                   ^
    

    Definition Classes
    MatcherWords
  134. final def notify(): Unit

    Definition Classes
    AnyRef
  135. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  136. def oneOf[T](xs: T*)(implicit equality: Equality[T]): OneOfContainMatcher[T]

    This method enables the following syntax:

    This method enables the following syntax:

    List(1, 2, 3) must contain (oneOf(1, 2))
                                  ^
    

    Definition Classes
    MustMatchers
  137. def only[T](xs: T*)(implicit equality: Equality[T]): OnlyContainMatcher[T]

    This method enables the following syntax:

    This method enables the following syntax:

    List(1, 2, 3) must contain (only(1, 2))
                                  ^
    

    Definition Classes
    MustMatchers
  138. def produce[T](implicit manifest: Manifest[T]): ResultOfProduceInvocation[T]

    This method enables the following syntax:

    This method enables the following syntax:

    evaluating { "hi".charAt(-1) } must produce [StringIndexOutOfBoundsException]
    ^
    

    Definition Classes
    MustMatchers
  139. val regex: RegexWord

    This field enables the following syntax:

    This field enables the following syntax:

    "eight" must not fullyMatch regex ("""(-)?(\d+)(\.\d*)?""".r)
                                  ^
    

    Definition Classes
    MustMatchers
  140. val size: SizeWord

    This field enables the following syntax:

    This field enables the following syntax:

    set should not have size (3)
                        ^
    

    Definition Classes
    MatcherWords
  141. val startWith: StartWithWord

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    string should (startWith ("Four") and include ("year"))
                   ^
    

    Definition Classes
    MatcherWords
  142. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  143. def theSameElementsAs[T](xs: Array[T])(implicit equality: Equality[T]): TheSameElementsAsContainMatcher[T]

    This method enables the following syntax:

    This method enables the following syntax:

    traversable must contain (theSameElementsAs(array))
                                ^
    

    Definition Classes
    MustMatchers
  144. def theSameElementsAs[T](xs: GenTraversable[T])(implicit equality: Equality[T]): TheSameElementsAsContainMatcher[T]

    This method enables the following syntax:

    This method enables the following syntax:

    traversable must contain (theSameElementsAs(anotherTraversable))
                                ^
    

    Definition Classes
    MustMatchers
  145. val theSameInstanceAs: TheSameInstanceAsPhrase

    This field enables the following syntax:

    This field enables the following syntax:

    oneString must not be theSameInstanceAs (anotherString)
                            ^
    

    Definition Classes
    MustMatchers
  146. def theSameIteratedElementsAs[T](xs: Array[T])(implicit equality: Equality[T]): TheSameIteratedElementsAsContainMatcher[T]

    This method enables the following syntax:

    This method enables the following syntax:

    traversable must contain (theSameIteratedElementsAs(array))
                                ^
    

    Definition Classes
    MustMatchers
  147. def theSameIteratedElementsAs[T](xs: GenTraversable[T])(implicit equality: Equality[T]): TheSameIteratedElementsAsContainMatcher[T]

    This method enables the following syntax:

    This method enables the following syntax:

    traversable must contain (theSameIteratedElementsAs(anotherTraversable))
                                ^
    

    Definition Classes
    MustMatchers
  148. def toString(): String

    Definition Classes
    AnyRef → Any
  149. def typeCheckedEqualityConstraint[A, B](implicit equalityOfA: Equality[A], ev: <:<[B, A]): EqualityConstraint[A, B]

    Provides an EqualityConstraint[A, B] class for any two types A and B, enforcing the type constraint that B must be a subtype of A, given an implicit Equality[A].

    Provides an EqualityConstraint[A, B] class for any two types A and B, enforcing the type constraint that B must be a subtype of A, given an implicit Equality[A].

    The implicitly passed Equality[A] must be used to determine equality by the returned EqualityConstraint's areEqual method.

    This method is overridden and made implicit by subtraits TypeCheckedTripleEquals) and TypeCheckedLegacyTripleEquals, and overriden as non-implicit by the other subtraits in this package.

    equalityOfA

    an Equality[A] type class to which the EqualityConstraint.areEqual method will delegate to determine equality.

    ev

    evidence that B is a subype of A

    returns

    an EqualityConstraint[A, B] whose areEqual method delegates to the areEqual method of the passed Equality[A].

    Definition Classes
    LegacyTripleEqualsEqualityConstraints
  150. implicit def unconstrainedEquality[A, B](implicit equalityOfA: Equality[A]): EqualityConstraint[A, B]

    Provides an EqualityConstraint[A, B] class for any two types A and B, with no type constraint enforced, given an implicit Equality[A].

    Provides an EqualityConstraint[A, B] class for any two types A and B, with no type constraint enforced, given an implicit Equality[A].

    The implicitly passed Equality[A] must be used to determine equality by the returned EqualityConstraint's areEqual method.

    This method is overridden and made implicit by subtraits TripleEquals and LegacyTripleEquals, and overriden as non-implicit by the other subtraits in this package.

    equalityOfA

    an Equality[A] type class to which the EqualityConstraint.areEqual method will delegate to determine equality.

    returns

    an EqualityConstraint[A, B] whose areEqual method delegates to the areEqual method of the passed Equality[A].

    Definition Classes
    LegacyTripleEqualsEqualityConstraints
  151. val value: ValueWord

    This field enables the following syntax:

    This field enables the following syntax:

    map must not contain value (10)
                           ^
    

    Definition Classes
    MustMatchers
  152. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()
  155. implicit def withArrayElementEquality[E](implicit equality: Equality[E]): Holder[Array[E]]

    Definition Classes
    MustMatchers
  156. def withClue[T](clue: Any)(fun: ⇒ T): T

    Executes the block of code passed as the second parameter, and, if it completes abruptly with a ModifiableMessage exception, prepends the "clue" string passed as the first parameter to the beginning of the detail message of that thrown exception, then rethrows it.

    Executes the block of code passed as the second parameter, and, if it completes abruptly with a ModifiableMessage exception, prepends the "clue" string passed as the first parameter to the beginning of the detail message of that thrown exception, then rethrows it. If clue does not end in a white space character, one space will be added between it and the existing detail message (unless the detail message is not defined).

    This method allows you to add more information about what went wrong that will be reported when a test fails. Here's an example:

    withClue("(Employee's name was: " + employee.name + ")") {
      intercept[IllegalArgumentException] {
        employee.getTask(-1)
      }
    }
    

    If an invocation of intercept completed abruptly with an exception, the resulting message would be something like:

    (Employee's name was Bob Jones) Expected IllegalArgumentException to be thrown, but no exception was thrown
    

    Definition Classes
    Assertions
    Exceptions thrown
    NullPointerException

    if the passed clue is null

  157. implicit def withGenMapElementEquality[K, V, MAP[_, _] <: GenMap[_, _]](implicit equality: Equality[(K, V)]): Holder[MAP[K, V]]

    Definition Classes
    MustMatchers
  158. implicit def withGenTraversableElementEquality[E, TRAV[_] <: GenTraversable[_]](implicit equality: Equality[E]): Holder[TRAV[E]]

    Definition Classes
    MustMatchers
  159. implicit def withJavaCollectionElementEquality[E, JCOL[_] <: Collection[_]](implicit equality: Equality[E]): Holder[JCOL[E]]

    Definition Classes
    MustMatchers
  160. implicit def withOptionValueEquality[E, OPT[_] <: Option[_]](implicit equality: Equality[E]): Holder[OPT[E]]

    Definition Classes
    MustMatchers
  161. implicit def withStringCharacterEquality(implicit equality: Equality[Char]): Holder[String]

    Definition Classes
    MustMatchers

Deprecated Value Members

  1. def expect(expected: Any)(actual: Any): Unit

    This expect method has been deprecated; Please use expectResult instead.

    This expect method has been deprecated; Please use expectResult instead.

    To get rid of the deprecation warning, simply replace expect with expectResult. The name expect will be used for a different purposes in a future version of ScalaTest.

    Definition Classes
    Assertions
    Annotations
    @deprecated
    Deprecated

    This expect method has been deprecated. Please replace all invocations of expect with an identical invocation of expectResult instead.

  2. def expect(expected: Any, clue: Any)(actual: Any): Unit

    This expect method has been deprecated; Please use expectResult instead.

    This expect method has been deprecated; Please use expectResult instead.

    To get rid of the deprecation warning, simply replace expect with expectResult. The name expect will be used for a different purposes in a future version of ScalaTest.

    Definition Classes
    Assertions
    Annotations
    @deprecated
    Deprecated

    This expect method has been deprecated. Please replace all invocations of expect with an identical invocation of expectResult instead.

  3. def expectResult(expected: Any)(actual: Any): Unit

    This expectResult method has been deprecated; Please use assertResult instead.

    This expectResult method has been deprecated; Please use assertResult instead.

    To get rid of the deprecation warning, simply replace expectResult with assertResult. The name expectResult will be used for a different purposes in a future version of ScalaTest.

    Definition Classes
    Assertions
    Annotations
    @deprecated
    Deprecated

    This expectResult method has been deprecated. Please replace all invocations of expectResult with an identical invocation of assertResult instead.

  4. def expectResult(expected: Any, clue: Any)(actual: Any): Unit

    This expectResult method has been deprecated; Please use assertResult instead.

    This expectResult method has been deprecated; Please use assertResult instead.

    To get rid of the deprecation warning, simply replace expectResult with assertResult. The name expectResult will be used for a different purposes in a future version of ScalaTest.

    Definition Classes
    Assertions
    Annotations
    @deprecated
    Deprecated

    This expectResult method has been deprecated. Please replace all invocations of expectResult with an identical invocation of assertResult instead.

Inherited from MustMatchers

Inherited from Explicitly

Inherited from MatcherWords

Inherited from LoneElement

Inherited from MustVerb

Inherited from Tolerance

Inherited from Assertions

Inherited from LegacyTripleEquals

Inherited from EqualityConstraints

Inherited from AnyRef

Inherited from Any

Ungrouped