Details
-
Type: Bug
-
Status: Open
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
fixture code:
@Then("keyword <variable1> keyword <table1>") @Alias("keyword $variable1 keyword $table1") public void checkSomething(String variable1, ExamplesTable table1) throws SQLException {
usage:
And keywords variable1 is in
field | value |
IS_VALID | Y |
IS_VALID | N |
I'ld suggest this fix:
StepCreator.java:
private String replaceParameterValue(String stepText, Type type, String value) {
{ stepText = stepText.replace(value, PARAMETER_TABLE_START + value + PARAMETER_TABLE_END); }if (value != null) {
if (this.isTable(type))
else {
{ stepText = stepText.replace(value, PARAMETER_VALUE_START + value + PARAMETER_VALUE_END); }// only mark non-empty string as parameter (
JBEHAVE-656)if (value.trim().length() != 0)
//THIS LINE, Change replace() by replaceFirst()
stepText = stepText.replaceFirst("\n", PARAMETER_VALUE_NEWLINE);
}
}
return stepText;
}