Skip to content

CDI module should use @DataSet annotation #48

Closed
@rmpestano

Description

@rmpestano

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions