org.scalatest.words

FactMatcherWords

trait FactMatcherWords extends AnyRef

This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers for an overview of the matchers DSL.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. FactMatcherWords
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

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

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

    Definition Classes
    Any
  3. final def ##(): Int

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

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

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. val be: BeWord

    This field enables syntax such as the following:

    This field enables syntax such as the following:

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

  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. val compile: CompileWord

    This field enables the following syntax:

    This field enables the following syntax:

    
    "val a: String = 1" willNot compile
                                  ^
    

  10. val contain: ContainWord

    This field enables syntax such as the following:

    This field enables syntax such as the following:

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

  11. val defined: DefinedWord

    This field enables the following syntax:

    This field enables the following syntax:

    seq will be (defined)
                  ^
    

  12. val empty: EmptyWord

    This field enables the following syntax:

    This field enables the following syntax:

    
    list will be (empty)
                    ^
    

  13. val endWith: EndWithWord

    This field enables syntax such as the following:

    This field enables syntax such as the following:

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

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

    Definition Classes
    AnyRef
  15. def equal(right: Any): MatcherFactory1[Any, Equality]

    This method enables the following syntax:

    This method enables the following syntax:

    result will equal (7)
                  ^
    

    The left will 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) will 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.

  16. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  17. val exist: ExistWord

    This field enables the following syntax:

    This field enables the following syntax:

    file will exist
                ^
    

  18. def finalize(): Unit

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

    This field enables syntax such as the following:

    This field enables syntax such as the following:

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

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

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

    Definition Classes
    AnyRef → Any
  22. val have: HaveWord

    This field enables syntax such as the following:

    This field enables syntax such as the following:

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

  23. val include: IncludeWord

    This field enables syntax such as the following:

    This field enables syntax such as the following:

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

  24. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  25. val length: LengthWord

    This field enables the following syntax:

    This field enables the following syntax:

    "hi" will not have length (3)
                         ^
    

  26. val matchPattern: MatchPatternWord

    This field enables the following syntax:

    This field enables the following syntax:

    
    result will matchPattern { case Person("Bob", _) => }
                  ^
    

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

    Definition Classes
    AnyRef
  28. val noException: FactExceptionWord

    This field enables the following syntax:

    This field enables the following syntax:

    noException will be thrownBy
    ^
    

  29. val not: NotWord

    This field enables syntax like the following:

    This field enables syntax like the following:

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

  30. final def notify(): Unit

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

    Definition Classes
    AnyRef
  32. val readable: ReadableWord

    This field enables the following syntax:

    This field enables the following syntax:

    
    file will be (readable)
                    ^
    

  33. val size: SizeWord

    This field enables the following syntax:

    This field enables the following syntax:

    set will not have size (3)
                        ^
    

  34. val sorted: SortedWord

    This field enables the following syntax:

    This field enables the following syntax:

    seq will be (sorted)
                  ^
    

  35. val startWith: StartWithWord

    This field enables syntax such as the following:

    This field enables syntax such as the following:

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

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

    Definition Classes
    AnyRef
  37. def toString(): String

    Definition Classes
    AnyRef → Any
  38. val typeCheck: TypeCheckWord

    This field enables the following syntax:

    This field enables the following syntax:

    
    "val a: String = 1" willNot typeCheck
                                  ^
    

  39. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. val writable: WritableWord

    This field enables the following syntax:

    This field enables the following syntax:

    file will be (writable)
                    ^
    

Inherited from AnyRef

Inherited from Any

Ungrouped