File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 2525 * <p>Implementations must provide a no-args constructor.
2626 *
2727 * @since 5.0
28+ * @see #postProcessTestInstance(Object, ExtensionContext)
2829 */
2930@ API (Experimental )
3031public interface TestInstancePostProcessor extends Extension {
3132
3233 /**
3334 * Callback for post-processing the supplied test instance.
3435 *
36+ * <p><strong>Note</strong>: the {@code ExtensionContext} supplied to a
37+ * {@code TestInstancePostProcessor} will always return an empty
38+ * {@link java.util.Optional} value from {@link ExtensionContext#getTestInstance()
39+ * getTestInstance()}. A {@code TestInstancePostProcessor} should therefore
40+ * only attempt to process the supplied {@code testInstance}.
41+ *
3542 * @param testInstance the instance to post-process; never {@code null}
3643 * @param context the current extension context; never {@code null}
3744 */
You can’t perform that action at this time.
0 commit comments