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

Make it possible to mock @Resource injection point easily #18

Closed
mkouba opened this issue Dec 15, 2017 · 0 comments · Fixed by #21
Closed

Make it possible to mock @Resource injection point easily #18

mkouba opened this issue Dec 15, 2017 · 0 comments · Fixed by #21
Milestone

Comments

@mkouba
Copy link
Member

mkouba commented Dec 15, 2017

A CDI bean in test might declare non-CDI injection points, e.g.:

class Foo {
    @Resource(lookup = "bar")
    String bar;
    
    void ping() {
      // use bar..
    }
}

It should be possible to mock those injection points easily. Right now, the only way is to implement injection services SPI (see also http://docs.jboss.org/weld/reference/latest/en-US/html/ri-spi.html#_ee_resource_injection_and_resolution_services).

@mkouba mkouba added this to the 1.2.0 milestone Dec 15, 2017
mkouba added a commit to mkouba/weld-junit that referenced this issue Dec 16, 2017
mkouba added a commit to mkouba/weld-junit that referenced this issue Dec 16, 2017
mkouba added a commit to mkouba/weld-junit that referenced this issue Dec 16, 2017
mkouba added a commit to mkouba/weld-junit that referenced this issue Dec 18, 2017
mkouba added a commit that referenced this issue Dec 18, 2017
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 a pull request may close this issue.

1 participant