org.specs2.matcher

DataTables

trait DataTables extends AnyRef

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

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. DataTables
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Type Members

  1. class DataRow [+T1, +T2, +T3, +T4, +T5, +T6, +T7, +T8, +T9, +T10] extends Product

    Attributes
    abstract
  2. case class DataRow1 [T1] (t1: T1) extends DataRow[T1, Any, Any, Any, Any, Any, Any, Any, Any, Any] with Product with Serializable

  3. 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

  4. 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

  5. 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

  6. 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

  7. 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

  8. 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

  9. 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

  10. 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

  11. 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

  12. class Table extends AnyRef

    A DataTable with its header

  13. case class Table1 [T1] (titles: List[String], rows: List[DataRow1[T1]], execute: Boolean) extends Table with Product with Serializable

  14. 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) extends Table with Product with Serializable

  15. case class Table2 [T1, T2] (titles: List[String], rows: List[DataRow2[T1, T2]], execute: Boolean) extends Table with Product with Serializable

  16. case class Table3 [T1, T2, T3] (titles: List[String], rows: List[DataRow3[T1, T2, T3]], execute: Boolean) extends Table with Product with Serializable

  17. case class Table4 [T1, T2, T3, T4] (titles: List[String], rows: List[DataRow4[T1, T2, T3, T4]], execute: Boolean) extends Table with Product with Serializable

  18. case class Table5 [T1, T2, T3, T4, T5] (titles: List[String], rows: List[DataRow5[T1, T2, T3, T4, T5]], execute: Boolean) extends Table with Product with Serializable

  19. case class Table6 [T1, T2, T3, T4, T5, T6] (titles: List[String], rows: List[DataRow6[T1, T2, T3, T4, T5, T6]], execute: Boolean) extends Table with Product with Serializable

  20. 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) extends Table with Product with Serializable

  21. 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) extends Table with Product with Serializable

  22. 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) extends Table with Product with Serializable

  23. case class TableHeader (titles: List[String]) extends Product with Serializable

    GENERATED

Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  7. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  8. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  9. def equals (arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  11. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  12. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  13. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  14. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  15. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  16. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  17. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  18. implicit def toDataRow [T] (a: T): DataRow1[T]

    returns

    a DataRow with one value only

    Attributes
    implicit
  19. def toString (): String

    Definition Classes
    AnyRef → Any
  20. implicit def toTableHeader (a: String): TableHeader

    returns

    a TableHeader with one heading only

    Attributes
    implicit
  21. def wait (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  22. def wait (arg0: Long, arg1: Int): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  23. def wait (arg0: Long): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any