this implicit provides an inverted syntax to adapt matchers to make the adaptation more readable in some cases: - def haveExtension(extension: =>String) = ((_:File).getPath) ^^ endWith(extension)
this implicit provides an inverted syntax to adapt matchers to make the adaptation more readable in some cases: - def haveExtension(extension: =>String) = ((_:File).getPath) ^^ endWith(extension)
Exception matcher checking the type of a thrown exception.
Exception matcher checking the type of a thrown exception.
This matchers matches exception instances.
This matchers matches exception instances.
throwA
Matcher to find if the regexp a is found inside b.
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 pattern p is found inside b.
Matcher to find if the pattern p is found inside b.
Matcher to find if the pattern p is found inside b.
Matcher to find if the pattern p is found inside b.
Matcher to find if the Regex r is found inside b.
Matcher to find if the Regex r is found inside b.
Matcher to find if the regexp a is found inside b.
Matcher to find if the regexp a is found inside b. This matcher checks if the found groups are really the ones expected
add an await
method to any matcher Matcher[T]
so that it can be transformed into a Matcher[Future[T]]
add an await
method to any matcher Matcher[T]
so that it can be transformed into a Matcher[Future[T]]
The SeqMatcher
class is a matcher matching a sequence of objects with a matcher returned by a function.
The SeqMatcher
class is a matcher matching a sequence of objects with a matcher returned by a function.
Usage: List(1, 2, 3) must ((beEqualTo(_:Int)).toSeq)(List(1, 2, 3))
The SetMatcher
class is a matcher matching a set of objects with a matcher returned by a function.
The SetMatcher
class is a matcher matching a set of objects with a matcher returned by a function.
Usage: List(1, 2, 3) must ((beEqualTo(_:Int)).toSet)(List(2, 1, 3)) }}}
implicit definition to create significant figures for the beCloseTo matcher
implicit definition to create significant figures for the beCloseTo matcher
implicit definition to create significant figures for the beCloseTo matcher
implicit definition to create significant figures for the beCloseTo matcher
when a Future contains a result, it can be awaited to return this result
when a Future contains a result, it can be awaited to return this result
Add functionalities to functions returning matchers so that they can be combined before taking a value and returning actual matchers
Add functionalities to functions returning matchers so that they can be combined before taking a value and returning actual matchers
matches if a.toLowerCase.trim != b.toLowerCase.trim
matches if a.toLowerCase.trim != b.toLowerCase.trim
matches if a != b
matches if a != b
alias for beLessThan
alias for beLessThan
alias for beLessThanOrEqualTo
alias for beLessThanOrEqualTo
matches if a.toLowerCase.trim = b.toLowerCase.trim
matches if a.toLowerCase.trim = b.toLowerCase.trim
matches if a == b
matches if a == b
matches if a == b after an implicit conversion
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
alias for beMatching but matching just a fragment of the string
alias for beMatching but matching just a fragment of the string
alias for beMatching but matching just a fragment of the string
alias for beMatching but matching just a fragment of the string
alias for beGreaterThan
alias for beGreaterThan
alias for beGreaterThanOrEqualTo
alias for beGreaterThanOrEqualTo
implicit definition to create delta for the beCloseTo matcher
implicit definition to create delta for the beCloseTo matcher
shorthand method to create an Arguments object
shorthand method to create an Arguments object
implicit definition to transform any MatchResult to a Result
implicit definition to transform any MatchResult to a Result
apply a matcher atLeast one value
apply a matcher atLeast one value
verify the function f for at least one value
verify the function f for at least one value
verify the function f for at least one value, where the PartialFunction is defined
verify the function f for at least one value, where the PartialFunction is defined
apply a matcher atLeast one value
apply a matcher atLeast one value
verify the function f for at least one value
verify the function f for at least one value
verify the function f for at least one value, where the PartialFunction is defined
verify the function f for at least one value, where the PartialFunction is defined
alias for beTheSameAs
alias for beTheSameAs
alias for beOneOf
alias for beOneOf
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
matches if v.isAssignableFrom(c)
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
matches if target - actual < 10 pow (log x - significantDigits)
matches if target - actual < 10 pow (log x - significantDigits)
matches if x = n +/- delta
matches if x = n +/- delta
matches if x = n +/- delta
matches if x = n +/- delta
matches if the partial function is defined at those values
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
matches if a.isEmpty
matches if a.isEmpty
matches if a == b
matches if a == b
matches if a == false
matches if a == false
matches if x > n
matches if x > n
matches if x >= n
matches if x >= n
matches if x < n
matches if x < n
matches if x <= n
matches if x <= 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
matches if b matches the regex a
matches if b matches the regex a
matches if b matches the pattern a
matches if b matches the pattern a
matches if b matches the regular expression a
matches if b matches the regular expression a
matches if the value is null
matches if the value is null
matches if t.toSeq.exists(_ == v)
matches if t.toSeq.exists(_ == v)
a matcher checking if the elements are ordered
matches if a eq b
matches if a eq b
matches if a == true
matches if a == true
matches if a == b
matches if a == b
alias for the adventurous: 5 must (be[(2, 7)
[)
alias for the adventurous: 5 must (be[(2, 7)
[)
alias for the adventurous: 5 must (be](2, 7)
[)
alias for the adventurous: 5 must (be](2, 7)
[)
matches if a != b
matches if a != b
matches if a.toLowerCase.trim != b.toLowerCase.trim
matches if a.toLowerCase.trim != b.toLowerCase.trim
matches if a != b
matches if a != b
alias for beLessThan
alias for beLessThan
alias for beLessThanOrEqualTo
alias for beLessThanOrEqualTo
matches if a == b
matches if a == b
matches if a.toLowerCase.trim = b.toLowerCase.trim
matches if a.toLowerCase.trim = b.toLowerCase.trim
matches if a == b
matches if a == b
matches if a == b after an implicit conversion
matches if a == b after an implicit conversion
alias for beGreaterThan
alias for beGreaterThan
alias for beGreaterThanOrEqualTo
alias for beGreaterThanOrEqualTo
this method can be overridden to throw exceptions when checking the match result
this method can be overridden to throw exceptions when checking the match result
this method can be overridden to throw exceptions when checking the match result
this method can be overridden to throw exceptions when checking the match result
this method can be overridden to throw exceptions when checking the result
this method can be overridden to throw exceptions when checking the result
shortcut to set new Colors
shortcut to set new Colors
matches if (b contains a)
matches if (b contains a)
matches if (b contains a)
matches if (b contains a)
Additional contain methods using to avoid automatic tuple conversions
Additional contain methods using to avoid automatic tuple conversions
COLLECTION MATCHERS
COLLECTION MATCHERS
ELEMENTS 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)
match if a traversable contains one of (t1, t2)
match if a traversable contains one of (t1, t2)
match if traversable contains (x matches .*+t+.*)
match if traversable contains (x matches .*+t+.*)
match if traversable contains (x matches p)
match if traversable contains (x matches p)
does a containAll comparison in both ways
does a containAll comparison in both ways
an Expectable with a description function
an Expectable with a description function
an Expectable with a description
an Expectable
an Expectable with a function to show the element T
describe a value with the aka method
describe a value with the aka method
shortcut to display the differences with some specific parameters
shortcut to display the differences with some specific parameters
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
matches if b.endsWith(a)
matches if b.endsWith(a)
matches if a == b
matches if a == b
a matcher that will retry the nested matcher 40 times
a matcher that will retry the nested matcher a given number of times
a result that is retried at least 40 times until it's ok
a matcher that will retry the nested matcher a given number of times
shortcut to exclude some tagged fragments
shortcut to exclude some tagged fragments
shortcut to add exclude trace patterns
shortcut to add exclude trace patterns
shortcut to create a stackTrace filter to exclude only some elements
shortcut to create a stackTrace filter to exclude only some elements
matches if the regexp r is found inside b
matches if the regexp r is found inside b
matches if the pattern p is found inside b
matches if the pattern p is found inside b
matches if the regexp a is found inside b
matches if the regexp a is found inside b
apply a matcher for all values
apply a matcher for all values
verify the function f for all the values, stopping after the first failure
verify the function f for all the values, stopping after the first failure
verify the function f for all the values, stopping after the first failure, where the PartialFunction is defined
verify the function f for all the values, stopping after the first failure, where the PartialFunction is defined
apply a matcher foreach value
apply a matcher foreach value
verify the function f for all the values, and collect all failures
verify the function f for all the values, and collect all failures
verify the function f for all the values, and collect all failures, where the PartialFunction is defined
verify the function f for all the values, and collect all failures, where the PartialFunction is defined
create a block of new fragments where each of them is separated by a newline and there is a specific offset from the left margin
create a block of new fragments where each of them is separated by a newline and there is a specific offset from the left margin
implicit definition to accept any MatchResult as a Boolean value.
implicit definition to accept any MatchResult as a Boolean value. It is true if the MatchResult is not an Error or a Failure
shortcut to filter nothing
shortcut to filter nothing
This method transform a function to a Matcher
This method transform a function to a Matcher
This method transform a function, with function descriptors to a Matcher
This method transform a function, with function descriptors to a Matcher
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
This method transform a function to a Matcher
This method transform a function to a Matcher
This method transform a function to a Matcher
This method transform a function to a Matcher
matches if v.getClass == c
matches if v.getClass == c
matches if x.getClass.getInterfaces.contains(T)
matches if x.getClass.getInterfaces.contains(T)
matches if map.contains(k)
matches if map.contains(k)
matches if map.contains(k) forall key k
matches if map.contains(k) forall key k
alias for haveSize
alias for haveSize
alias for haveSize
alias for haveSize
matches if map contains a pair (key, value) == (k, v)
matches if map contains a pair (key, value) == (k, v)
matches if map contains all the specified pairs
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
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 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
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
shortcut to include only some tagged fragments
shortcut to include only some tagged fragments
shortcut to add include trace patterns
shortcut to add include trace patterns
shortcut to create a stackTrace filter to include only some elements
shortcut to create a stackTrace filter to include only some elements
arguments for a specification where examples must be executed in their own specification
transform a value to a zero-arg function returning that value
transform a value to a zero-arg function returning that value
alias for haveSize
alias for haveSize
alias for haveSize
alias for haveSize
matches if x <= n
matches if x <= n
analyse the fragments and extract examples from pieces of text
analyse the fragments and extract examples from pieces of text
modify the fragments, using the current environment
modify the fragments, using the current environment
modify the specification structure
modify the specification structure
this method can be overridden to intercept a MatchResult and change its message before it is thrown
this method can be overridden to intercept a MatchResult and change its message before it is thrown
This method transform a function returning a Result to a Matcher
This method transform a function returning a Result to a Matcher
a Matcher[T] can check a value
a Matcher[T] can check a value
shortcut to avoid colored output
shortcut to avoid colored output
negate a matcher
negate a matcher
shortcut to execute and print only some examples
shortcut to execute and print only some examples
This method transform a function returning a pair (Boolean, String for ko message) to a Matcher
This method transform a function returning a pair (Boolean, String for ko message) to a Matcher
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
shortcut to show only the text without any execution
shortcut to show only the text without any execution
based on the interpolated variables and the expressions captured with the macro, create the appropriate fragments
based on the interpolated variables and the expressions captured with the macro, create the appropriate fragments
if the Yrangepos scalac option is not set then we use an approximated method to find the expressions texts
the match result without any side-effects
a sequence of GWT steps can be inserted in a specification to delimit pieces of text to interpret.
a sequence of GWT steps can be inserted in a specification to delimit pieces of text to interpret. The "given/when" steps create execute.Step objects while the "then" steps create Examples
The whole sequence also creates one tagged section with the title of the sequence
implicit definition to transform a Seq of MatchResults to a Result
implicit definition to transform a Seq of MatchResults to a Result
arguments for a specification where examples must be executed sequentially
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
shortcut to print only some statuses
shortcut to print only some statuses
alias for haveSize
alias for haveSize
alias for haveSize
alias for haveSize
shortcut to skip all examples
shortcut to skip all examples
shortcut to skip all examples when a condition is true.
shortcut to skip all examples when a condition is true. if the condition throws an exception, its stacktrace is *not* printed and all the examples are skipped
shortcut to skip all examples when a condition is false.
shortcut to skip all examples when a condition is false.
alias for beSorted
alias for beSorted
matches if b.startsWith(a)
matches if b.startsWith(a)
shortcut to stop after the first failure or error
shortcut to stop after the first failure or error
shortcut to stop after the first skipped result
shortcut to stop after the first skipped result
adapt the BeEqualTo matcher to provide ignoreCase and ignoreSpace matcher
adapt the BeEqualTo matcher to provide ignoreCase and ignoreSpace matcher
this allows a function returning a matcher to be used where the same function with a byname parameter is expected
this allows a function returning a matcher to be used where the same function with a byname parameter is expected
this allows the contain(string) matcher for StringMatchers to be used with a Traversable
this allows the contain(string) matcher for StringMatchers to be used with a Traversable
a matcher checking the value of an Exception
a matcher checking the type of an Exception and its message (as a regexp)
a matcher checking the type of an Exception
alias for throwA
alias for throwA
alias for throwA
alias for throwA
alias for throwA
alias for throwA
This implicit definition allows to declare a number of times
3.times
This implicit definition allows to declare a number of times
3.times
matcher aliases and implicits to use with be + matcher
matcher aliases and implicits to use with be + matcher
implicit definition to accept any boolean value as a Result This avoids writing b must beTrue
implicit definition to accept any boolean value as a Result This avoids writing b must beTrue
This method transform a function returning a triplet (Boolean, String for ok message, String for ko message) to a Matcher
This method transform a function returning a triplet (Boolean, String for ok message, String for ko message) to a Matcher
A value can be tested against another with the === operator.
A value can be tested against another with the === operator. It is equivalent to writing a must_== b
matches if a == b
matches if a == b
an expected value can be used to check another value
an expected value can be used to check another value
shortcut to include only examples with some previous statuses
shortcut to include only examples with some previous statuses
shortcut to print only failures and errors
shortcut to print only failures and errors
alias for beCloseTo
alias for beCloseTo
alias for beCloseTo
alias for beCloseTo
Trait for the script.Specification abstract class