4 Replies Latest reply on Jun 20, 2014 8:52 AM by Daniel Latzer

    Handling relative dates with arquillian-persistence-extension

    Daniel Latzer Newbie



      I realize this issue is not strictly Arquillian-related, but having APE masking DBUnit made me post my problem here.


      A little back-story is perhaps needed. We've just began using Arquillian and before that, we've been using DBUnit to populate our Oracle database with test data. We require two kinds of dynamic data in our xml datasets: One being dates relative to the current date and the others being Sequence values pulled directly from the database. Sadly, the existing ReplacementDataSet wasn't flexible enough for my needs. So to accomplish this I've created a custom DBUnit Table implementation whose getValue-method checked for placeholders and returned the respective replacement data instead. This worked well, since I could provide DBUnit with my own implementation of the Table.


      Using APE this isn't so easy anymore because I can't just swap out the Table implementation from outside. I've tried hacking this functionality myself into APE, but that's more complicated than I'd hoped.

      Now here is my question: Are there any better ways for providing dynamic data for APE? If not, could you give me some pointers on how to implement such a feature properly into APE?


      Thanks for your time.