XpdWiki

FrontPage
RecentChanges
XtC
FindPage
PageIndex
XpApprentices

Set your name in
UserPreferences

Edit this page

Referenced by
XtC26092000
FakeObjectsVsMock...




JSPWiki v2.0.52


TaxonomyOfStubs


During a ExtremeTuesdayClub, special guest AlistairCockburn teased out a nice distinction between Stubs, Shunts and MockObjects. Essentially,

  • Stubs are placeholders in the real code for expected functionality, like "Under Construction" pages on the web. They are supposed to be replaced with real code one day.
  • Shunts (a hardware term) are shortcut implementations that allow you run a subsystem. The usual reason for doing that is probably because you're unit testing. A Shunt is not a test, but may support a test.
  • MockObjects are like Shunts in that they're a dumb-ass substitute for some real code, but they're also instrumented with assertions about the code under test. A MockObject is part of a test. More radically, we have altered our coding style to make MockObjects easy to write (few developers would do that to support Shunts) and have found that the resulting code falls out very nicely.

See also: FakeObjectsVsMockObjects ³host³³date³October 2, 2000³agent³Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt?; UKPORTAL)³TaxonomyOfStubs


Edit this page   More info...   Attach file...
This page last changed on 02-Oct-2000 12:04:49 BST by unknown.