
Originally Posted by
Fatefree
One thing I am still struggling with is the testing. For example, I keep the application context in the business project because I often need a Spring context to test a unit a code. For example, a Hibernate call using Criteria objects is something I most certainly need to test as a unit, but I can't do so without the dao which extends the hibernate template which needs a session factory and ultimately needs to pull in a lot from a spring configuration to run.
It seems that a unit test turns into an integration test.
And theres a side benefit of knowing my application context is wired up and running correctly since the web app is just referring to the one I am testing. However I can see the point that the client should be the one configuring, since it is indeed the application's responsibility.
So I'm still at a loss of the correct approach, because while I would love to have my small application modules isolated, testable, i'm not sure how to go about doing it.