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

Error message with incorrect parameter name for constructor in @Tested class #346

Closed
rliesenfeld opened this Issue Sep 27, 2016 · 0 comments

Comments

1 participant
@rliesenfeld
Member

rliesenfeld commented Sep 27, 2016

The test below fails with a message like:

IllegalArgumentException: No injectable value available for parameter "foo" in constructor Bar#Bar(String value)

where the @Injectable name "foo" was erroneously used for parameter "value".

    static class Bar {
        String value;
        Bar(String value) { this.value = value; }
    }

    @Tested Bar bar;

    @Test
    public void test(@Injectable String foo) {
        // ...
    }

@rliesenfeld rliesenfeld added the bug label Sep 27, 2016

@rliesenfeld rliesenfeld self-assigned this Sep 27, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment