More Related Content
Similar to Interaction testing using mock objects
Similar to Interaction testing using mock objects (20)
Interaction testing using mock objects
- 13. Assert is perform on mock LogError(string) Test LogAnalyzer MockWebService :IWebService Test
- 15. Save some state for later assertion and verification
- 20. We’ll assert against mock that it was called correctly LogError(string) SendMail() Assert LogAnalyzer EmailService WebService Test
- 23. It is tedious to create manual mocks and stubs. How can we overcome that?
- 28. If you need more mocks? in a test, you are testing more than one thing.
- 34. It's difficult to implement when interface have many properties, methods and events
- 35. A lot of boilerplate code to save data
- 36. Multiple assertions for method with more parameters
- 39. If you see “verify” and “stub” on the same variable in the same test, you most likely are over-specifying your test.