#Run Unit Tests with CDI

1 messages · Page 1 of 1 (latest)

jagged field
#

I'm working on converting my project into a more agnostic DI framework library and now I am at the point where it compiles, however, I can't get my tests to pick up dependency injection. I was using Spring before so I need some help wiring it together. For example:


@ExtendWith(CdiTestJunitExtension.class)
class AdditionTransformerTest {
    @Inject
    @Named("TestObjectMapper")
    private ObjectMapper objectMapper;

This is my test class. Where do I need to define the Named bean? How does that get injected into this test?

snow mantleBOT
#

<@&987246452180930620> please have a look, thanks.