I can't use returned value in the next steps. Exaple: I have a method:
public class learn_BDD {
@Test
@When("^ I have \"([^\"]*)\" dolars on acount$")
public String checkAcount(String amount){
String Value = Acount.checkValueOfAcount();
return returnValue;
}
@Test
@Then("^Check how much I spend$")
public void howMuchISpend(String returnValue){
String actualValue = Acount.actualAcountState();
if (actualValue < returnValue) {
System.out.println("You are spend money");
}
}
In this case I give than error:
***BDD is declared with 1 parameters. However, the gherkin step has 0 arguments [].***
If somebody can help me I will be grateful.