Marks a column by where it sits and how its header ends
All 3 scenarios hold
A published table carries more than its text. The reporter marks which column names the scenario, and which column holds the expectation. It also records how each row fared when it ran.
A mark needs somewhere to live, and the three formats put one in different places. HTML sets a class on the cell. AsciiDoc puts a role prefix on the value. Markdown has nowhere at all. The rules below therefore print the cell each format published, and never name the mark. A reader can then see the difference.
Each rule names the sample test class it reads. Its rows are the columns, or the rows, of that class's table.
A table can hold more columns than the test method has parameters. Its first column then holds the scenario name. The reporter marks that column as the scenario, and never passes it to the test.
A column whose header ends in a question mark holds what the row expected. Every other column is an input, and carries no mark.
These rows read LeapYearSample: Scenario | Year | Leap?, over a method taking year and leap.
| Scenario | Column | In markdown? | In AsciiDoc? | In HTML? |
|---|---|---|---|---|
| The column naming the row | Scenario | Scenario | [.scenario]#++Scenario++# | <th class="cell scenario"><span class="literal">Scenario</span></th> |
| A column the test is given | Year | Year | ++Year++ | <th class="cell"><span class="literal">Year</span></th> |
| The column ending in a query | Leap? | Leap? | [.expectation]#++Leap?++# | <th class="cell expectation"><span class="literal">Leap?</span></th> |