junit-pioneer
junit-pioneer copied to clipboard
Resources extension: `TemporaryDirectory`: Create a `@SharedTempDir` shorthand
At time of writing, we have a @Dir
annotation (might be renamed to @TempDir
soon) that allows temporary directories to be created in tests with minimal code.
We should consider having an equivalent for "shared" temporary directories. It should probably be named @SharedTempDir
, but this is open to discussion.
Like #648, this would require a change in how ResourceExtension
works, to allow annotations with an arguments
field and which are indirectly/meta-annotated with @Shared(factory = TemporaryDirectory.class)
to have their arguments read by the extension.
This issue is a follow-up to https://github.com/junit-pioneer/junit-pioneer/issues/348 | https://github.com/junit-pioneer/junit-pioneer/pull/491.