package testing
- Alphabetic
- Public
- Protected
Type Members
- class DirSuite extends DirSuiteLike
- class DirSuiteException extends TestFailedException
Generic exception class for DirSuite.
Generic exception class for DirSuite. This is typically thrown in cases when there is something broken about dirsuite setup.
- trait DirSuiteLike extends AnyFunSuiteLike
DirSuiteLike trait for DirSuite.
DirSuiteLike trait for DirSuite. At the moment this is actual implementation.
- Annotations
- @SuppressWarnings()
- sealed trait FindFilesPattern extends AnyRef
- final case class Glob(glob: String) extends FindFilesPattern with Product with Serializable
Glob for path matching.
Glob for path matching.
For syntax see: https://docs.oracle.com/javase/tutorial/essential/io/fileOps.html#glob
- glob
string *without* "glob:"
- final case class Regex(regex: String) extends FindFilesPattern with Product with Serializable
Regex for path matching.
Regex for path matching.
For syntax see: https://docs.oracle.com/javase/tutorial/essential/regex/index.html
- regex
string *without* "regex:"
- final case class TestCase(testname: Path, execs: Seq[Array[String]], testVectors: Seq[TestVector]) extends Product with Serializable
This holds all information about one test case
This holds all information about one test case
- testname
full path of test's exec-file.
- execs
sequence of steps which will be executed when this test case is run.
- testVectors
test vectors. These are checked after all steps are executed.
- Annotations
- @SuppressWarnings()
- final case class TestVector(reference: Path, output: Path, validator: (Path, Path, Path) => Option[String]) extends Product with Serializable
Eech test vector contains one input/output pair and validator-method to validate this testvector.
Eech test vector contains one input/output pair and validator-method to validate this testvector. One testcase con contain zero or many testvectors.
- reference
expected output
- output
actual output
- validator
for this testvector
- class TestVectorException extends TestFailedException
Exception class for testvector validation errors.
Exception class for testvector validation errors. Validator is NOT supposed throw this, but to use Option[String] to report test vector failures.
Typically this is thrown in case that output files is not found, or there was an exception because of content of output (output is not syntactically correct, e.g. JSON/XML SAX errors).
Value Members
- object DirSuiteLike extends Serializable
- object TestValidator
Default validators for test cases.
Default validators for test cases. Validator is selected by DirSuite.selectValidator-method, which can be overloaded test-by-test class basis.
Validator interface is:
(testname: Path, reference: Path, output:Path) => Option[String]
When None is successfull validation, and Some(ErrMsg) is validation error.
- Annotations
- @SuppressWarnings()