CS FundamentalsHardProduct-company placement

Match each test double. P: an in-memory database used instead of PostgreSQL. Q: an object that returns a canned exchange rate of 83.0 whatever is asked. R: an object that fails the test unless send() is called exactly once with given arguments. S: a placeholder passed only to fill a parameter list, never used.

  1. A. P-stub, Q-fake, R-mock, S-dummy
  2. B. P-fake, Q-stub, R-dummy, S-mock
  3. C. P-fake, Q-stub, R-mock, S-dummy
  4. D. P-mock, Q-stub, R-fake, S-dummy

Correct answer: C. P-fake, Q-stub, R-mock, S-dummy

A fake has a working but simplified implementation; a stub returns preset answers; a mock carries expectations about interactions and verifies them; a dummy is never used.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic