rmpestano / dbunit-rules

https://github.com/database-rider/database-rider
15 stars 5 forks source link

allow empty datasets #25

Closed rmpestano closed 8 years ago

rmpestano commented 8 years ago

Allow empty dataset name in order to execute other operations like clean, execute scripts. Example:

    @Test
    @UsingDataSet(value = "",cleanBefore = true)
    public void shouldSeedDBWhenUsingEmptyDataSet() {
        List<User> users = (List<User>) em.createQuery("select u from User u").getResultList();
        assertThat(users).isNotNull().hasSize(0);
    }

Will not load any dataset but will perform clean.