Triangulating Word Selection in Wordz Using Mock Setup
Continue game creation by triangulating word selection implementation in the Wordz application.
We'll cover the following
There’s more work to do in our test because we need to remove the hardcoded creation of the Game
object. In this lesson, we’ll address that by triangulating the word selection logic. We design the next test to drive out the correct behavior of selecting a word at random.
Triangulating word selection
The next task is to remove the cheating that we used to make the previous test pass. We hardcoded some data when we created a Game
object. We need to replace that with the correct code. This code must select a word at random from our repository of known five-letter words.
We add a new test to drive out the behavior of selecting a random word:
Get hands-on with 1400+ tech skills courses.