Skip to content

Commit

Permalink
Document test instance semantics for TestInstancePostProcessors
Browse files Browse the repository at this point in the history
Issue: #419
  • Loading branch information
sbrannen committed Jul 4, 2017
1 parent 75fb725 commit 2c2b2a8
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,20 @@
* <p>Implementations must provide a no-args constructor.
*
* @since 5.0
* @see #postProcessTestInstance(Object, ExtensionContext)
*/
@API(Experimental)
public interface TestInstancePostProcessor extends Extension {

/**
* Callback for post-processing the supplied test instance.
*
* <p><strong>Note</strong>: the {@code ExtensionContext} supplied to a
* {@code TestInstancePostProcessor} will always return an empty
* {@link java.util.Optional} value from {@link ExtensionContext#getTestInstance()
* getTestInstance()}. A {@code TestInstancePostProcessor} should therefore
* only attempt to process the supplied {@code testInstance}.
*
* @param testInstance the instance to post-process; never {@code null}
* @param context the current extension context; never {@code null}
*/
Expand Down

1 comment on commit 2c2b2a8

@marcphilipp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.