Package com.tngtech.jgiven.format.table
Class DefaultTableFormatter
- java.lang.Object
-
- com.tngtech.jgiven.format.table.DefaultTableFormatter
-
- All Implemented Interfaces:
TableFormatter
public class DefaultTableFormatter extends java.lang.Object implements TableFormatter
The default implementation to format a table argument
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultTableFormatter.Factory
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_NUMBERED_HEADER
-
Constructor Summary
Constructors Constructor Description DefaultTableFormatter(FormatterConfiguration formatterConfiguration, ObjectFormatter<?> objectFormatter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DataTable
format(java.lang.Object tableArgument, Table tableAnnotation, java.lang.String parameterName, java.lang.annotation.Annotation... allAnnotations)
Generates aDataTable
from a given table argument
-
-
-
Field Detail
-
DEFAULT_NUMBERED_HEADER
public static final java.lang.String DEFAULT_NUMBERED_HEADER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DefaultTableFormatter
public DefaultTableFormatter(FormatterConfiguration formatterConfiguration, ObjectFormatter<?> objectFormatter)
-
-
Method Detail
-
format
public DataTable format(java.lang.Object tableArgument, Table tableAnnotation, java.lang.String parameterName, java.lang.annotation.Annotation... allAnnotations)
Description copied from interface:TableFormatter
Generates aDataTable
from a given table argument- Specified by:
format
in interfaceTableFormatter
- Parameters:
tableArgument
- the actual argument passed to the step methodtableAnnotation
- the annotation of the step method parameterparameterName
- the name of the step method parameterallAnnotations
- all annotations of the step method parameter, includingTable
- Returns:
- a DataTable instance that defines how the table should look in the report
-
-