dadrus / jpa-unit

JUnit extension to test javax.persistence entities
Apache License 2.0
29 stars 9 forks source link

@ExpectedDataSets should cope with data subsets #7

Open dadrus opened 7 years ago

dadrus commented 7 years ago

As of today the implementation of @ExpectedDataSets fully relies on the comparison implementation provided by DbUnit. DbUnit however imposes a restriction: adding a new row to a table which is referenced by the expected data set but not included in it, will lead to a comparison error. The aforementioned behavior contradicts the database bootstrapping approach. Here one would usually not only want to create the database schema, but also some initial data, which might be extended/modified by the implemented test methods. For this a further cleanup strategy might be required.