com.tngtech.jgiven.report
Interface ReportModelHandler


public interface ReportModelHandler


Method Summary
 void caseHeader(int caseNr, java.util.List<java.lang.String> parameterNames, java.util.List<java.lang.String> caseArguments)
          Is invoked when a scenario has multiple cases, but no data table.
 void className(java.lang.String className)
           
 void dataTable(AbstractReportModelHandler.ScenarioDataTable scenarioDataTable)
          Is invoked at the end of a scenario, when the scenario has multiple case and a data table.
 void introWord(java.lang.String value)
          Invoked for intro words like given, when, then
 void reportDescription(java.lang.String description)
          Invoked for the description of this report model.
 void scenarioEnd()
          Invoked when the scenario is finished
 void scenarioTitle(java.lang.String title)
          Is invoked for the title of the scenario.
 void stepArgument(java.lang.String argumentValue, boolean differs)
          Invoked for step arguments that are not arguments of a case
 void stepArgumentPlaceHolder(java.lang.String placeHolderValue)
          Invoked for step argument place holders.
 void stepCaseArgument(java.lang.String caseArgumentValue)
          Invoked for step arguments that are also arguments of a case.
 void stepDataTableArgument(DataTable dataTable)
          Invoked for step arguments that are data tables
 void stepEnd()
          Invoked when a step is finished
 void stepStart()
          Invoked when a step starts
 void stepWord(java.lang.String value, boolean differs)
          Invoked for plain words of a step
 

Method Detail

className

void className(java.lang.String className)

reportDescription

void reportDescription(java.lang.String description)
Invoked for the description of this report model.

Is only invoked if there is actually an description

Parameters:
description - the description, is never null

scenarioTitle

void scenarioTitle(java.lang.String title)
Is invoked for the title of the scenario.

The title corresponds to the test method name

Parameters:
title - the title of the scenario

caseHeader

void caseHeader(int caseNr,
                java.util.List<java.lang.String> parameterNames,
                java.util.List<java.lang.String> caseArguments)
Is invoked when a scenario has multiple cases, but no data table.

Plain Text Example:

   Case 1: param1 = arg1, param2 = arg2
 
It is guaranteed that parameterNames.size() == caseArgument.size()

Parameters:
caseNr - the number of the case, starting from 0
parameterNames - the parameter names of the scenario
caseArguments - the arguments of the case

dataTable

void dataTable(AbstractReportModelHandler.ScenarioDataTable scenarioDataTable)
Is invoked at the end of a scenario, when the scenario has multiple case and a data table.

Parameters:
scenarioDataTable - the data table of the scenario

scenarioEnd

void scenarioEnd()
Invoked when the scenario is finished


stepStart

void stepStart()
Invoked when a step starts


stepEnd

void stepEnd()
Invoked when a step is finished


introWord

void introWord(java.lang.String value)
Invoked for intro words like given, when, then


stepArgumentPlaceHolder

void stepArgumentPlaceHolder(java.lang.String placeHolderValue)
Invoked for step argument place holders.

This is only invoked when the scenario has a data table.

Parameters:
placeHolderValue - the value of the place holder

stepCaseArgument

void stepCaseArgument(java.lang.String caseArgumentValue)
Invoked for step arguments that are also arguments of a case.

This is only invoked when the scenario has mutliple cases, but no data table

Parameters:
caseArgumentValue - the value of the argument

stepArgument

void stepArgument(java.lang.String argumentValue,
                  boolean differs)
Invoked for step arguments that are not arguments of a case

Parameters:
argumentValue - the value of the argument
differs - whether this argument differs compared to other cases of the same scenario

stepDataTableArgument

void stepDataTableArgument(DataTable dataTable)
Invoked for step arguments that are data tables

Parameters:
dataTable - the data table

stepWord

void stepWord(java.lang.String value,
              boolean differs)
Invoked for plain words of a step

Parameters:
value - the value of the word
differs - whether this word differs compared to other cases of the same scenario