I’m getting an exception in my test code, depending on at what point in my code I call:

 

DomDaoManagerBuilder builder = new DomDaoManagerBuilder();

builder.Configure("dao.config");

 

If I put this code directly in my test method (i.e. TestGetCustomer), prior to using the DAO, then all is well.  Unfortunately, if I factor out that code (for simplicity, with only 1 test fixture, this could be put in the class’ constrictor or [TestFixtureSetup] method), then I get the following exception:

 

Persistence.Test.CustomerSqlMapDaoTest.GetCustomer :

- The error occurred while configure DaoSessionHandler.

- The error occurred in <property name="resource" value="sqlMap.config" xmlns="http://ibatis.apache.org/dataAccess" />. 

- Check the IBatisNet.DataAccess.DaoSessionHandlers.SqlMapDaoSessionHandler.

 

If I ignore the session handler configuration in my dao.config, then I get a similar “simple” DaoSessionHandler exception.

 

Strangely, although, with the code in the test fixture class’ constrictor or [TestFixtureSetup], the code fails in isolation, the code runs perfectly if it is run as part of a test suite and it is NOT the first test case in the suite.

 

I’m developing in whidby (VS 2005) beta 2, and using the SVN code from last Monday.

 

Peter

 

 

Reply via email to