unit-testingcdiquarkus

Arc for Unit Tests


Is there a way to have a ArC CDI-Container in Unit-Tests without using the full force of @QuarkusTest, analogous to weld-junit for weld? I'd rather not start up my whole application for a unit-test, but sometimes I need a CDI container, say if I want to test Interceptors and Decorators. Given that ArC is (intentionally) not fully compatible to the CDI spec, I'd rather test against the CDI container that will also be used in production than against weld.


Solution

  • For future reference: Since 2023 there is @QuarkusComponentTest which does what I needed back then.