JavaEngine: make sure that err is closed

Even if the evaluated code threw an exception.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
JavaEngine: remove temporary directory after use

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
MiniMaven: report a singular instead of a plural when appropriate

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Add a function to create temporary directories for tests

When we execute tests in the Maven context, the target/ directory is a
much better place to put stuff than /tmp/, especially when the tests are
run by Jenkins: the workspace including the target/ directories can be
accessed via Web, the /tmp/ directory cannot.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
TestUtils: add a function to determine the caller's class

In the test context, it is often helpful to have a reference to the
class that called the current method. This helper helps with that.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
TestUtils: add a convenient function to create a temporary directory

The TestUtils.createTemporaryDirectory() function used to require a
class to determine the context, but now we can offer a convenient
function that simply uses the calling for that.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Make ij-core's test classes available to ij-scripting-java's

This is needed to be able to reuse the newly-added function to create
temporary directories in unit tests.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Use temporary directories in target/ in ij-scripting-java's tests

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Make ij-core's test classes available to ij-updater-core's

This is needed to be able to reuse the newly-added function to create
temporary directories in unit tests.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Use temporary directories in target/ in ij-updater-core's tests

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Make ij-core's test classes available to ij-legacy's

This is needed to be able to reuse the newly-added function to create
temporary directories in unit tests.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Use temporary directories in target/ in ij-legacy's tests

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Make ij-core's test classes available to ij-minimaven's

This is needed to be able to reuse the newly-added function to create
temporary directories in unit tests.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Use temporary directories in target/ in ij-minimaven's tests

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Merge branch 'cleanup-test-tmp-dirs'

The point of this topic branch was to make sure that temporary
directories created by unit tests would no longer be created in /tmp/
(which is inconvenient especially when called by Jenkins because the
/tmp/ directory is not exposed via the web interface) but instead in a
temporary directory in the target/ folder that is already reserved by
Maven for build and test products (and that *is* exposed by Jenkins' web
interface).

It also helps on MacOSX, where Java's idea of the /tmp/ directory is
"/var/folders/Ns/NsI2OoOeH3GXo0E1vYanfU+++TM/-Tmp-" or something equally
horrible instead of just using /tmp/ and be done with it.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>