Trait

org.specs2.matcher

DataTables

Related Doc: package matcher

Permalink

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
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. DataTables
  2. Expectations
  3. MatchResultStackTrace
  4. CanBeEqual
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. class CanBeEqualExpectation[T] extends AnyRef

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

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

    Permalink
  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

    Permalink
  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

    Permalink
  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

    Permalink
  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

    Permalink
  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

    Permalink
  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

    Permalink
  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

    Permalink
  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

    Permalink
  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

    Permalink
  13. class Descriptible[T] extends AnyRef

    Permalink
    Definition Classes
    Expectations
  14. abstract class Table extends AnyRef

    Permalink

    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

    Permalink
  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

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

    Permalink
  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

    Permalink
  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

    Permalink
  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

    Permalink
  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

    Permalink
  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

    Permalink
  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

    Permalink
  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

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

    Permalink

    GENERATED

Value Members

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

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

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

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

    Permalink
    Definition Classes
    Any
  5. implicit def canBeEqual[T](t: ⇒ T): CanBeEqualExpectation[T]

    Permalink

    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]

    Permalink

    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
    Expectations
  7. def checkMatchResultFailure[T](m: MatchResult[T]): MatchResult[T]

    Permalink

    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
    Expectations
  8. def checkResultFailure(r: ⇒ Result): Result

    Permalink

    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
    Expectations
  9. def clone(): AnyRef

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

    Permalink

    returns

    an Expectable with a description function

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

    Permalink

    returns

    an Expectable with a description function

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

    Permalink

    returns

    an Expectable with a description

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

    Permalink

    returns

    an Expectable

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

    Permalink

    returns

    an Expectable with a function to show the element T

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

    Permalink

    describe a value with the aka method

    describe a value with the aka method

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

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

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

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

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

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

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

    Permalink

    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
    Expectations
  23. final def ne(arg0: AnyRef): Boolean

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

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

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

    Permalink

    returns

    the match result without any side-effects

    Attributes
    protected
    Definition Classes
    Expectations
  27. def setStacktrace[T](m: MatchResult[T]): MatchResult[T]

    Permalink

    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
  28. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink

    returns

    a DataRow with one value only

  30. def toString(): String

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

    Permalink

    returns

    a TableHeader with one heading only

  32. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Expectations

Inherited from MatchResultStackTrace

Inherited from CanBeEqual

Inherited from AnyRef

Inherited from Any

Ungrouped