March 2018
Intermediate to advanced
324 pages
8h 30m
English
Let's start with the command argument, that only has the f (forwards) character:
public void whenReceiveCommandsFThenForward() {
Location expected = location.copy();
expected.forward();
ship.receiveCommands("f");
assertEquals(ship.getLocation(), expected);
}
This specification is almost the same as the whenMoveForwardThenForward specification except that, this time, we're invoking the ship.receiveCommands("f") method.
Read now
Unlock full access