-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove testInstance parameter from TestInstancePostProcessor #910
Comments
sbrannen
added a commit
that referenced
this issue
Jul 2, 2017
WARNING: This branch is a work in progress with failing tests. Issue: #910
marcphilipp
added a commit
that referenced
this issue
Jul 3, 2017
Prior to this commit, TIPPs were always called with the ClassExtensionContext. However, that only contained a test instance when Lifecycle.PER_CLASS was in use. Now, the ExtensionContext the instance is created for, e.g. the ExtensionContext of a test method with the default lifecycle, is used. Issue: #910
sbrannen
pushed a commit
that referenced
this issue
Jul 3, 2017
Prior to this commit, TIPPs were always called with the ClassExtensionContext. However, that only contained a test instance when Lifecycle.PER_CLASS was in use. Now, the ExtensionContext the instance is created for, e.g. the ExtensionContext of a test method with the default lifecycle, is used. Issue: #910
sbrannen
added a commit
that referenced
this issue
Jul 3, 2017
sbrannen
added a commit
that referenced
this issue
Jul 3, 2017
sbrannen
pushed a commit
that referenced
this issue
Jul 3, 2017
Prior to this commit, TIPPs were always called with the ClassExtensionContext. However, that only contained a test instance when Lifecycle.PER_CLASS was in use. Now, the ExtensionContext the instance is created for, e.g. the ExtensionContext of a test method with the default lifecycle, is used. Issue: #910
FYI: the current work on this issue is being performed in the following branch. https://github.com/junit-team/junit5/tree/issues/910-remove-test-instance-from-TIPP |
sbrannen
added a commit
that referenced
this issue
Jul 3, 2017
sbrannen
added a commit
that referenced
this issue
Jul 3, 2017
sbrannen
pushed a commit
that referenced
this issue
Jul 3, 2017
Prior to this commit, TIPPs were always called with the ClassExtensionContext. However, that only contained a test instance when Lifecycle.PER_CLASS was in use. Now, the ExtensionContext the instance is created for, e.g. the ExtensionContext of a test method with the default lifecycle, is used. Issue: #910
sbrannen
added a commit
that referenced
this issue
Jul 3, 2017
Prior to this set of commits, the test instance was made available to the postProcessTestInstance() method of a TestInstancePostProcessor via two mechanisms: directly via the `Object testInstance` parameter and indirectly via the `getTestInstance()` method in the supplied ExtensionContext parameter. Furthermore, the ExtensionContext supplied to a TestInstancePostProcessor did not always represent the correct level in the execution hierarchy and therefore did not always provide access to the test instance. This set of commits addresses these issues in the following ways. - The superfluous testInstance parameter has been removed from the postProcessTestInstance() method in favor of accessing the test instance via the ExtensionContext. - The correct, "current" ExtensionContext is now provided to TestInstancePostProcessor extensions thereby providing consistent access to the test instance. Issue: #910
Merged into |
sbrannen
added a commit
to sbrannen/junit5
that referenced
this issue
Jul 3, 2017
1 task
sbrannen
added a commit
that referenced
this issue
Jul 4, 2017
FYI: the work associated with this issue has been reverted in |
marcphilipp
added a commit
that referenced
this issue
Jul 4, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Overview
Due to recent refactorings that made the test instance available in the
ExtensionContext
, aTestInstancePostProcessor
now has two ways to access the test instance object in thepostProcessTestInstance()
method, thereby making theObject testInstance
parameter superfluous.Related Issues
Deliverables
Object testInstance
parameter fromTestInstancePostProcessor.postProcessTestInstance(Object, ExtensionContext)
.The text was updated successfully, but these errors were encountered: