• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Test doubles == mock objects

 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey,
In TDD jargon, does "test doubles" refer to mock objects?
Thanks.
 
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not normally... ( though I have heard a few people use them as synonyms)

Normally, to me, a Test Double is more similar to a Stub. It allows the program to compile and run. It might provide some replacement behavior (a Test Double for an Email Sending class/service might log/store the emails somewhere for review, etc). But its not a Mock Object in the sense of setting expected calls and verifying that these calls were received as part of the test.

However, this article seems to use Test Double as a superset term including Stubs, Mocks, fakes, etc):
http://xunitpatterns.com/Mocks,%20Fakes,%20Stubs%20and%20Dummies.html
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Eric Nielsen:
However, this article seems to use Test Double as a superset term including Stubs, Mocks, fakes, etc):
http://xunitpatterns.com/Mocks,%20Fakes,%20Stubs%20and%20Dummies.html


That (the umbrella term) is the interpretation I've adopted, too.
 
passwords must contain 14 characters, a number, punctuation, a small bird, a bit of cheese and a tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic