Friday, February 20, 2004 [Tweets] [Favorites]


Simon Stewart’s article about mocking generated some good discussion.


I found the first line of that article unintentionally humorous: "Everyone knows what a mock is, just from the name..." Well, no, "mock" is a verb and sometimes an adjective (as in "mock turtleneck sweater") -- to most people the phrase "a mock" makes no sense, since "mock" is not a noun.

And then, a couple paragraphs later, the author goes on to explain what mocks are, since everyone knows what they are just from the name! Heh.

Still, it was a good article once past the initial silliness. I'm not a Java programmer, but I do developer documentation in a Java shop, so I know about XP and unit tests, and this was fairly interesting.

Yeah, I don't think "mock" is really a standard term outside of XP yet. Everyone knows what a "stub" is, but "stub object" doesn't sound very exciting. And for some reason I haven't seen it called "endo-testing" since the original paper.

Perhaps I should have written "everyone that I know is familiar with what a mock is"? Which makes defining what a mock object is later in the article more sensible :)

Glad that someone found it useful.

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment