org.specs2.matcher

DataTables

trait DataTables extends Expectations

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
Expectations, CanBeEqual, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. DataTables
  2. Expectations
  3. CanBeEqual
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. class CanBeEqualExpectation[T] extends AnyRef

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

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

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

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

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

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

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

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

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

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

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

  13. class Descriptible[T] extends AnyRef

    Definition Classes
    Expectations
  14. 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.

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

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

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

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

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

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

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

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

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

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

  25. 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. implicit def canBeEqual[T](t: ⇒ T): CanBeEqualExpectation[T]

    A value can be tested against another with the === operator.

    A value can be tested against another with the === operator. It is equivalent to writing a must_== b

    Definition Classes
    CanBeEqual
  6. def checkFailure[T](m: MatchResult[T]): MatchResult[T]

    this method can be overriden to throw exceptions when checking the match result

    this method can be overriden to throw exceptions when checking the match result

    Attributes
    protected
    Definition Classes
    Expectations
  7. def checkMatchResultFailure[T](m: MatchResult[T]): MatchResult[T]

    this method can be overriden to throw exceptions when checking the match result

    this method can be overriden to throw exceptions when checking the match result

    Attributes
    protected
    Definition Classes
    Expectations
  8. def checkResultFailure(r: ⇒ Result): Result

    this method can be overriden to throw exceptions when checking the result

    this method can be overriden to throw exceptions when checking the result

    Attributes
    protected
    Definition Classes
    Expectations
  9. def clone(): AnyRef

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

    returns

    an Expectable with a description function

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

    returns

    an Expectable with a description function

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

    returns

    an Expectable with a description

    Definition Classes
    Expectations
  13. def createExpectable[T](t: ⇒ T): Expectable[T]

    returns

    an Expectable

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

    returns

    an Expectable with a function to show the element T

    Definition Classes
    Expectations
  15. implicit def describe[T](t: ⇒ T): Descriptible[T]

    describe a value with the aka method

    describe a value with the aka method

    Definition Classes
    Expectations
  16. final def eq(arg0: AnyRef): Boolean

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

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

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

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

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

    Definition Classes
    Any
  22. def mapMatchResult[T](m: MatchResult[T]): MatchResult[T]

    this method can be overriden to intercept a MatchResult and change its message before it is thrown

    this method can be overriden to intercept a MatchResult and change its message before it is thrown

    Attributes
    protected
    Definition Classes
    Expectations
  23. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  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 Expectations

Inherited from CanBeEqual

Inherited from AnyRef

Inherited from Any

Ungrouped