|
From: Jason S. <jsw...@ya...> - 2003-10-29 12:59:13
|
This project that I am working on is a DataCache. I wanted to be able to implement it either using the file system or using a database, so I decided to make a DAO to support either of these options, and have a DataCache class that decides which of the DAOs to use. When constructing a test for this kind of a system, I assume it is fine to write unit test cases for each of the DAOs, however when it comes to the DataCache class itself, is it better to test the DAOs first, then the DataCache as written, or is it better to mock the DAOs and test the outer class by itself? Any guidlines or rules of thumb that you use in these cases? Thanks. Jason __________________________________ Do you Yahoo!? Exclusive Video Premiere - Britney Spears http://launch.yahoo.com/promos/britneyspears/ |