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

rliesenfeld opened this Issue Sep 27, 2016 · 0 comments


None yet

1 participant


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;

    public void test(@Injectable String foo) {
        // ...
@rliesenfeld rliesenfeld added the bug label Sep 27, 2016
@rliesenfeld rliesenfeld self-assigned this Sep 27, 2016
@rliesenfeld rliesenfeld added a commit that closed this issue Oct 1, 2016
@rliesenfeld rliesenfeld Fixed bug in error message, where the @Injectable name was reported i…
…nstead of the target constructor parameter name; closes #346.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment