Skip to content

Configuration Parameters

Jimfs JUnit Jupiter supports JUnit configuration parameters.

Default @TempDir Factory

The junit.jupiter.tempdir.factory.default configuration parameter sets the default factory to use, expecting a fully qualified class name.

For example, the following configures JimfsTempDirFactory:

junit.jupiter.tempdir.factory.default=io.github.scordio.jimfs.junit.jupiter.JimfsTempDirFactory

The factory will be used for all @TempDir annotations unless the annotation's factory attribute specifies a different type.

Default Jimfs Configuration

The jimfs.junit.jupiter.tempdir.configuration.default configuration parameter sets the default Jimfs configuration to use. It expects one of the following values (case-insensitive):

  • FOR_CURRENT_PLATFORM: appropriate to the current platform (default)
  • OS_X: for a Mac OS X-like file system
  • UNIX: for a UNIX-like file system
  • WINDOWS: for a Windows-like file system

For example, the following defines a Windows-like temporary directory, regardless of the platform on which the test is running:

jimfs.junit.jupiter.tempdir.configuration.default=windows

All Jimfs-based temporary directories will be configured accordingly unless @JimfsTempDir is used with its value attribute set.