MatchResult

Companion object for the MatchResult case class.

Companion:
class
trait Product
trait Mirror
class Object
trait Matchable
class Any

Type members

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from:
Mirror

Value members

Concrete methods

def apply(matches: Boolean, rawFailureMessage: String, rawNegatedFailureMessage: String, rawMidSentenceFailureMessage: String, rawMidSentenceNegatedFailureMessage: String, failureMessageArgs: IndexedSeq[Any], negatedFailureMessageArgs: IndexedSeq[Any]): MatchResult

Factory method that constructs a new MatchResult with passed matches, failureMessage, negativeFailureMessage, midSentenceFailureMessage, midSentenceNegatedFailureMessage, failureMessageArgs, and negatedFailureMessageArgs fields. failureMessageArgs, and negatedFailureMessageArgs will be used in place of midSentenceFailureMessageArgs and midSentenceNegatedFailureMessageArgs.

Factory method that constructs a new MatchResult with passed matches, failureMessage, negativeFailureMessage, midSentenceFailureMessage, midSentenceNegatedFailureMessage, failureMessageArgs, and negatedFailureMessageArgs fields. failureMessageArgs, and negatedFailureMessageArgs will be used in place of midSentenceFailureMessageArgs and midSentenceNegatedFailureMessageArgs.

Value parameters:
failureMessageArgs

arguments for constructing failure message to report if a match fails

matches

indicates whether or not the matcher matched

negatedFailureMessageArgs

arguments for constructing message with a meaning opposite to that of the failure message

rawFailureMessage

raw failure message to report if a match fails

rawMidSentenceFailureMessage

raw failure message to report if a match fails

rawMidSentenceNegatedFailureMessage

raw message with a meaning opposite to that of the failure message

rawNegatedFailureMessage

raw message with a meaning opposite to that of the failure message

Returns:

a MatchResult instance

def apply(matches: Boolean, rawFailureMessage: String, rawNegatedFailureMessage: String, rawMidSentenceFailureMessage: String, rawMidSentenceNegatedFailureMessage: String): MatchResult

Factory method that constructs a new MatchResult with passed matches, rawFailureMessage, rawNegativeFailureMessage, rawMidSentenceFailureMessage, and rawMidSentenceNegatedFailureMessage fields. All argument fields will have Vector.empty values. This is suitable to create MatchResult with eager error messages, and its mid-sentence messages need to be different.

Factory method that constructs a new MatchResult with passed matches, rawFailureMessage, rawNegativeFailureMessage, rawMidSentenceFailureMessage, and rawMidSentenceNegatedFailureMessage fields. All argument fields will have Vector.empty values. This is suitable to create MatchResult with eager error messages, and its mid-sentence messages need to be different.

Value parameters:
matches

indicates whether or not the matcher matched

rawFailureMessage

raw failure message to report if a match fails

rawMidSentenceFailureMessage

raw failure message to report if a match fails

rawMidSentenceNegatedFailureMessage

raw message with a meaning opposite to that of the failure message

rawNegatedFailureMessage

raw message with a meaning opposite to that of the failure message

Returns:

a MatchResult instance

def apply(matches: Boolean, rawFailureMessage: String, rawNegatedFailureMessage: String): MatchResult

Factory method that constructs a new MatchResult with passed matches, rawFailureMessage, and rawNegativeFailureMessage fields. The rawMidSentenceFailureMessage will return the same string as rawFailureMessage, and the rawMidSentenceNegatedFailureMessage will return the same string as rawNegatedFailureMessage. All argument fields will have Vector.empty values. This is suitable to create MatchResult with eager error messages that have same mid-sentence messages.

Factory method that constructs a new MatchResult with passed matches, rawFailureMessage, and rawNegativeFailureMessage fields. The rawMidSentenceFailureMessage will return the same string as rawFailureMessage, and the rawMidSentenceNegatedFailureMessage will return the same string as rawNegatedFailureMessage. All argument fields will have Vector.empty values. This is suitable to create MatchResult with eager error messages that have same mid-sentence messages.

Value parameters:
matches

indicates whether or not the matcher matched

rawFailureMessage

raw failure message to report if a match fails

rawNegatedFailureMessage

raw message with a meaning opposite to that of the failure message

Returns:

a MatchResult instance

def apply(matches: Boolean, rawFailureMessage: String, rawNegatedFailureMessage: String, args: IndexedSeq[Any]): MatchResult

Factory method that constructs a new MatchResult with passed matches, rawFailureMessage, rawNegativeFailureMessage and args fields. The rawMidSentenceFailureMessage will return the same string as rawFailureMessage, and the rawMidSentenceNegatedFailureMessage will return the same string as rawNegatedFailureMessage. All argument fields will use args as arguments. This is suitable to create MatchResult with lazy error messages that have same mid-sentence messages and arguments.

Factory method that constructs a new MatchResult with passed matches, rawFailureMessage, rawNegativeFailureMessage and args fields. The rawMidSentenceFailureMessage will return the same string as rawFailureMessage, and the rawMidSentenceNegatedFailureMessage will return the same string as rawNegatedFailureMessage. All argument fields will use args as arguments. This is suitable to create MatchResult with lazy error messages that have same mid-sentence messages and arguments.

Value parameters:
args

arguments for error messages construction

matches

indicates whether or not the matcher matched

rawFailureMessage

raw failure message to report if a match fails

rawNegatedFailureMessage

raw message with a meaning opposite to that of the failure message

Returns:

a MatchResult instance

def apply(matches: Boolean, rawFailureMessage: String, rawNegatedFailureMessage: String, failureMessageArgs: IndexedSeq[Any], negatedFailureMessageArgs: IndexedSeq[Any]): MatchResult

Factory method that constructs a new MatchResult with passed matches, rawFailureMessage, rawNegativeFailureMessage, failureMessageArgs and negatedFailureMessageArgs fields. The rawMidSentenceFailureMessage will return the same string as rawFailureMessage, and the rawMidSentenceNegatedFailureMessage will return the same string as rawNegatedFailureMessage. The midSentenceFailureMessageArgs will return the same as failureMessageArgs, and the midSentenceNegatedFailureMessageArgs will return the same as negatedFailureMessageArgs. This is suitable to create MatchResult with lazy error messages that have same mid-sentence and use different arguments for negated messages.

Factory method that constructs a new MatchResult with passed matches, rawFailureMessage, rawNegativeFailureMessage, failureMessageArgs and negatedFailureMessageArgs fields. The rawMidSentenceFailureMessage will return the same string as rawFailureMessage, and the rawMidSentenceNegatedFailureMessage will return the same string as rawNegatedFailureMessage. The midSentenceFailureMessageArgs will return the same as failureMessageArgs, and the midSentenceNegatedFailureMessageArgs will return the same as negatedFailureMessageArgs. This is suitable to create MatchResult with lazy error messages that have same mid-sentence and use different arguments for negated messages.

Value parameters:
failureMessageArgs

arguments for constructing failure message to report if a match fails

matches

indicates whether or not the matcher matched

negatedFailureMessageArgs

arguments for constructing message with a meaning opposite to that of the failure message

rawFailureMessage

raw failure message to report if a match fails

rawNegatedFailureMessage

raw message with a meaning opposite to that of the failure message

Returns:

a MatchResult instance