Use a folder of xml files as data source for nhibernate
Posted
by Bart Van Eyndhoven
on Stack Overflow
See other posts from Stack Overflow
or by Bart Van Eyndhoven
Published on 2010-06-02T12:38:15Z
Indexed on
2010/06/02
12:44 UTC
Read the original article
Hit count: 307
I'm going to start writing NUnit tests for a few classes in my project. A certain number of these classes use data gathered through nhibernate from a sql server 2008 database.
The part of the program I'm about to test is very specific (and complicated). Therefore I have made a folder of xml files. Combined, the xml files could result in the database structure. I mean each xml file corresponds to a table in the database. The data in the xml files is also consistent with the database.
Is there a way to use this folder of xml files as data source for nhibernate? I mean: can I use nhibernate to gather my test data (wich I have specifically chosen) instead of data from the database? In this way, I could usefully test this component without corrrupting the (test) database for future tests.
© Stack Overflow or respective owner