-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
auto-detect inject method parameter types
- Loading branch information
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
junit5/src/test/java/org/jboss/weld/junit5/auto/InjectMethodParamTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package org.jboss.weld.junit5.auto; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertNotNull; | ||
|
||
import jakarta.enterprise.context.Dependent; | ||
import jakarta.inject.Inject; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
@EnableAutoWeld | ||
class InjectMethodParamTest { | ||
|
||
@Dependent | ||
static class Foo { | ||
} | ||
|
||
private Foo foo; | ||
|
||
@Inject | ||
private void setFoo(Foo foo) { | ||
this.foo = foo; | ||
} | ||
|
||
@Test | ||
void testInjectMethodParametersAreAddedToContainerWithNoConfiguration() { | ||
assertNotNull(foo); | ||
} | ||
|
||
} |