Our project want to do interface development first before database design. How can we get benefits from typemock in this situation please?
Hi,
This question really depends on the actual implementation. You can start by defining interfaces and starting to mock them (using any mocking framework). This can work quite well, although somewhere along the line you might want to add a logging system (for example). Now you will have a number of architectural choices.
Example:
1. Use an Interface and pass it to each method-
This will be easy to mock but requires passing an ILog to each class.
2. Use a factory Logger.GetLogger() that returns an ILog and thus we don't need to send ILog
This will be easier to mock (if you have a Logger.SetLogger(mockLogger), but you are now maintaining a complex logging framework, the tests will also look strange as we are setting up something that will take time to understand
3. Use a static log function - Logger.Log()
This will need TypeMock.
So if you don't want the testing framework to impair your architectural judgement, you should choose a framework that supports any architecture.