trait DataTables extends ExpectationsCreation
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 MatchResult.
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"
- See also
org.specs2.matcher.DataTablesSpec for examples
- Alphabetic
- By Inheritance
- DataTables
- ExpectationsCreation
- MatchResultStackTrace
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- abstract class DataRow[+T1, +T2, +T3, +T4, +T5, +T6, +T7, +T8, +T9, +T10] extends Product
- case class DataRow1[+T1](t1: T1) extends DataRow[T1, Any, Any, Any, Any, Any, Any, Any, Any, Any] with Product with Serializable
- case class DataRow10[+T1, +T2, +T3, +T4, +T5, +T6, +T7, +T8, +T9, +T10](t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6, t7: T7, t8: T8, t9: T9, t10: T10) extends DataRow[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] with Product with Serializable
- case class DataRow2[+T1, +T2](t1: T1, t2: T2) extends DataRow[T1, T2, Any, Any, Any, Any, Any, Any, Any, Any] with Product with Serializable
- case class DataRow3[+T1, +T2, +T3](t1: T1, t2: T2, t3: T3) extends DataRow[T1, T2, T3, Any, Any, Any, Any, Any, Any, Any] with Product with Serializable
- case class DataRow4[+T1, +T2, +T3, +T4](t1: T1, t2: T2, t3: T3, t4: T4) extends DataRow[T1, T2, T3, T4, Any, Any, Any, Any, Any, Any] with Product with Serializable
- case class DataRow5[+T1, +T2, +T3, +T4, +T5](t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) extends DataRow[T1, T2, T3, T4, T5, Any, Any, Any, Any, Any] with Product with Serializable
- case class DataRow6[+T1, +T2, +T3, +T4, +T5, +T6](t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6) extends DataRow[T1, T2, T3, T4, T5, T6, Any, Any, Any, Any] with Product with Serializable
- case class DataRow7[+T1, +T2, +T3, +T4, +T5, +T6, +T7](t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6, t7: T7) extends DataRow[T1, T2, T3, T4, T5, T6, T7, Any, Any, Any] with Product with Serializable
- case class DataRow8[+T1, +T2, +T3, +T4, +T5, +T6, +T7, +T8](t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6, t7: T7, t8: T8) extends DataRow[T1, T2, T3, T4, T5, T6, T7, T8, Any, Any] with Product with Serializable
- case class DataRow9[+T1, +T2, +T3, +T4, +T5, +T6, +T7, +T8, +T9](t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6, t7: T7, t8: T8, t9: T9) extends DataRow[T1, T2, T3, T4, T5, T6, T7, T8, T9, Any] with Product with Serializable
- implicit class FutureOps[A] extends AnyRef
- abstract class Table extends AnyRef
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.
- case class Table1[T1](titles: List[String], rows: List[DataRow1[T1]], execute: Boolean = false, show1: Show1[T1] = Show1[T1]()) extends Table with Product with Serializable
- case class Table10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10](titles: List[String], rows: List[DataRow10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]], execute: Boolean = false, show10: Show10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10] = Show10[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]()) extends Table with Product with Serializable
- case class Table2[T1, T2](titles: List[String], rows: List[DataRow2[T1, T2]], execute: Boolean = false, show2: Show2[T1, T2] = Show2[T1, T2]()) extends Table with Product with Serializable
- case class Table3[T1, T2, T3](titles: List[String], rows: List[DataRow3[T1, T2, T3]], execute: Boolean = false, show3: Show3[T1, T2, T3] = Show3[T1, T2, T3]()) extends Table with Product with Serializable
- case class Table4[T1, T2, T3, T4](titles: List[String], rows: List[DataRow4[T1, T2, T3, T4]], execute: Boolean = false, show4: Show4[T1, T2, T3, T4] = Show4[T1, T2, T3, T4]()) extends Table with Product with Serializable
- case class Table5[T1, T2, T3, T4, T5](titles: List[String], rows: List[DataRow5[T1, T2, T3, T4, T5]], execute: Boolean = false, show5: Show5[T1, T2, T3, T4, T5] = Show5[T1, T2, T3, T4, T5]()) extends Table with Product with Serializable
- case class Table6[T1, T2, T3, T4, T5, T6](titles: List[String], rows: List[DataRow6[T1, T2, T3, T4, T5, T6]], execute: Boolean = false, show6: Show6[T1, T2, T3, T4, T5, T6] = Show6[T1, T2, T3, T4, T5, T6]()) extends Table with Product with Serializable
- case class Table7[T1, T2, T3, T4, T5, T6, T7](titles: List[String], rows: List[DataRow7[T1, T2, T3, T4, T5, T6, T7]], execute: Boolean = false, show7: Show7[T1, T2, T3, T4, T5, T6, T7] = Show7[T1, T2, T3, T4, T5, T6, T7]()) extends Table with Product with Serializable
- case class Table8[T1, T2, T3, T4, T5, T6, T7, T8](titles: List[String], rows: List[DataRow8[T1, T2, T3, T4, T5, T6, T7, T8]], execute: Boolean = false, show8: Show8[T1, T2, T3, T4, T5, T6, T7, T8] = Show8[T1, T2, T3, T4, T5, T6, T7, T8]()) extends Table with Product with Serializable
- case class Table9[T1, T2, T3, T4, T5, T6, T7, T8, T9](titles: List[String], rows: List[DataRow9[T1, T2, T3, T4, T5, T6, T7, T8, T9]], execute: Boolean = false, show9: Show9[T1, T2, T3, T4, T5, T6, T7, T8, T9] = Show9[T1, T2, T3, T4, T5, T6, T7, T8, T9]()) extends Table with Product with Serializable
- case class TableHeader(titles: List[String]) extends Product with Serializable
GENERATED
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def checkFailure[T](m: MatchResult[T]): MatchResult[T]
this method can be overridden to throw exceptions when checking the match result
this method can be overridden to throw exceptions when checking the match result
- Attributes
- protected
- Definition Classes
- ExpectationsCreation
- def checkMatchResultFailure[T](m: MatchResult[T]): MatchResult[T]
this method can be overridden to throw exceptions when checking the match result
this method can be overridden to throw exceptions when checking the match result
- Attributes
- protected
- Definition Classes
- ExpectationsCreation
- def checkResultFailure(r: => Result): Result
this method can be overridden to throw exceptions when checking the result
this method can be overridden to throw exceptions when checking the result
- Attributes
- protected
- Definition Classes
- ExpectationsCreation
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def createExpectable[T](t: => T, alias: Option[(String) => String]): Expectable[T]
- returns
an Expectable with a description function
- Definition Classes
- ExpectationsCreation
- def createExpectable[T](t: => T, alias: (String) => String): Expectable[T]
- returns
an Expectable with a description function
- Definition Classes
- ExpectationsCreation
- def createExpectable[T](t: => T, alias: => String): Expectable[T]
- returns
an Expectable with a description
- Definition Classes
- ExpectationsCreation
- def createExpectable[T](t: => T): Expectable[T]
- returns
an Expectable
- Definition Classes
- ExpectationsCreation
- def createExpectableWithShowAs[T](t: => T, showAs: => String): Expectable[T]
- returns
an Expectable with a function to show the element T
- Definition Classes
- ExpectationsCreation
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def mapMatchResult[T](m: MatchResult[T]): MatchResult[T]
this method can be overridden to intercept a MatchResult and change its message before it is thrown
this method can be overridden to intercept a MatchResult and change its message before it is thrown
- Attributes
- protected
- Definition Classes
- ExpectationsCreation
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def sandboxMatchResult[T](mr: => MatchResult[T]): MatchResult[T]
- returns
the match result without any side-effects
- Attributes
- protected
- Definition Classes
- ExpectationsCreation
- def setStacktrace[T](m: MatchResult[T]): MatchResult[T]
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
- protected
- Definition Classes
- MatchResultStackTrace
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- implicit def toDataRow[T](a: T): DataRow1[T]
- returns
a DataRow with one value only
- def toString(): String
- Definition Classes
- AnyRef → Any
- implicit def toTableHeader(a: String): TableHeader
- returns
a TableHeader with one heading only
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()