Matcher to compare the contents of line contents
Matcher to compare the contents of line contents
matches if file.isDirectory
matches if file.isDirectory
matches if new File(path).isDirectory
matches if new File(path).isDirectory
matches if file.isFile
matches if file.isFile
matches if new File(path).isFile
matches if new File(path).isFile
matches if new File(path).isHidden
matches if new File(path).isHidden
matches if new File(path).canRead
matches if new File(path).canRead
matches if new File(path).canWrite
matches if new File(path).canWrite
matches if file.isAbsolute
matches if file.isAbsolute
matches if new File(path).isAbsolute
matches if new File(path).isAbsolute
matches if new File(path).exists
matches if new File(path).exists
matches if 2 paths are the same regardless of their separators
matches if 2 paths are the same regardless of their separators
matches if file.isHidden
matches if file.isHidden
matches if file.canRead
matches if file.canRead
a matcher checking if the elements are ordered
matches if file.canWrite
matches if file.canWrite
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
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)
matches if 1 lines content contains the lines of the other one
matches if 1 lines content contains the lines of the other one
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
matches if file.exists
matches if file.exists
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
matches if file.getAbsolutePath == path
matches if file.getAbsolutePath == path
matches if new File(path).getAbsolutePath == absolutePath
matches if new File(path).getAbsolutePath == absolutePath
matches if new File(path).getCanonicalPath == canonicalPath
matches if new File(path).getCanonicalPath == canonicalPath
matches if file.getCanonicalPath == path
matches if file.getCanonicalPath == path
alias for haveSize
alias for haveSize
alias for haveSize
alias for haveSize
matches if file.list == list
matches if file.list == list
matches if file.getName == name
matches if file.getName == name
matches if file.getParent == path
matches if file.getParent == path
matches if new File(path).getParent == parent
matches if new File(path).getParent == parent
matches if new File(path).getName == name
matches if new File(path).getName == name
check that all the paths in expectedDir
are the same as the ones in actualDir
then check that all the files in expectedDir
have the same contents as the files in actualDir
when they are present
check that all the files in expectedDir
have the same contents as the files in actualDir
when they are present
The default matcher is assuming that files are text files which must be compared line by line
matches if 2 contents, as a pair, have the same lines
matches if 2 contents, as a pair, have the same lines
matches if 2 contents have the same lines
matches if 2 contents have the same lines
match 2 files if they have the same MD5 digest
match 2 files if they have the same MD5 digest
check that all the paths in expectedDir
are the same as the ones in actualDir
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
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 new File(path).list == list(files)
matches if new File(path).list == list(files)
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
the match result without any side-effects
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
alias for haveSize
alias for haveSize
alias for haveSize
alias for haveSize
alias for beSorted
alias for beSorted
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
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 BeVerb and HaveVerb
matcher aliases and implicits to use with BeVerb and HaveVerb
matcher aliases and implicits to use with BeVerb and HaveVerb
matcher aliases and implicits to use with BeVerb and HaveVerb
matcher aliases and implicits to use with be / have + matcher
matcher aliases and implicits to use with be / have + 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
This trait provides matchers to check the presence of some expected files vs the actual ones and also ways to verify the contents of these files