August 2017
Intermediate to advanced
332 pages
9h 16m
English
The next step is to create the Java bindings so that the feature specification would be executable. In order to do this, we create a new file src/test/java/acceptance/StepDefinitions.java:
package acceptance;import cucumber.api.java.en.Given;import cucumber.api.java.en.Then;import cucumber.api.java.en.When;import org.springframework.web.client.RestTemplate;import static org.junit.Assert.assertEquals;/** Steps definitions for calculator.feature */public class StepDefinitions { private String server = System.getProperty("calculator.url"); private RestTemplate restTemplate = new RestTemplate(); private String a; private String b; private String result; @Given("^I have two numbers: (.*) and (.*)$") public void i_have_two_numbers(String ...Read now
Unlock full access