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.
- A. P-stub, Q-fake, R-mock, S-dummy
- B. P-fake, Q-stub, R-dummy, S-mock
- C. P-fake, Q-stub, R-mock, S-dummy
- 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.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- Instead of hand-picking examples, a developer states that for any list xs, sorted(sorted(xs)) == sorted(xs) and len(sorted(xs)) ==…
- A password must be 8-16 characters long and contain at least one digit. Using weak equivalence partitioning, where all valid classes can…
- A web form has exactly two parameters: browser (Chrome, Firefox, Safari) and OS (Windows, macOS, Linux). How many tests does all-pairs…
- A team has run the same 300 regression tests every release for two years. They now find almost no bugs, yet customers report new ones in…
- A product passes every test and has almost no defects, yet users reject it because it does not solve their actual workflow. Which testing…
- Risk scores are likelihood x impact, each rated 1-5. Feature A: 4 and 2. Feature B: 2 and 5. Feature C: 3 and 3. Feature D: 5 and 1. In…