mardi 10 mai 2016

DBUnit + Spock: is it possible to use them together?

I see, that @DatabaseSetup works, but @ExpectedDatabase is designed for usage with JUnit, so result of it is ignored for Spock.
Does somebody know any workaround?

Code example (unuseful at this moment)

class CategoryDAOSpecification extends SpringHsqlSpecification {
    @DatabaseSetup("classpath:data-sets/empty.xml")
    @ExpectedDatabase("classpath:data-sets/setup.xml")
    def "Save"() {
        testTarget.save(parentCategory)
        testTarget.save(childCategory)
    }//...
}

Aucun commentaire:

Enregistrer un commentaire