in Education by
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: The tests fails, but if the error is like this one: 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? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
When testing your NH based DAO's you should flush the session so that the database is updated with the new information but still rollback as before. How to do this is explained here - http://forum.springframework.net/showthread.php?t=5246 I've added this to the reference docs. Hope this helps. Cheers, Mark

Related questions

0 votes
    I'm using Spring.net with NHiberante (HibernateTemplate) to implement my DAO's. I also have some ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 16, 2022 in Education by JackTerrance
0 votes
    What type of testing should be taken into consideration according to you when the regression tests are repeated multiple times?...
asked Feb 7, 2021 in Technology by JackTerrance
0 votes
    I have 2 JMS queues and my application subscribes to both of them with Jms.messageDrivenChannelAdapter(...) ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 30, 2022 in Education by JackTerrance
0 votes
    I have followed the link Spring integration: handle http error with oubound gateway But I don't have full ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 3, 2022 in Education by JackTerrance
+1 vote
    Which are the modules of Data Access/ integration layer in Spring? A - JDBC, ORM, OXM, JMS, Transactions B - JDBC, ORM, OXM, JMS C - JDBC, ORM, Web, Beans D - JDBC, ORM, OXM, JMS...
asked Oct 14, 2020 in Technology by JackTerrance
0 votes
    Traditionalist argue that stored procedures provide better security than if you use a Object Relational Mapping (ORM) ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 16, 2022 in Education by JackTerrance
0 votes
    In a ____________ the system scans each file block and tests all records to see whether they satisfy the ... , Database Interview Questions and Answers for Freshers and Experience...
asked Oct 11, 2021 in Education by JackTerrance
0 votes
    When is not a good time to automate the tests? 1. The test is repeatable. 2. The software is changing ... for a human tester. 4. The test involves complicated calculations....
asked Jul 11, 2021 in Education by JackTerrance
0 votes
    Why Should We Automate Smoke Tests?...
asked Oct 17, 2020 in Technology by JackTerrance
0 votes
    When candidates have only the condition of age, why should they give other information to Election Commission? Please answer the above question....
asked Aug 14, 2022 in Education by JackTerrance
0 votes
    I'm a little confused. We downloaded the WSDL file from Salesforce and created a web reference to it using a ... step? Any advice? Select the correct answer from above options...
asked Feb 4, 2022 in Education by JackTerrance
0 votes
    on 7th day of iteration team realize they can not complete their 5 out of 13 stories what product owner should do...
asked Nov 30, 2020 in Technology by Editorial Staff
0 votes
    I'm using NHibernate on a project and I need to do data auditing. I found this article on ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 25, 2022 in Education by JackTerrance
0 votes
    I'm trying to reproduce this SQL statement using NH DetachedCriteria but struggling to get all 3 inner join ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 20, 2022 in Education by JackTerrance
...