DataTables
This trait provides implicit definitions and types to create DataTables.
A DataTable has a header defining column names and rows holding values. It is possible to apply a function taking the row values and returning a Result.
A TableHeader is defined by separating the column names with '|': "a" | "b" | "c"
A DataRow is defined by separating the row values with '!': 1 ! 2 ! 3
Note that the '!' method can conflict with the creation of Examples when the value is a string. In that case it is possible to use the '!!! method to disambiguate:
"1" !! "2" ! "3"
In that case the first column of the header can also be defined with '||' for pure symmetry reasons:
"a" || "b" | "c"
"1" !! "2" ! "3"
Attributes
- See also
-
org.specs2.matcher.DataTablesSpec for examples
- Graph
-
- Supertypes
-
trait ExpectationsCreationtrait ResultCheckstrait MatchResultStackTraceclass Objecttrait Matchableclass AnyShow all
Members list
Type members
Classlikes
Attributes
- Supertypes
-
trait Producttrait Equalsclass Objecttrait Matchableclass Any
- Known subtypes
-
class DataRow1[T1]Show all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
A DataTable with its header
A DataTable with its header
Children of this class are parametrized with the types of values that their rows can hold.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
class Table1[T1]Show all
GENERATED
GENERATED
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Returns
-
a TableHeader with one heading only
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
Value members
Inherited methods
this method can be overridden to throw exceptions when checking a result
this method can be overridden to throw exceptions when checking a result
Attributes
- Inherited from:
- ResultChecks
Attributes
- Returns
-
an Expectable with a description function
- Inherited from:
- ExpectationsCreation
Attributes
- Returns
-
an Expectable with a description
- Inherited from:
- ExpectationsCreation
Attributes
- Returns
-
an Expectable
- Inherited from:
- ExpectationsCreation
Attributes
- Returns
-
an Expectable with a description function
- Inherited from:
- ExpectationsCreation
Attributes
- Returns
-
an Expectable with a function to show the element T
- Inherited from:
- ExpectationsCreation
this method can be overridden to intercept a Result and modify it. It is used for example to set a stacktrace providing the location of a failure
this method can be overridden to intercept a Result and modify it. It is used for example to set a stacktrace providing the location of a failure
Attributes
- Inherited from:
- ResultChecks
Attributes
- Returns
-
the result without any side-effects
- Inherited from:
- ResultChecks
this method can be overridden to avoid filling-in a stacktrace indicating the location of the result
this method can be overridden to avoid filling-in a stacktrace indicating the location of the result
Attributes
- Inherited from:
- MatchResultStackTrace
Attributes
- Inherited from:
- ExpectationsCreation
Attributes
- Inherited from:
- ExpectationsCreation
Givens
Givens
Attributes
- Returns
-
a TableHeader with one heading only
Attributes
- Returns
-
a DataRow with one value only