Mock objects are a useful way to write unit tests for objects that act as mediators. Instead of calling the real domain objects, the tested object calls a mock domain object that merely asserts that the correct methods were called, with the expected parameters, in the correct order. However, when the tested object must create the domain object, we are faced with a problem. How does the tested object know to create a mock domain object instead of the true domain object? In this article, software consultants Alexander Day Chaffee and William Pietri present a refactoring technique to create mock objects based on the factory method design pattern.
I have read your blog its very attractive and impressive. Nice information. It helped me alot.
ReplyDeletelaw college|law college in Jaipur|Best law college in Jaipur|Law Course In Jaipur|Top College Of law In Jaipur|Vidyasthali Law College|Best Law College|Jaipur Law College