Leaf

org.scalatest.Fact.Leaf
case class Leaf(rawFactMessage: String, rawSimplifiedFactMessage: String, rawMidSentenceFactMessage: String, rawMidSentenceSimplifiedFactMessage: String, factMessageArgs: IndexedSeq[Any], simplifiedFactMessageArgs: IndexedSeq[Any], midSentenceFactMessageArgs: IndexedSeq[Any], midSentenceSimplifiedFactMessageArgs: IndexedSeq[Any], isYes: Boolean, isVacuousYes: Boolean, prettifier: Prettifier, cause: Option[Throwable]) extends Fact

Represents a leaf node in the Fact tree, which is a concrete Fact with known boolean values.

Value parameters

cause

An optional cause Throwable associated with the fact.

factMessageArgs

Arguments used to format the rawFactMessage.

isVacuousYes

Indicates whether the fact is a vacuous yes, which means true in a sense but without meaningful assertions.

isYes

Indicates whether the fact is evaluated to true.

midSentenceFactMessageArgs

Arguments used to format the rawMidSentenceFactMessage.

midSentenceSimplifiedFactMessageArgs

Arguments used to format the rawMidSentenceSimplifiedFactMessage.

prettifier

A prettifier used to format the messages when constructing failure messages.

rawFactMessage

The raw message representing the fact.

rawMidSentenceFactMessage

The raw mid-sentence message representing the fact.

rawMidSentenceSimplifiedFactMessage

The raw mid-sentence simplified message representing the fact.

rawSimplifiedFactMessage

The raw simplified message representing the fact.

simplifiedFactMessageArgs

Arguments used to format the rawSimplifiedFactMessage.

Attributes

Throws
IllegalArgumentException

if isVacuousYes is true but isYes is false.

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Fact
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def modifyMessage(fun: Option[String] => Option[String]): Fact

Get a new instance of Fact with the messages modified using the passed fun function.

Get a new instance of Fact with the messages modified using the passed fun function.

Attributes

Inherited methods

final def &(rhs: Fact): Fact

Creates a new Fact that represents a logical AND between this Fact and the provided Fact.

Creates a new Fact that represents a logical AND between this Fact and the provided Fact.

Value parameters

rhs

The Fact to be combined with this Fact using a logical AND.

Attributes

Returns

A new Fact representing the logical AND between this Fact and the provided Fact.

Inherited from:
Fact
final def &&(rhs: => Fact): Fact

Creates a new Fact that represents a logical AND between this Fact and the provided Fact.

Creates a new Fact that represents a logical AND between this Fact and the provided Fact.

Value parameters

rhs

The Fact to be combined with this Fact using a logical AND.

Attributes

Returns

A new Fact representing the logical AND between this Fact and the provided Fact.

Inherited from:
Fact
def factDiagram(level: Int): String

Generates a fact diagram, which is a textual representation of the fact and its structure.

Generates a fact diagram, which is a textual representation of the fact and its structure.

Value parameters

level

The indentation level for formatting the diagram.

Attributes

Returns

The fact diagram as a string.

Inherited from:
Fact
def factMessage: String

Construct failure message to report if a fact fails, using rawFactMessage, factMessageArgs and prettifier

Construct failure message to report if a fact fails, using rawFactMessage, factMessageArgs and prettifier

Attributes

Returns

failure message to report if a fact fails

Inherited from:
Fact
final def implies(rhs: => Fact): Fact

Creates a new Fact that represents the implication (=>) between this Fact and the provided Fact.

Creates a new Fact that represents the implication (=>) between this Fact and the provided Fact.

Value parameters

rhs

The Fact representing the implication's consequent.

Attributes

Returns

A new Fact representing the implication between this Fact and the provided Fact.

Inherited from:
Fact
final def isEqvTo(rhs: Fact): Fact

Creates a new Fact that represents the equivalence (eqv) between this Fact and the provided Fact.

Creates a new Fact that represents the equivalence (eqv) between this Fact and the provided Fact.

Value parameters

rhs

The Fact representing the other side of the equivalence.

Attributes

Returns

A new Fact representing the equivalence between this Fact and the provided Fact.

Inherited from:
Fact
final def isNo: Boolean

Indicates whether the fact is a no.

Indicates whether the fact is a no.

Attributes

Inherited from:
Fact

Construct failure message suitable for appearing mid-sentence, using rawMidSentenceFactMessage, midSentenceFactMessageArgs and prettifier

Construct failure message suitable for appearing mid-sentence, using rawMidSentenceFactMessage, midSentenceFactMessageArgs and prettifier

Attributes

Returns

failure message suitable for appearing mid-sentence

Inherited from:
Fact

Construct simplified failure message suitable for appearing mid-sentence, using rawMidSentenceSimplifiedFactMessage, midSentenceSimplifiedFactMessageArgs and prettifier

Construct simplified failure message suitable for appearing mid-sentence, using rawMidSentenceSimplifiedFactMessage, midSentenceSimplifiedFactMessageArgs and prettifier

Attributes

Returns

simplified failure message suitable for appearing mid-sentence

Inherited from:
Fact
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def simplifiedFactMessage: String

Construct simplified failure message to report if a fact fails, using rawSimplifiedFactMessage, simplifiedFactMessageArgs, and prettifier

Construct simplified failure message to report if a fact fails, using rawSimplifiedFactMessage, simplifiedFactMessageArgs, and prettifier

Attributes

Returns

simplified failure message to report if a fact fails

Inherited from:
Fact
final def stringPrefix: String

String prefix for this fact, return either "Yes", "VacuousYes" or "No".

String prefix for this fact, return either "Yes", "VacuousYes" or "No".

Attributes

Inherited from:
Fact
final def toAssertion(implicit pos: Position): Assertion

Convert this fact to Assertion.

Convert this fact to Assertion.

Value parameters

pos

the related Position for this fact.

Attributes

Returns

Succeeded if this fact is a yes.

Throws
TestCanceledException

if this fact is a vacuous yes.

TestFailedException

if this fact is not yes or vacuous yes.

Inherited from:
Fact
final def toBoolean: Boolean

Convert the fact to Boolean, same as the value returned by isYes.

Convert the fact to Boolean, same as the value returned by isYes.

Attributes

Inherited from:
Fact
override def toString: String

Converts this Fact to its string representation.

Converts this Fact to its string representation.

Attributes

Returns

The string representation of this Fact.

Definition Classes
Fact -> Any
Inherited from:
Fact
def unary_!: Fact

Negates this Fact, creating a version with the opposite value.

Negates this Fact, creating a version with the opposite value.

Attributes

Returns

A version of this Fact with the opposite value.

Inherited from:
Fact
final def |(rhs: Fact): Fact

Creates a new Fact that represents a logical OR between this Fact and the provided Fact.

Creates a new Fact that represents a logical OR between this Fact and the provided Fact.

Value parameters

rhs

The Fact to be combined with this Fact using a logical OR.

Attributes

Returns

A new Fact representing the logical OR between this Fact and the provided Fact.

Inherited from:
Fact
final def ||(rhs: => Fact): Fact

Creates a new Fact that represents a logical OR between this Fact and the provided Fact.

Creates a new Fact that represents a logical OR between this Fact and the provided Fact.

Value parameters

rhs

The Fact to be combined with this Fact using a logical OR.

Attributes

Returns

A new Fact representing the logical OR between this Fact and the provided Fact.

Inherited from:
Fact

Concrete fields

val isLeaf: Boolean

Indicates whether this Fact is a leaf node in the Fact tree, return true.

Indicates whether this Fact is a leaf node in the Fact tree, return true.

Attributes