org.specs2.matcher

DataTables

Related Doc: package matcher

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

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. DataTables
  2. ExpectationsCreation
  3. MatchResultStackTrace
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

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

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

  13. case class Table1[T1](titles: List[String], rows: List[DataRow1[T1]], execute: Boolean = false) 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 = false) extends Table with Product with Serializable

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

  16. case class Table3[T1, T2, T3](titles: List[String], rows: List[DataRow3[T1, T2, T3]], execute: Boolean = false) 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 = false) 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 = false) 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 = false) 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 = false) 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 = false) 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 = false) extends Table with Product with Serializable

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

    GENERATED

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. 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
  6. 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
  7. 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
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def createExpectable[T](t: ⇒ T, alias: Option[(String) ⇒ String]): Expectable[T]

    returns

    an Expectable with a description function

    Definition Classes
    ExpectationsCreation
  10. def createExpectable[T](t: ⇒ T, alias: (String) ⇒ String): Expectable[T]

    returns

    an Expectable with a description function

    Definition Classes
    ExpectationsCreation
  11. def createExpectable[T](t: ⇒ T, alias: ⇒ String): Expectable[T]

    returns

    an Expectable with a description

    Definition Classes
    ExpectationsCreation
  12. def createExpectable[T](t: ⇒ T): Expectable[T]

    returns

    an Expectable

    Definition Classes
    ExpectationsCreation
  13. def createExpectableWithShowAs[T](t: ⇒ T, showAs: ⇒ String): Expectable[T]

    returns

    an Expectable with a function to show the element T

    Definition Classes
    ExpectationsCreation
  14. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. def equals(arg0: Any): Boolean

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

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

    Definition Classes
    AnyRef → Any
  18. def hashCode(): Int

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

    Definition Classes
    Any
  20. 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
  21. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  24. def sandboxMatchResult[T](mr: ⇒ MatchResult[T]): MatchResult[T]

    returns

    the match result without any side-effects

    Attributes
    protected
    Definition Classes
    ExpectationsCreation
  25. 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
  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  27. implicit def toDataRow[T](a: T): DataRow1[T]

    returns

    a DataRow with one value only

  28. def toString(): String

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

    returns

    a TableHeader with one heading only

  30. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ExpectationsCreation

Inherited from MatchResultStackTrace

Inherited from AnyRef

Inherited from Any

Ungrouped