@Then("^verify code:") public void verifyCodeBlockTrue(String code) throws ScriptException { assertThat(eval(variables.interpret(code)), is(true)); }
@Then("^verify code: (.*)") public void verifyCodeInLineTrue(String code) throws ScriptException { assertThat(eval(variables.interpret(code)), is(true)); }
@Then("^verify code:") public void verifyCodeBlockTrue(String code) throws ScriptException { assertThat(eval(variables.interpret(code)), is(true)); }
@Then("^verify code: (.*)") public void verifyCodeInLineTrue(String code) throws ScriptException { assertThat(eval(variables.interpret(code)), is(true)); }
@Then("^verify: \\$\\{([^\"]*)}!=code: (.*)$") public void verifyVariableNotEqualsCodeInLine(String path, String code) throws IOException, ScriptException { assertThat(variables.get(path), not(eval(variables.interpret(code)))); }
@Then("^verify: \\$\\{([^\"]*)}=code:$") public void verifyVariableEqualsCodeBlock(String path, String code) throws IOException, ScriptException { assertThat(variables.get(path), is(eval(variables.interpret(code)))); }
@Then("^verify: \\$\\{([^\"]*)}!=code:$") public void verifyVariableNotEqualsCodeBlock(String path, String code) throws IOException, ScriptException { assertThat(variables.get(path), not(eval(variables.interpret(code)))); }
@Then("^verify: '([^\"]*)'=code: (.*)$") public void verifyEqualsCodeInLine(String path, String code) throws IOException, ScriptException { assertThat(actual.json(path), is(eval(variables.interpret(code)))); }
@Given("^var: ([^\"' ]*)=code: ([^\"]*)$") public void defineVariableFromCodeInLine(String key, String code) throws ScriptException { variables.assign(key, eval(variables.interpret(code))); }
@Then("^verify: \\$\\{([^\"]*)}=code:$") public void verifyVariableEqualsCodeBlock(String path, String code) throws IOException, ScriptException { assertThat(variables.get(path), is(eval(variables.interpret(code)))); }
@Given("^var: ([^\"' ]*)=code:$") public void defineVariableFromCodeBlock(String key, String code) throws ScriptException { variables.assign(key, eval(variables.interpret(code))); }
@Then("^verify: \\$\\{([^\"]*)}=code: (.*)$") public void verifyVariableEqualsCodeInLine(String path, String code) throws IOException, ScriptException { assertThat(variables.get(path), is(eval(variables.interpret(code)))); }
@Given("^var: ([^\"' ]*)=code: ([^\"]*)$") public void defineVariableFromCodeInLine(String key, String code) throws ScriptException { variables.assign(key, eval(variables.interpret(code))); }
@Then("^verify: '([^\"]*)'!=code: (.*)$") public void verifyNotEqualsCodeInLine(String path, String code) throws IOException, ScriptException { assertThat(actual.json(path), not(eval(variables.interpret(code)))); }
@Then("^verify: '([^\"]*)'=code:$") public void verifyEqualsCodeBlock(String path, String code) throws IOException, ScriptException { assertThat(actual.json(path), is(eval(variables.interpret(code)))); }
@Then("^verify: '([^\"]*)'=code:$") public void verifyEqualsCodeBlock(String path, String code) throws IOException, ScriptException { assertThat(actual.json(path), is(eval(variables.interpret(code)))); }
@Then("^verify: '([^\"]*)'!=code:$") public void verifyNotEqualsCodeBlock(String path, String code) throws IOException, ScriptException { assertThat(actual.json(path), not(eval(variables.interpret(code)))); }
@Then("^verify: \\$\\{([^\"]*)}=code: (.*)$") public void verifyVariableEqualsCodeInLine(String path, String code) throws IOException, ScriptException { assertThat(variables.get(path), is(eval(variables.interpret(code)))); }
@Then("^verify: \\$\\{([^\"]*)}!=code:$") public void verifyVariableNotEqualsCodeBlock(String path, String code) throws IOException, ScriptException { assertThat(variables.get(path), not(eval(variables.interpret(code)))); }
@Then("^verify: '([^\"]*)'!=code: (.*)$") public void verifyNotEqualsCodeInLine(String path, String code) throws IOException, ScriptException { assertThat(actual.json(path), not(eval(variables.interpret(code)))); }