Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert MethodParameterResolver to generic ParameterResolver API
Prior to this commit, the MethodParameterResolver API could only be applied to methods. In addition, the MethodInvocationContext API needlessly stored the method which could be retrieved directly from the supplied Parameter. This commit addresses these issues by converting the MethodParameterResolver into a generic ParameterResolver API that can be used to resolve parameters for both methods and constructors. At the moment, however, there is no first-class support for resolving constructor parameters in the JUnit 5 TestEngine. Specifically, this commit includes the following changes. - Renamed MethodParameterResolver to ParameterResolver - Replaced MethodInvocationContext arguments in ParameterResolver with Optional<Object> for the target of method invocations - Moved MethodInvocationContext to the junit5-engine module for internal use In addition, this commit introduces a proof of concept implementation for constructor injection in the form of a ConstructorInvoker which is tested in ParameterResolverTests.constructorInjectionProofOfConcept(). Closes: #267
- Loading branch information
Showing
29 changed files
with
402 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.