This project provides a JUnit Jupiter extension for in-memory
@TempDir
directories
using the Jimfs file system.
It is currently possible to use Jimfs and JUnit Jupiter together to create in-memory temporary directories for testing. However, this requires Jimfs in-memory file system handling to be integrated with JUnit Jupiter test lifecycle callbacks, boilerplate code that users must implement themselves.
Starting from version 5.10, JUnit Jupiter offers a
TempDirFactory
SPI
for customizing how temporary directories are created via the @TempDir
annotation.
The SPI allows libraries like Jimfs to provide their own implementations.
First-party support was requested in google/jimfs#258. However, Google has not yet started using JUnit Jupiter, and first-party support may only be provided once it does. Since this extension was created to offer users a smooth integration between Jimfs and JUnit Jupiter, the project will likely be discontinued if Google ever provides official support for this integration.
Jimfs JUnit Jupiter is released under version 2.0 of the Apache License.