LinesContentMatchers

org.specs2.matcher.LinesContentMatchers
See theLinesContentMatchers companion object

Attributes

Companion
object
Graph
Supertypes
trait Expectations
trait ExpectationsDescription
trait TypedEqual
trait ExpectationsCreation
trait ResultChecks
trait MatchResultStackTrace
trait DifferenceFilters
class Object
trait Matchable
class Any
Show all
Known subtypes

Members list

Type members

Inherited classlikes

case class LinesComparisonMatcher[L1, L2](ls2: L2, all: Boolean, ordered: Boolean, colors: Boolean, filter: DifferenceFilter)(using evidence$7: LinesContent[L1], evidence$8: LinesContent[L2]) extends Matcher[L1]

Matcher to compare the contents of line contents

Matcher to compare the contents of line contents

Attributes

Inherited from:
LinesContentBaseMatchers (hidden)
Supertypes
trait Serializable
trait Product
trait Equals
trait Matcher[L1]
class Object
trait Matchable
class Any
Show all
case class LinesPairComparisonMatcher[L1, L2](all: Boolean, ordered: Boolean, colors: Boolean, filter: DifferenceFilter)(using evidence$9: LinesContent[L1], evidence$10: LinesContent[L2]) extends Matcher[(L1, L2)]

Attributes

Inherited from:
LinesContentBaseMatchers (hidden)
Supertypes
trait Serializable
trait Product
trait Equals
trait Matcher[(L1, L2)]
class Object
trait Matchable
class Any
Show all

Value members

Inherited methods

protected def checkResultFailure(r: => Result): Result

this method can be overridden to throw exceptions when checking a result

this method can be overridden to throw exceptions when checking a result

Attributes

Inherited from:
ResultChecks
def containLines[L1, L2](ls2: L2)(using evidence$5: LinesContent[L1], evidence$6: LinesContent[L2]): LinesComparisonMatcher[L1, L2]

matches if 1 lines content contains the lines of the other one

matches if 1 lines content contains the lines of the other one

Attributes

Inherited from:
LinesContentBaseMatchers (hidden)
def createExpectable[T](t: => T, alias: String => String): Expectable[T]

Attributes

Returns

an Expectable with a description function

Inherited from:
ExpectationsCreation
def createExpectable[T](t: => T, alias: => String): Expectable[T]

Attributes

Returns

an Expectable with a description

Inherited from:
ExpectationsCreation
def createExpectable[T](t: => T): Expectable[T]

Attributes

Returns

an Expectable

Inherited from:
ExpectationsCreation
def createExpectable[T](t: => T, alias: Option[String => String]): Expectable[T]

Attributes

Returns

an Expectable with a description function

Inherited from:
ExpectationsCreation
def createExpectableWithShowAs[T](t: => T, showAs: => String): Expectable[T]

Attributes

Returns

an Expectable with a function to show the element T

Inherited from:
ExpectationsCreation
def haveSameLines[L1, L2](using evidence$1: LinesContent[L1], evidence$2: LinesContent[L2]): LinesPairComparisonMatcher[L1, L2]

matches if 2 contents, as a pair, have the same lines

matches if 2 contents, as a pair, have the same lines

Attributes

Inherited from:
LinesContentBaseMatchers (hidden)
def haveSameLinesAs[L1, L2](ls2: L2)(using evidence$3: LinesContent[L1], evidence$4: LinesContent[L2]): LinesComparisonMatcher[L1, L2]

matches if 2 contents have the same lines

matches if 2 contents have the same lines

Attributes

Inherited from:
LinesContentBaseMatchers (hidden)
protected def mapResult(r: Result): Result

this method can be overridden to intercept a Result and modify it. It is used for example to set a stacktrace providing the location of a failure

this method can be overridden to intercept a Result and modify it. It is used for example to set a stacktrace providing the location of a failure

Attributes

Inherited from:
ResultChecks
protected def sandboxResult(r: => Result): Result

Attributes

Returns

the result without any side-effects

Inherited from:
ResultChecks
protected def setStacktrace(m: Result): Result

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

Inherited from:
MatchResultStackTrace
def theBlock(t: => Nothing): Expectable[Nothing]

Attributes

Inherited from:
ExpectationsCreation
def theValue[T](t: => T): Expectable[T]

Attributes

Inherited from:
ExpectationsCreation

Extensions

Inherited extensions

extension [T](description: String)(using not: NotGiven[NoExpectationsDescription])(using evidence$1: AsResult[T])
def ==>(result: => T): Result

Attributes

Inherited from:
ExpectationsDescription
extension [T](description: String)(using not: NotGiven[NoExpectationsDescription])(using evidence$2: AsResult[T])
def <==>(result: => T): Result

Attributes

Inherited from:
ExpectationsDescription
extension (n: Int)(using not: NotGiven[NoDifferenceFilters])
def difference: FirstDifferences

Attributes

Inherited from:
DifferenceFilters
def differences: FirstDifferences

Attributes

Inherited from:
DifferenceFilters
extension [T](t: => T)(using not: NotGiven[NoTypedEqual])(using evidence$1: Diffable[T])
def ===(other: => T): Result

equality matcher on Expectables

equality matcher on Expectables

Attributes

Inherited from:
TypedEqual
extension [T](t: => T)(using not: NotGiven[NoTypedEqual])(using evidence$2: Diffable[T])
def !==(other: => T): Result

! equality matcher on Expectables

! equality matcher on Expectables

Attributes

Inherited from:
TypedEqual
extension [T](value: => T)(using not: NotGiven[NoValueDescription])
infix def aka(alias: => String): Expectable[T]

Attributes

Returns

an expectable with an alias description

Inherited from:
ExpectationsDescription
infix def aka: Expectable[T]

Attributes

Returns

an expectable with its toString method as an alias description this is useful to preserve the original value when the matcher using it is adapting the value

Inherited from:
ExpectationsDescription
infix def as(alias: String => String): Expectable[T]

Attributes

Returns

an expectable with an alias description, after the value string

Inherited from:
ExpectationsDescription
infix def post(alias: => String): Expectable[T]

Attributes

Returns

an expectable with an alias description, after the value string

Inherited from:
ExpectationsDescription
infix def showAs(show: T => String): Expectable[T]

Attributes

Returns

an expectable with a function to show the element T

Inherited from:
ExpectationsDescription
extension [T](value: => T)(using not: NotGiven[NoValueDescription], show: T => String)
infix def showAs: Expectable[T]

Attributes

Returns

an expectable with a function to show the element T

Inherited from:
ExpectationsDescription

Implicits

Inherited implicits

implicit protected val fileContentForMatchers: LinesContent[File]

Attributes

Inherited from:
LinesContentBaseMatchers (hidden)
implicit protected def seqContentForMatchers[T, CC <: (Iterable)]: LinesContent[CC[T]]

Attributes

Inherited from:
SeqsContents (hidden)