200-901 · Question #202
In test-driven development, what are two of the green bar patterns? (Choose two.)
The correct answer is C. triangulate E. fake it. In TDD, 'green bar patterns' are strategies used to make a failing (red) test pass quickly. 'Fake It' (E) means returning a hardcoded value to make the test green immediately, then refactoring. 'Triangulate' (C) means writing multiple tests that together force the…
Question
In test-driven development, what are two of the green bar patterns? (Choose two.)
Options
- Aanother test
- Bbreak
- Ctriangulate
- Dstarter test
- Efake it
How the community answered
(34 responses)- A6% (2)
- B3% (1)
- C88% (30)
- D3% (1)
Explanation
In TDD, 'green bar patterns' are strategies used to make a failing (red) test pass quickly. 'Fake It' (E) means returning a hardcoded value to make the test green immediately, then refactoring. 'Triangulate' (C) means writing multiple tests that together force the implementation to become general rather than hardcoded. These are two of the three classic green bar patterns (the third being 'Obvious Implementation'). Option A (another test) and D (starter test) are separate TDD concepts for initiating test suites, not green bar patterns. Option B (break) is not a recognized TDD pattern.
Topics
Community Discussion
No community discussion yet for this question.