Attributes
- Companion
- trait
- Graph
-
- Supertypes
-
trait Matcherstrait EventuallyMatcherstrait EventuallyResultstrait TryMatcherstrait EitherMatcherstrait OptionMatcherstrait ValueCheckstrait ValueChecksBasetrait NumericMatcherstrait ExceptionMatcherstrait ExpectationsCreationtrait ResultCheckstrait MatchResultStackTracetrait StringMatcherstrait MapMatcherstrait TraversableMatcherstrait NumberOfTimestrait ValueChecksLowImplicitstrait TraversableBaseMatcherstrait AnyMatchersclass Objecttrait Matchableclass AnyShow all
- Self type
-
Matchers.type
Members list
Type members
Inherited classlikes
An exception matcher checks if an expression throws some specified exceptions:
An exception matcher checks if an expression throws some specified exceptions:
- by checking the type of exception
- if no exception is thrown it returns a success
- if an exception is thrown with with a subtype of java.lang.Error and we expect an Exception then it is re-thrown
- if an exception is thrown with a different type it returns a failure
- by checking the exception message
- by checking a condition on the exception
Attributes
- Inherited from:
- ExceptionMatchers
- Supertypes
Matcher to find if the regexp a is found inside b. This matcher can be specialized to a FindMatcherWithGroups which will also check the found groups
Matcher to find if the regexp a is found inside b. This matcher can be specialized to a FindMatcherWithGroups which will also check the found groups
Attributes
- Inherited from:
- StringMatchers
- Supertypes
- Known subtypes
-
class FindMatcherPatternclass FindMatcherRegex
Matcher to find if the pattern p is found inside b.
Matcher to find if the pattern p is found inside b.
Attributes
- Inherited from:
- StringMatchers
- Supertypes
- Known subtypes
-
class FindMatcherRegex
Matcher to find if the pattern p is found inside b.
Matcher to find if the pattern p is found inside b.
Attributes
- Inherited from:
- StringMatchers
- Supertypes
Matcher to find if the Regex r is found inside b.
Matcher to find if the Regex r is found inside b.
Attributes
- Inherited from:
- StringMatchers
- Supertypes
-
class FindMatcherPatternclass FindMatchertrait Matcher[String]class Objecttrait Matchableclass AnyShow all
Matcher to find if the regexp a is found inside b. This matcher checks if the found groups are really the ones expected
Matcher to find if the regexp a is found inside b. This matcher checks if the found groups are really the ones expected
Attributes
- Inherited from:
- StringMatchers
- Supertypes
- Known subtypes
Value members
Inherited methods
matches if a.toLowerCase.trim != b.toLowerCase.trim
matches if a != b
alias for beLessThan
alias for beLessThanOrEqualTo
matches if a.toLowerCase.trim = b.toLowerCase.trim
matches if a == b
matches if a == b after an implicit conversion
alias for beMatching but matching just a fragment of the string
alias for beMatching but matching just a fragment of the string
Attributes
- Inherited from:
- StringMatchers
alias for beGreaterThan
alias for beGreaterThanOrEqualTo
Attributes
- Inherited from:
- TryMatchers
Attributes
- Inherited from:
- TryMatchers
Attributes
- Inherited from:
- TryMatchers
Attributes
- Inherited from:
- TryMatchers
Attributes
- Inherited from:
- TryMatchers
Attributes
- Inherited from:
- TryMatchers
Attributes
- Inherited from:
- TraversableBaseMatchers
alias for beOneOf, which can be used with contain matchers
Attributes
- Inherited from:
- OptionMatchers
Attributes
- Inherited from:
- TraversableBaseMatchers
Attributes
- Inherited from:
- TraversableBaseMatchers
alias for beTheSameAs
Attributes
- Inherited from:
- TryMatchers
Attributes
- Inherited from:
- TryMatchers
Attributes
- Inherited from:
- TryMatchers
Attributes
- Inherited from:
- TryMatchers
Attributes
- Inherited from:
- AnyMatchers
alias for beOneOf
Attributes
- Inherited from:
- OptionMatchers
matches if a is null when v is null and a is not null when v is not null
matches if a is null when v is null and a is not null when v is not null
Attributes
- Inherited from:
- AnyMatchers
matches if v.isAssignableFrom(c)
matches if a value is between 2 others according to an Ordering
matches if a value is between 2 others according to an Ordering
Attributes
- Inherited from:
- NumericMatchers
Attributes
- Inherited from:
- NumericMatchers
matches if target - actual < 10 pow (log actual - significantDigits)
matches if target - actual < 10 pow (log actual - significantDigits)
Attributes
- Inherited from:
- NumericMatchers
matches if actual = n +/- delta
matches if actual = n +/- delta
matches if the partial function is defined at those values
matches if the partial function is defined at those values and return expected values
matches if the partial function is defined at those values and return expected values
Attributes
- Inherited from:
- MapMatchers
matches if a.isEmpty
matches if a == b
check if a Throwable has a specific class and error message The message must be a regular expression, for example (new IllegalArgumentException("incorrect arguments"): Throwable) must beExceptionIllegalArgumentException
check if a Throwable has a specific class and error message The message must be a regular expression, for example (new IllegalArgumentException("incorrect arguments"): Throwable) must beExceptionIllegalArgumentException
Attributes
- Inherited from:
- ExceptionMatchers
Attributes
- Inherited from:
- TryMatchers
Attributes
- Inherited from:
- TryMatchers
matches if a == false
matches if actual > n
matches if actual >= n
Attributes
- Inherited from:
- EitherMatchers
Attributes
- Inherited from:
- EitherMatchers
matches if actual < n
matches if actual <= n
matches if the value returns a successful result when applied to a PartialFunction
matches if the value returns a successful result when applied to a PartialFunction
Attributes
- Inherited from:
- AnyMatchers
matches if b matches the regular expression a
alias for beMatching but matching just a fragment of the string
alias for beMatching but matching just a fragment of the string
Attributes
- Inherited from:
- StringMatchers
Attributes
- Inherited from:
- OptionMatchers
matches if the value is null
matches if t.toSeq.exists(_ == v)
Attributes
- Inherited from:
- EitherMatchers
Attributes
- Inherited from:
- EitherMatchers
Attributes
- Inherited from:
- OptionMatchers
Attributes
- Inherited from:
- OptionMatchers
Attributes
- Returns
-
a matcher checking if the elements are ordered
- Inherited from:
- TraversableBaseMatchers
Attributes
- Inherited from:
- TryMatchers
Attributes
- Inherited from:
- TryMatchers
matches if a eq b
matches if a == true
matches if a != b
matches if a.toLowerCase.trim != b.toLowerCase.trim
alias for beLessThan
alias for beLessThanOrEqualTo
matches if a == b
matches if a.toLowerCase.trim = b.toLowerCase.trim
matches if a == b after an implicit conversion
alias for beGreaterThan
alias for beGreaterThanOrEqualTo
alias for beCloseTo
alias for beCloseTo
Attributes
- Inherited from:
- NumericMatchers
this method can be overridden to throw exceptions when checking a result
this method can be overridden to throw exceptions when checking a result
Attributes
- Inherited from:
- ResultChecks
Attributes
- Inherited from:
- NumericMatchers
Attributes
- Inherited from:
- NumericMatchers
Attributes
- Inherited from:
- NumericMatchers
Attributes
- Inherited from:
- NumericMatchers
matches if (b contains a)
matches if (b contains a)
Attributes
- Inherited from:
- TraversableBaseMatchers
Attributes
- Inherited from:
- TraversableBaseMatchers
Attributes
- Inherited from:
- TraversableBaseMatchers
Attributes
- Inherited from:
- TraversableBaseMatchers
Attributes
- Inherited from:
- TraversableBaseMatchers
Attributes
- Inherited from:
- TraversableBaseMatchers
Attributes
- Inherited from:
- TraversableBaseMatchers
Attributes
- Inherited from:
- TraversableBaseMatchers
Attributes
- Inherited from:
- TraversableBaseMatchers
Attributes
- Inherited from:
- TraversableBaseMatchers
Attributes
- Inherited from:
- TraversableBaseMatchers
Attributes
- Inherited from:
- TraversableBaseMatchers
Attributes
- Inherited from:
- TraversableBaseMatchers
Attributes
- Inherited from:
- TraversableBaseMatchers
Attributes
- Inherited from:
- TraversableBaseMatchers
Attributes
- Inherited from:
- TraversableBaseMatchers
Attributes
- Inherited from:
- TraversableBaseMatchers
Attributes
- Inherited from:
- TraversableBaseMatchers
Attributes
- Inherited from:
- TraversableBaseMatchers
Attributes
- Inherited from:
- TraversableBaseMatchers
Additional contain methods using to avoid automatic tuple conversions
Additional contain methods using to avoid automatic tuple conversions
Attributes
- Inherited from:
- TraversableBaseMatchers
COLLECTION MATCHERS
ELEMENTS MATCHERS
match if a traversable contains all the elements of seq (and maybe more)
match if a traversable contains all the elements of seq (and maybe more)
Attributes
- Inherited from:
- TraversableBaseMatchers
match if a traversable contains one of (t1, t2)
match if traversable contains (x matches .+t+.)
match if traversable contains (x matches p)
does a containAll comparison in both ways
Attributes
- Returns
-
an Expectable with a description function
- Inherited from:
- ExpectationsCreation
Attributes
- Returns
-
an Expectable with a description
- Inherited from:
- ExpectationsCreation
Attributes
- Returns
-
an Expectable
- Inherited from:
- ExpectationsCreation
Attributes
- Returns
-
an Expectable with a description function
- Inherited from:
- ExpectationsCreation
Attributes
- Returns
-
an Expectable with a function to show the element T
- Inherited from:
- ExpectationsCreation
Attributes
- Inherited from:
- TraversableBaseMatchers
matches if b.endsWith(a)
matches if a == b
Attributes
- Returns
-
a matcher that will retry the nested matcher 40 times
- Inherited from:
- EventuallyMatchers
Attributes
- Returns
-
a matcher that will retry the nested matcher a given number of times
- Inherited from:
- EventuallyMatchers
Value parameters
- sleep
-
the function applied on the retry number (first is 1)
Attributes
- Returns
-
a matcher that will retry the nested matcher a given number of times
- Inherited from:
- EventuallyMatchers
Attributes
- Returns
-
a result that is retried at least 40 times until it's ok
- Inherited from:
- EventuallyResults
Attributes
- Returns
-
a matcher that will retry the nested matcher a given number of times
- Inherited from:
- EventuallyResults
Value parameters
- sleep
-
the function applied on the retry number (first is 1)
Attributes
- Returns
-
a matcher that will retry the nested matcher a given number of times
eventually(retries = 2, sleep = _ * 100.milliseconds) { aResult }
- Inherited from:
- EventuallyResults
Attributes
- Inherited from:
- TraversableBaseMatchers
Attributes
- Inherited from:
- TryMatchers
Attributes
- Inherited from:
- TryMatchers
Attributes
- Inherited from:
- TryMatchers
matches if the regexp r is found inside b
matches if the pattern p is found inside b
matches if the regexp a is found inside b
Attributes
- Inherited from:
- NumericMatchers
Attributes
- Inherited from:
- NumericMatchers
matches if v.getClass == c
matches if x.getClass.getInterfaces.contains(T)
matches if map.contains(k)
matches if map.contains(k) forall key k
alias for haveSize
alias for haveSize
matches if map contains a pair (key, value) == (k, v)
matches if map contains all the specified pairs
match if there is a way to size T
match if there is a way to size T
matches if c.isAssignableFrom(v.getClass.getSuperclass)
matches if map contains a pair (key, value) with value == v
matches if map contains a pair (key, value) with value == v for all value v
matches if map contains a pair (key, value) with value == v for all value v
Attributes
- Inherited from:
- MapMatchers
Attributes
- Inherited from:
- EitherMatchers
Attributes
- Inherited from:
- EitherMatchers
Attributes
- Inherited from:
- EitherMatchers
alias for haveSize
alias for haveSize
Attributes
- Inherited from:
- NumericMatchers
matches if actual <= n
this method can be overridden to intercept a Result and modify it. It is used for example to set a stacktrace providing the location of a failure
this method can be overridden to intercept a Result and modify it. It is used for example to set a stacktrace providing the location of a failure
Attributes
- Inherited from:
- ResultChecks
alias to use with contain
Attributes
- Inherited from:
- OptionMatchers
negate a matcher
Attributes
- Inherited from:
- EitherMatchers
Attributes
- Inherited from:
- EitherMatchers
Attributes
- Inherited from:
- EitherMatchers
Attributes
- Returns
-
the result without any side-effects
- Inherited from:
- ResultChecks
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
- Inherited from:
- MatchResultStackTrace
alias for haveSize
alias for haveSize
Attributes
- Inherited from:
- OptionMatchers
Attributes
- Inherited from:
- OptionMatchers
Attributes
- Inherited from:
- OptionMatchers
alias for beSorted
matches if b.startsWith(a)
Attributes
- Inherited from:
- TryMatchers
Attributes
- Inherited from:
- TryMatchers
Attributes
- Inherited from:
- ExpectationsCreation
Attributes
- Inherited from:
- ExpectationsCreation
Attributes
- Returns
-
a matcher checking the value of an Exception
- Inherited from:
- ExceptionMatchers
Attributes
- Returns
-
a matcher checking the type of an Exception and its message (as a regexp)
- Inherited from:
- ExceptionMatchers
Attributes
- Returns
-
a matcher checking the type of an Exception
- Inherited from:
- ExceptionMatchers
alias for throwA
alias for throwA
alias for throwA
an expected value can be used to check another value
alias for beCloseTo
alias for beCloseTo
Givens
Inherited givens
a check of type T can be downcasted implicitly to a check of type S >: T
a check of type T can be downcasted implicitly to a check of type S >: T
Attributes
- Inherited from:
- ValueChecks
a function returning an object having an AsResult instance can check a value
a function returning an object having an AsResult instance can check a value
Attributes
- Inherited from:
- ValueChecksLowImplicits
implicit definition to create delta for the beCloseTo matcher
implicit definition to create delta for the beCloseTo matcher
Attributes
- Inherited from:
- NumericMatchers
a Matcher[T] can check a value
Attributes
- Inherited from:
- TraversableBaseMatchersLowImplicits (hidden)
a partial function returning an object having an AsResult instance can check a value
a partial function returning an object having an AsResult instance can check a value
Attributes
- Inherited from:
- ValueChecks
Attributes
- Inherited from:
- TraversableBaseMatchersLowImplicits (hidden)
Extensions
Inherited extensions
adapt the BeEqualTo matcher to provide ignoreCase and ignoreSpace matcher
adapt the BeEqualTo matcher to provide ignoreCase and ignoreSpace matcher
Attributes
- Inherited from:
- StringMatchers
adapt the BeEqualTo matcher to provide ignoreCase and ignoreSpace matcher
adapt the BeEqualTo matcher to provide ignoreCase and ignoreSpace matcher
Attributes
- Inherited from:
- StringMatchers
adapt the BeEqualTo matcher to provide ignoreCase and ignoreSpace matcher
adapt the BeEqualTo matcher to provide ignoreCase and ignoreSpace matcher
Attributes
- Inherited from:
- StringMatchers
This implicit definition allows to declare a number of times 3.times
This implicit definition allows to declare a number of times 3.times
Attributes
- Inherited from:
- NumberOfTimes
implicit definition to create significant figures for the beCloseTo matcher
implicit definition to create significant figures for the beCloseTo matcher
Attributes
- Inherited from:
- NumericMatchers
implicit definition to create significant figures for the beCloseTo matcher
implicit definition to create significant figures for the beCloseTo matcher
Attributes
- Inherited from:
- NumericMatchers
implicit definition to create significant figures for the beCloseTo matcher
implicit definition to create significant figures for the beCloseTo matcher
Attributes
- Inherited from:
- NumericMatchers