Hello there,

I have a question about the usual way of testing with tapestry. I am using
Tapestry 5.3.1 and TestNG. My latest tests are currently working, but it
took me quite a long time to be at this point and still I think there will
be a more intuitive and easier way to setup testing. This is my first
contact with an IoC-Container so maybe its a very basic question:

What I want to test: DAOs configured as tapestry-services using hibernate.
My question: how can these services be tested easily?
My Problem: The implementation of the DAO is using a hibernate Session to
accomplish all tasks. During testing it might be nice to have access to this
session.
So is it possible to inject the same session in the test? Or inject a know
session into the doa? Or is there no other way to let the session "leak" out
of its service (for testing purpose )?

The reason, why I want to have that session is:
I had a Problem during my current setup using pagetester because of the
session cache of hibernate, so my store and load methods did not always
really operate on the database, so potential errors where not catched.

I looking forward to hear your suggestions and opinions,
with kind regards
Stefan

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Basic-DAO-Service-Test-Setup-tp5472574p5472574.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to