org.scalatest.matchers.ShouldMatchers.MatcherWrapper

OrNotWord

class OrNotWord extends AnyRef

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

attributes: final

Inherits

  1. AnyRef
  2. Any

Value Members

  1. def be(byteTolerance: ByteTolerance): Matcher[T with Byte]

    This method enables the following syntax:

    This method enables the following syntax:

    sevenByte should ((not be (19.toByte plusOrMinus 2.toByte)) or (not be (19.toByte plusOrMinus 2.toByte)))
                                                                        
    

  2. def be(shortTolerance: ShortTolerance): Matcher[T with Short]

    This method enables the following syntax:

    This method enables the following syntax:

    sevenShort should (not be (17.toShort plusOrMinus 2.toShort) or not be (17.toShort plusOrMinus 2.toShort))
                                                                        
    

  3. def be(intTolerance: IntTolerance): Matcher[T with Int]

    This method enables the following syntax:

    This method enables the following syntax:

    sevenInt should (not be (17 plusOrMinus 2) or not be (17 plusOrMinus 2))
                                                      
    

  4. def be(longTolerance: LongTolerance): Matcher[T with Long]

    This method enables the following syntax:

    This method enables the following syntax:

    sevenLong should (not be (17L plusOrMinus 2L) or not be (17L plusOrMinus 2L))
                                                         
    

  5. def be(floatTolerance: FloatTolerance): Matcher[T with Float]

    This method enables the following syntax:

    This method enables the following syntax:

    sevenDotOhFloat should (not be (17.0f plusOrMinus 0.2f) or not be (17.0f plusOrMinus 0.2f))
                                                                   
    

  6. def be(doubleTolerance: DoubleTolerance): Matcher[T with Double]

    This method enables the following syntax:

    This method enables the following syntax:

    sevenDotOh should (not be (17.0 plusOrMinus 0.2) or not be (17.0 plusOrMinus 0.2))
                                                            
    

  7. def be[T](resultOfTheSameInstanceAsApplication: ResultOfTheSameInstanceAsApplication): Matcher[T with AnyRef]

    This method enables the following syntax:

    This method enables the following syntax:

    obj should (not be theSameInstanceAs (otherString) or not be theSameInstanceAs (string))
                                                              
    

  8. def be[T <: AnyRef](resultOfAnWordApplication: ResultOfAnWordToBePropertyMatcherApplication[T]): Matcher[T with T]

    This method enables the following syntax:

    This method enables the following syntax:

    myFile should (not be an (directory) or not be an (file))
                                                
    

  9. def be[T](resultOfAnWordApplication: ResultOfAnWordToSymbolApplication): Matcher[T with AnyRef]

    This method enables the following syntax:

    This method enables the following syntax:

    notAppleMock should (not be an ('apple) or not be an ('apple))
                                                   
    

  10. def be[T <: AnyRef](resultOfAWordApplication: ResultOfAWordToBePropertyMatcherApplication[T]): Matcher[T with T]

    This method enables the following syntax:

    This method enables the following syntax:

    myFile should (not be a (directory) or not be a (file))
                                               
    

  11. def be[T](resultOfAWordApplication: ResultOfAWordToSymbolApplication): Matcher[T with AnyRef]

    This method enables the following syntax:

    This method enables the following syntax:

    isNotFileMock should (not be a ('directory) or not be a ('file))
                                                       
    

  12. def be[T](bePropertyMatcher: BePropertyMatcher[T]): Matcher[T with AnyRef with T]

    This method enables the following syntax:

    This method enables the following syntax:

    myFile should (not be (directory) or not be (file))
                                             
    

  13. def be[T](beMatcher: BeMatcher[T]): Matcher[T with T]

    This method enables the following syntax:

    This method enables the following syntax:

    2 should (not be (even) or not be (odd))
                                   
    

  14. def be(symbol: Symbol): Matcher[T with AnyRef]

    This method enables the following syntax:

    This method enables the following syntax:

    notEmptyMock should (not be ('full) or not be ('empty))
                                               
    

  15. def be(resultOfTripleEqualsApplication: ResultOfTripleEqualsApplication): Matcher[T]

    This method enables the following syntax:

    This method enables the following syntax:

    5 should (not be === (7) or not be === (8))
                                    
    

  16. def be[T](resultOfGreaterThanOrEqualToComparison: ResultOfGreaterThanOrEqualToComparison[T]): Matcher[T with T]

    This method enables the following syntax:

    This method enables the following syntax:

    8 should (not be >= (7) or not be >= (6))
                                   
    

  17. def be[T](resultOfLessThanOrEqualToComparison: ResultOfLessThanOrEqualToComparison[T]): Matcher[T with T]

    This method enables the following syntax:

    This method enables the following syntax:

    2 should (not be <= (3) or not be <= (2))
                                   
    

  18. def be[T](resultOfGreaterThanComparison: ResultOfGreaterThanComparison[T]): Matcher[T with T]

    This method enables the following syntax:

    This method enables the following syntax:

    7 should (not be > (5) or not be > (6))
                                  
    

  19. def be[T](resultOfLessThanComparison: ResultOfLessThanComparison[T]): Matcher[T with T]

    This method enables the following syntax:

    This method enables the following syntax:

    5 should (not be < (7) or not be < (8))
                                  
    

  20. def be[T](o: Null): Matcher[T with AnyRef]

    This method enables the following syntax:

    This method enables the following syntax:

    map should (contain key (7) or not be (null))
                                       
    

  21. def be(any: Any): Matcher[T]

    This method enables the following syntax:

    This method enables the following syntax:

    1 should (not be (1) or not be (2))
                                
    

  22. def contain[T](resultOfValueWordApplication: ResultOfValueWordApplication[T]): Matcher[T with scala.collection.Map[K,T] forSome { type K }]

    This method enables the following syntax:

    This method enables the following syntax:

    Map("one" -> 1, "two" -> 2) should (not contain value (2) or not contain value (3))
                                                                     
    

  23. def contain[T](resultOfKeyWordApplication: ResultOfKeyWordApplication[T]): Matcher[T with Map[T, Any]]

    This method enables the following syntax:

    This method enables the following syntax:

    Map("one" -> 1, "two" -> 2) should (not contain key ("two") or not contain key ("three"))
                                                                       
    

  24. def contain[T](expectedElement: T): Matcher[T with Iterable[T]]

    This method enables the following syntax:

    This method enables the following syntax:

    Array(1, 2) should (not contain (1) or not contain (3))
                                               
    

  25. def endWith(expectedSubstring: String): Matcher[T with String]

    This method enables the following syntax:

    This method enables the following syntax:

    "fred" should (not endWith ("fred") or not endWith ("1.7"))
                                               
    

  26. def endWith(resultOfRegexWordApplication: ResultOfRegexWordApplication): Matcher[T with String]

    This method enables the following syntax:

    This method enables the following syntax:

    "fred" should (not endWith regex ("bob") or not endWith regex (decimal))
                                                    
    

  27. def equal(any: Any): Matcher[T]

    This method enables the following syntax:

    This method enables the following syntax:

    1 should (not equal (1) or not equal (2))
                                   
    

  28. def equals(arg0: Any): Boolean

    This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence

    This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence.

    The default implementations of this method is an equivalence relation:

    • It is reflexive: for any instance x of type Any, x.equals(x) should return true.
    • It is symmetric: for any instances x and y of type Any, x.equals(y) should return true if and only if y.equals(x) returns true.
    • It is transitive: for any instances x, y, and z of type AnyRef if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.

    If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is often necessary to override hashCode to ensure that objects that are "equal" (o1.equals(o2) returns true) hash to the same Int (o1.hashCode.equals(o2.hashCode)).

    arg0

    the object to compare against this object for equality.

    returns

    true if the receiver object is equivalent to the argument; false otherwise.

    definition classes: AnyRef ⇐ Any
  29. def fullyMatch(resultOfRegexWordApplication: ResultOfRegexWordApplication): Matcher[T with String]

    This method enables the following syntax:

    This method enables the following syntax:

    "fred" should (not fullyMatch regex ("fred") or not fullyMatch regex (decimal))
                                                        
    

  30. def hashCode(): Int

    Returns a hash code value for the object

    Returns a hash code value for the object.

    The default hashing algorithm is platform dependent.

    Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.

    definition classes: AnyRef ⇐ Any
  31. def have[T](firstPropertyMatcher: org.scalatest.matchers.HavePropertyMatcher[T, _], propertyMatchers: org.scalatest.matchers.HavePropertyMatcher[T, _]*): Matcher[T with T]

    This method enables the following syntax:

    This method enables the following syntax:

    book should (not have (title ("Moby Dick")) or not have (author ("Melville")))
                                                       
    

  32. def have(resultOfSizeWordApplication: ResultOfSizeWordApplication): Matcher[T with AnyRef]

    This method enables the following syntax:

    This method enables the following syntax:

    Array(1, 2) should (not have size (2) or not have size (3))
                                                 
    

  33. def have(resultOfLengthWordApplication: ResultOfLengthWordApplication): Matcher[T with AnyRef]

    This method enables the following syntax:

    This method enables the following syntax:

    Array(1, 2) should (not have length (2) or not have length (3))
                                                   
    

  34. def include(expectedSubstring: String): Matcher[T with String]

    This method enables the following syntax:

    This method enables the following syntax:

    "fred" should (not include ("bob") or not include ("1.7"))
                                              
    

  35. def include(resultOfRegexWordApplication: ResultOfRegexWordApplication): Matcher[T with String]

    This method enables the following syntax:

    This method enables the following syntax:

    "fred" should (not include regex ("fred") or not include regex (decimal))
                                                     
    

  36. def startWith(expectedSubstring: String): Matcher[T with String]

    This method enables the following syntax:

    This method enables the following syntax:

    "fred" should (not startWith ("fred") or not startWith ("1.7"))
                                                 
    

  37. def startWith(resultOfRegexWordApplication: ResultOfRegexWordApplication): Matcher[T with String]

    This method enables the following syntax:

    This method enables the following syntax:

    "fred" should (not startWith regex ("bob") or not startWith regex (decimal))
                                                      
    

  38. def toString(): String

    Returns a string representation of the object

    Returns a string representation of the object.

    The default representation is platform dependent.

    definition classes: AnyRef ⇐ Any

Instance constructors

  1. new OrNotWord()