Hi David,
Thanks for your answer.
Originally posted by davidklitzke
Why do you want to avoid "hitting the database"? |
Going to the db will take some times and require to manage a test set in the database. In many case I just want to make a small unit test.
Originally posted by davidklitzke
You should start your most of your unit tests by creating a new instance of a PersistenceManager, in which case there will be nothing in the cache. |
I was afraid that it would grow to a point where my test take for long time. I have a so low test coverage (:oops:) that it is actually not a problem right now but I am up to almost 10s for the part the unit test (not file, db test). I hope that it won't grow linear.
Originally posted by davidklitzke
In any case, you shouldn't have any dependencies going from one test to another. |
I totally agree with that, wich means that many test will need to do som setup/teardown to the base also when testing "pure logic".
I'll follow your advice of using a new PersistManager and see how it goes. If it make testing easier and doesn't consume too much time, that will be good enough for me.
Edited by Dominique - 07-Dec-2007 at 1:24pm