rmpestano/dbunit-rules

@DataSet for the whole test class

Closed this issue · 3 comments

Is it possible to set @dataset on the class level, in order all tests in the class to use the same dataset ?

I was thinking of this kind of solution to manage DbUnit tests more efficiently, and found your project that should really have more stars :)

Thanks for your work.

Hi there,

I think its possible,I will have a look at the weekend and try to implement it. Method level will take precedence over class level annotation.

Glad you liked it 👍

Should be fixed, you can test with version 0.6.0-SNAPSHOT by adding central snapshot repository in your pom:

<repositories>
    <repository>
        <snapshots/>
        <id>snapshots</id>
        <name>libs-snapshot</name>
        <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </repository>
</repositories>

there is test verifying this behaviour here:
https://github.com/rmpestano/dbunit-rules/blob/master/core/src/test/java/com/github/dbunit/rules/DBUnitClassLevelAnnotationIt.java

👍 Thanks for you work ! I'll try this and #14 ASAP (tomorrow I think).