I'm using Spring.net with NHiberante (HibernateTemplate) to implement my DAO's.
I also have some integration tests, that extend from 'AbstractTransactionalDbProviderSpringContextTests '.
DI is working fine, and all test pass BUT sometimes they pass even when they shouldn't.
For example if my hbm.xml files have an error like this:
<class name="Confluence.Domain.User" table="THIS TABLE DOES NOT EXIST">
The tests fails, but if the error is like this one:
<many-to-many
class="Confluence.Domain.User"
column="THIS COLUMN DOES NOT EXIST"/>
the tests pass silently hiding the bug.
I'm testing it using SetComplete() and checking the DB for the changes, but I think the whole idea of this kind of tests is not to do so.
Can anyone tell me how to fix this issue?
Thank you very much!
@Ben: If I have to actually execute the SQL scripts to see if they work, what is the benefit of using this kind of Spring tests?