-
-
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
Provide access to source element annotations for TempDirFactory
#3394
Provide access to source element annotations for TempDirFactory
#3394
Conversation
0eff9fd
to
afccc61
Compare
@marschall could you please point me to some real-life usage so that I can put together the corresponding tests?
|
How about a custom |
36290a2
to
759fa79
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! Please add tests accessing getAnnotatedElement
for a field and parameter as discussed above.
junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/AnnotatedElementContext.java
Show resolved
Hide resolved
junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/AnnotatedElementContext.java
Outdated
Show resolved
Hide resolved
junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/AnnotatedElementContext.java
Outdated
Show resolved
Hide resolved
junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/AnnotatedElementContext.java
Outdated
Show resolved
Hide resolved
junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/ParameterContext.java
Outdated
Show resolved
Hide resolved
junit-jupiter-api/src/main/java/org/junit/jupiter/api/io/TempDirFactory.java
Outdated
Show resolved
Hide resolved
junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/AnnotatedElementContext.java
Outdated
Show resolved
Hide resolved
759fa79
to
6508ae7
Compare
junit-jupiter-engine/src/main/java/org/junit/jupiter/engine/extension/TempDirectory.java
Outdated
Show resolved
Hide resolved
junit-jupiter-api/src/main/java/org/junit/jupiter/api/io/TempDirFactory.java
Outdated
Show resolved
Hide resolved
junit-jupiter-api/src/main/java/org/junit/jupiter/api/extension/AnnotatedElementContext.java
Outdated
Show resolved
Hide resolved
...ngine/src/test/java/org/junit/jupiter/engine/extension/TempDirectoryPerDeclarationTests.java
Outdated
Show resolved
Hide resolved
...ngine/src/test/java/org/junit/jupiter/engine/extension/TempDirectoryPerDeclarationTests.java
Outdated
Show resolved
Hide resolved
...ngine/src/test/java/org/junit/jupiter/engine/extension/TempDirectoryPerDeclarationTests.java
Outdated
Show resolved
Hide resolved
...ngine/src/test/java/org/junit/jupiter/engine/extension/TempDirectoryPerDeclarationTests.java
Outdated
Show resolved
Hide resolved
...ngine/src/test/java/org/junit/jupiter/engine/extension/TempDirectoryPerDeclarationTests.java
Outdated
Show resolved
Hide resolved
I assume this change doesn't require an entry in the release notes, right? |
59278b0
to
b878c90
Compare
...ngine/src/test/java/org/junit/jupiter/engine/extension/TempDirectoryPerDeclarationTests.java
Outdated
Show resolved
Hide resolved
Sure, here's the implementation of the factory, built against this PR Here's the meta-annotation Here's the integration test A test may look something like this. This code is quite rushed and can obviously be improved. First would probably be the names. A extension of the existing test rather than copy and pasting would probably be next. Feel free to cherry pick and improve upon it. |
If we're going directly to GA, we don't need an extra entry. I'm considering doing an RC2 release. If I decide to go for that, I'll add a release note entry myself. |
Thanks, I've improved the existing test along these lines in ea6d11d. |
All feedback applied, @marcphilipp and @sbrannen. I don't expect further changes unless you see something. Some jobs are failing but it seems to be a remote issue:
Lastly, I left unchecked the release notes task based on #3394 (comment). |
@scordio Thanks tons for the quick turnaround on this! 👍 |
Overview
Closes #3390.
I hereby agree to the terms of the JUnit Contributor License Agreement.
Definition of Done
@API
annotations