Fixing the Bug

Sometimes the signals you’ll get from the code that something is wrong are pretty faint. We always try to keep a to-do list handy and write down everything that concerns us as we go. That way, we can stay focused on the task at hand but know that we’ll get a chance to check over and clean up any inconsistencies before we move on to the next task.

As we were finishing off the last scenario, we noticed that Teller.withdraw_from() takes two arguments, but only one of them was used in the method to make the scenario pass. This inconsistency means that something is wrong, but we need to investigate further to know what we need to do about it. Let’s take a look at the code that uses the method:

support_code/01/src/test/java/nicebank/TellerSteps.java ...

Get The Cucumber for Java Book now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.