Is there a way to unit-test classes wich require database connections? e.g. User-Classes
(DB-)Object mocking didn't quite help
Is there a way to unit-test classes wich require database connections? e.g. User-Classes
(DB-)Object mocking didn't quite help
Depending on what they do, I suppose you could create a test db and then pass them a test connection string, or perhaps a pre opened connection with appropriately prepared data.
It's generally a good idea to isolate external dependencies, such as databases, from your code, because it makes it easier to test that code. There are some concrete suggestions for dealing with such problems at xunitpatterns.com