Name: test-utils
Owner: Hammer Lab
Description: Unit-testing utilities
Created: 2016-12-04 17:58:13.0
Updated: 2016-12-04 19:44:11.0
Pushed: 2018-01-15 00:25:37.0
Homepage: null
Size: 77
Language: Scala
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Unit-testing utilities:
Suite
: wrapper for ScalaTest FunSuite with Matchers
.
TmpFiles
: create (and automatically garbage-collect) temporary files and directories.
matchers
: various ScalaTest Matcher
implementations:
files
: file- and directory-equality Matcher
s:
FileMatcher
: assert that two files' contents are equal, where the “expected” path is interpreted as being a path to a test-resource, and the “actual” path is absolute (e.g. a temporary file that was written via TmpFiles
above):
rt org.hammerlab.test.matchers.files.FileMatcher.fileMatch
alPath should fileMatch(expectedPath)
[DirMatcher
](https://github.com/hammerlab/test- utils/blob/master/src/main/scala/org/hammerlab/test/matchers/files/DirMatcher.scala): similar to the above, but verifying two directories' contents, highlighting missing, extra, and differing files.
rt org.hammerlab.test.matchers.files.DirMatcher.dirMatch
alPath should dirMatch(expectedPath)
seqs
: collection-related Matcher
s:
SeqMatcher
/SetMatcher
: compare two Seq
s, highlighting extra/missing elements.PairSeqMatcher
/MapMatcher
: compare two collections of key-value pairs, highlighting missing/extra elements as well as keys whose values differ.LazyAssert
: an assert
wrapper whose failure-message is evaluated lazily; useful in case it is expensive to compute (e.g. materializes/indexes data to provide context for debugging).
version.Util
: test the Scala version, at runtime.