All challenges
Multiple ChoiceBeginner 45s

Stub vs mock vs fake

Which description is correct?
Options
  1. 1A mock returns canned values; a stub asserts that particular calls were made by the code under test
  2. 2A fake verifies interactions; a stub is a real database used in place of the production instance
  3. 3All three terms are synonyms that refer to the same kind of test double used interchangeably
  4. 4A stub returns canned values; a mock verifies interactions; a fake is a lightweight working implementation

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle