February 2015
Intermediate to advanced
338 pages
8h 16m
English
We’ve decided this first release of our checkout is going to be a class that takes the price list and the items being bought as arguments to a method. So, our job in the step definition for Given the price of a banana is 40c is just to remember the price of bananas. In the step_definitions folder, edit the CheckoutSteps.java file so that the first step definition looks like this:
| first_taste/05/step_definitions/CheckoutSteps.java | |
| | @Given("^the price of a \"(.*?)\" is (\\d+)c$") |
| | public void thePriceOfAIsC(String name, int price) throws Throwable { |
| | int bananaPrice = price; |
| | } |
Great, that was easy. Now, where were we again? Well, we’ve written some Java code so we’ll need to compile the ...
Read now
Unlock full access