Simon Wacker
Unit Testing: Mock Objects Framework
Write:
Unit testing means testing a class in isolation. To be able to do this any collaborator must at least be replaced by some kind of stub implementation of it. While this is definitely a good thing and appropriate in some cases it is really awkward if you have many collaborators and if these collaborators have a rather large number of methods.Another problem with stubs is that they are not flexible enough to meet every use case, especially the special ones that hardly ever occur (except you spent hours programming the stub) .Thus you need a more general and dynamic approach The solution is:.. Mock Objects.Mock objects also take unit testing a step further you do not just create a stub that acts as if it were real, you also verify that the class under test collaborates with the mock object in the expected way. that means for example that the class under test calls certain methods with certain arguments on the mock object.To work efficiently with mock objects you of course need a framework t Hat Gives Objects and Work with Them Easily. I really said that I just finished my feelings today, Google didn't have a similar tool, is it a do ISYMOCK for Delphi?