How to create JUnit 4 tests with Weld

How to create JUnit 4 tests with Weld published on No Comments on How to create JUnit 4 tests with Weld

Problem You want to write a couple of Integration tests with JUnit and want to use Weld for the CDI part, but don’t know how… Solution Add Weld dependency to your maven project Weld dependency

Create a couple of helper classes: WeldContext

WeldJUnit4Runner

Initialize bean context for test by creating in the… Continue reading How to create JUnit 4 tests with Weld