• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

DbUnit Includes / XML Entities

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm in need to creating a number of creating a number of unit tests and so wanted to have a standard directory with inidividual files that I could include by defining an entity reference.

However it appears that dbunit is wanting to use the startup directory instead of the directory in which the root dbunit.xml file is located.

Eg:


Has anyone tried / accomplished this before? If so, how was the directory location handled ?

Thanks,
 
Craig Taylor
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I ended up finding two possible solutions to this issue:

o Use of a CompositeDataset where I enumerated all dependencies for my unit test in the constructor
o or (untested) getting Ant to run a xslt transformation for me to generate the full xml.

I ended up going with CompositeDataset although looking back on it now I think the XSLT might be a bit more flexible...
 
reply
    Bookmark Topic Watch Topic
  • New Topic