base


License

License

GroupId

GroupId

org.hammerlab.test
ArtifactId

ArtifactId

base_2.12
Last Version

Last Version

1.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

base
base
Project URL

Project URL

https://github.com/hammerlab/test-utils
Project Organization

Project Organization

org.hammerlab.test
Source Code Management

Source Code Management

https://github.com/hammerlab/test-utils

Download base_2.12

How to add to project

<!-- https://jarcasting.com/artifacts/org.hammerlab.test/base_2.12/ -->
<dependency>
    <groupId>org.hammerlab.test</groupId>
    <artifactId>base_2.12</artifactId>
    <version>1.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.hammerlab.test/base_2.12/
implementation 'org.hammerlab.test:base_2.12:1.1.0'
// https://jarcasting.com/artifacts/org.hammerlab.test/base_2.12/
implementation ("org.hammerlab.test:base_2.12:1.1.0")
'org.hammerlab.test:base_2.12:jar:1.1.0'
<dependency org="org.hammerlab.test" name="base_2.12" rev="1.1.0">
  <artifact name="base_2.12" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.hammerlab.test', module='base_2.12', version='1.1.0')
)
libraryDependencies += "org.hammerlab.test" % "base_2.12" % "1.1.0"
[org.hammerlab.test/base_2.12 "1.1.0"]

Dependencies

compile (3)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.8
org.hammerlab.test : suite_2.12 jar 1.1.0
org.hammerlab : paths_2.12 jar 1.5.0

test (3)

Group / Artifact Type Version
org.hammerlab.test : suite_2.12 jar 1.1.0
org.scalatest : scalatest_2.12 jar 3.0.4
org.hammerlab.math : tolerance_2.12 jar 1.0.0

Project Modules

There are no modules declared in this project.

test-utils

Build Status codecov Maven Central

  • suite: test suites, custom matchers, and more for the JVM and JS
  • base: JVM-specific extensions to suite that adds filesystem-utilities (e.g. creating temporary files/directories)

Get

libraryDependencies += "org.hammerlab.test" %%% "suite" % "1.1.0"

or

libraryDependencies += "org.hammerlab.test" %% "base" % "1.1.0"

Use

  • 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 Matchers:

      • 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):

        import org.hammerlab.test.matchers.files.FileMatcher.fileMatch
        actualPath 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.

        import org.hammerlab.test.matchers.files.DirMatcher.dirMatch
        actualPath should dirMatch(expectedPath)
    • seqs: collection-related Matchers:

      • SeqMatcher/SetMatcher: compare two Seqs, 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.
org.hammerlab.test

Hammer Lab

We're a lab working to understand and improve the immune response to cancer

Versions

Version
1.1.0
1.0.3
1.0.2
1.0.1
1.0.0