arquillian / arquillian-extension-persistence

Arquillian Database / Persistence Extension
Apache License 2.0
75 stars 68 forks source link

Possibility to replace any placeholder in a dataset with custom code #18

Open ruettimac opened 11 years ago

ruettimac commented 11 years ago

According to the DBUnit-FAQ, it is possible to replace any placeholder ini a datafile (XML, JSON) with a value produced by custom code:

http://www.dbunit.org/faq.html#systemTimeInTest

I have used this possibility to work with non static data like dates or surrogate keys in the tests. It would be great to have this kind of functionality in the persistence extension. If it is not to hard to integrate or if I get the pointer how and where to do it, I like to help or implement this feature.

Regards,

Cyrill

bartoszmajsak commented 11 years ago

Hi Cyrill,

Thanks for your interest in making APE better! Actually this idea is on the roadmap for a while. Not really replacable data sets per se, but rather scriptable data sets (using any language from jsr 223 - but we can start with groovy). There is some simple implementation handling [null] placeholders already in place, which you can use as a starting point. Just fork the repo and start hacking around :) If you will have any questions either ask here, on the forums or reach me directly. I would be more than happy to help.

Welcome in the community!

Cheers, Bartosz