JBehave

Add ParameterConverter for ExamplesTable

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 2.4
  • Component/s: Core
  • Labels:
    None
  • Number of attachments :
    0

Description

To facilitate parsing of table parameters with tabular structure, it's useful to have a parameter converter that takes multi-line input and converts it to a ExamplesTable. This then allows users to match step such as:

Given the traders:

name rank
Larry Stooge 3
Moe Stooge 1
Curly Stooge 2

using a method with ExamplesTable parameter:

@Given("the traders: %tradersTable")
public void theTraders(ExamplesTable tradersTable) {
// use traders table to extract required data
}

Activity

Hide
Mauro Talevi added a comment -

Updated wildcard_search.scenario to use ExamplesTable parameters.

Added table-parameters.html page to documentation.

Show
Mauro Talevi added a comment - Updated wildcard_search.scenario to use ExamplesTable parameters. Added table-parameters.html page to documentation.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: