We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4d88eb0 + face168 commit 0ce53ddCopy full SHA for 0ce53dd
inject-test/src/test/java/org/example/coffee/list/ListInject.java
@@ -3,7 +3,10 @@
3
import static org.assertj.core.api.Assertions.assertThat;
4
5
import java.util.List;
6
+import java.util.Optional;
7
8
+import jakarta.inject.Named;
9
+import org.example.optional.Que;
10
import org.junit.jupiter.api.Test;
11
12
import io.avaje.inject.test.InjectTest;
@@ -14,9 +17,11 @@ class ListInject {
14
17
15
18
@Inject List<Somei> testSomei;
16
19
20
+ @Inject @Named("frodo") Optional<Que> frodo;
21
+
22
@Test
23
void test() {
-
24
assertThat(testSomei).isNotEmpty();
25
+ assertThat(frodo).isNotEmpty();
26
}
27
0 commit comments