Closed
Description
Currently CDI module has it's own annotation @UsingDataSet which is a copy of @dataset but with @InterceptorBinding to activate DBUnitInterceptor.
Remove @UsingDataSet in favor of @dataset annotation.
DBUnitInterceptor should be activated by @DBUnitInterceptor annotation, ex:
@RunWith(CdiTestRunner.class)
@DBUnitInterceptor
public class CrudCDIIt {
@Inject
EntityManager em;
@Test
@DataSet("users.yml")
public void shouldListUsers() {
List<User> users = em.createQuery("select u from User u").getResultList();
assertThat(users).isNotNull().isNotEmpty().hasSize(2);
}
}
Metadata
Metadata
Assignees
Labels
No labels