I've got a lot of complex logic in some of my SQLObject methods, and I'd like to verify that they work in unit tests, and I don't want to have any kind of database connection, not even a SQLite in-memory database.
For example, I've got a parent-child relationship inside of one table, where rows have an optional "parent row" field. I want to set the status on the parent row based on the status of all the different children. For example: When all the children have a status AAA, I'll set the parent status to AAA. When all the children have a status BBB, I'll set the parent status to BBB. When the children have different status, I'll set the parent status to 'Mixed'. Of course, this is a simplification of something much uglier. I want to make sure I execute the correct logic by feeding in lots of possible scenarios through my function. The test will run much faster if I can fake the connection to a database. Is this possible? Any advice on mocking or stubbing a database connection is welcome. Matt ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss