Re: JUnit - Testcase for a class operating on data from db.
Wednesday, July 9, 2003 12:51 AM
Yes - decouple the formatting from acces to the database. Write your formatting class in a way that it doesn't care about where the data is coming from. This way you not only get a more testable class, but also a more reusable one.