0.3.0 Resource and Temporary File Expressions

@tkob tkob released this Dec 4, 2015 · 12 commits to master since this release

YokohamaUnit 0.3.0 introduces two new features:

Resource Expression

You can write:

Let uri = resource "text1.txt" as `URI`

instead of:

Let uri = `getClass().getResource("text1.txt").toURI()`.

The type of a resource expression without as keyword is java.net.URL.

as keyword can take java.io.InputStream, java.net.URI or java.io.File.

Temporary File expressions

You can write:

Let tempFile = a temporary file.


Let tempFile = a temp file.

instead of:

Let tempFile = `File.createTempFile("prefix", ".tmp")`.

Do `tempFile.deleteOnExit()`.

Other Changes

  • Refactoring and bug fix on GenSym class
  • Adopt Javaslang