Skip to content
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

junit parameter resolver #163

Merged
merged 1 commit into from
Jan 5, 2024
Merged

Conversation

dev-qnz
Copy link
Contributor

@dev-qnz dev-qnz commented Dec 27, 2023

A test with a JUnit resolved TestInfo parameter fails upon just enabling weld-testing with @EnableWeld or @EnableAutoWeld:

    @Test
    void testResolveTestInfo(TestInfo testInfo) {
        Assertions.assertNotNull(testInfo);
    }

==>
org.junit.jupiter.api.extension.ParameterResolutionException: Weld has failed to resolve test parameter [org.junit.jupiter.api.TestInfo arg0]
Unsatisfied dependency has type org.junit.jupiter.api.TestInfo and qualifiers [].

see also https://junit.org/junit5/docs/current/user-guide/#writing-tests-dependency-injection

@dev-qnz dev-qnz marked this pull request as ready for review December 27, 2023 10:58
@manovotn
Copy link
Collaborator

manovotn commented Jan 2, 2024

Hello and thanks for the PR @dev-qnz!
I'll get around to reviewing this by the end of this week but from a quick scan, it looks sensible.

Copy link
Collaborator

@manovotn manovotn left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @dev-qnz. It looks great, I've just added some minor comments.
Once amended, please squash all commits into a single one and I'll merge it.

@manovotn manovotn linked an issue Jan 4, 2024 that may be closed by this pull request
@dev-qnz dev-qnz force-pushed the junit-parameter-resolver branch from 6c2cd18 to eebf43f Compare January 5, 2024 11:17
Copy link
Collaborator

@manovotn manovotn left a comment

Choose a reason for hiding this comment

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

Thank you for the PR!

@manovotn manovotn merged commit 3b7c5a6 into weld:master Jan 5, 2024
2 checks passed
@dev-qnz dev-qnz deleted the junit-parameter-resolver branch January 5, 2024 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Skip parameter resolution for Junit 5 built-in parameters
2 participants