Aktuelle Änderungen Printable View Änderungen Bearbeiten
MarkUp > MartinFowler > Maven > McCarthy > Memex > MemoryLeaks > MercurialHosting > Merging > MetaOCaml > OCaml > MichaelFeathers > MicroFormats > MicrosoftSQLServer > MindHacks > MixIns > MixIn > MockObjectsClear TrailA mock object is a "double agent" used to test the behaviour of other objects. First, a mock object acts as a faux implementation of an interface or class that mimics the external behaviour of a true implementation. Second, a mock object observes how other objects interact with its methods and compares actual behaviour with preset expectations. When a discrepancy occurs, a mock object can interrupt the test and report the anomaly. If the discrepancy cannot be noted during the test, a verification method called by the tester ensures that all expectations have been met or failures reported. [1]