Slide 16
Slide 16 text
Types of doubles
➔ Spies
◆ Adds instrumentation to a function/object
◆ Actually calls the function but gathers metadata
➔ Stubs
◆ Replaces a function for a fake implementation
◆ Adds instrumentation
◆ Returns a fixed value
➔ Mocks
◆ "Smarter" stubs
◆ Have predefined expectations on interactions
◆ Focused on the interaction, not on behaviour