class BeTrueMatcher extends Matcher[Boolean]
Matcher for a boolean value which must be true
- Alphabetic
- By Inheritance
- BeTrueMatcher
- Matcher
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new BeTrueMatcher()
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def ^^[S](f: (S) => Expectable[Boolean], dummy: Int = 0): Matcher[S]
Adapt a matcher to another.
Adapt a matcher to another. ex:
be_==("message") ^^ (_.getMessage aka "trimmed")
can be applied to an exception
The dummy value is used to help to disambiguate with the overloaded ^^ function
- Definition Classes
- Matcher
- def ^^[S](f: (S) => Boolean): Matcher[S]
Adapt a matcher to another.
Adapt a matcher to another. ex:
be_==("message") ^^ (_.getMessage)
can be applied to an exception
- Definition Classes
- Matcher
- def and[S <: Boolean](m: => Matcher[S]): Matcher[S]
the logical and between 2 matchers
the logical and between 2 matchers
- Definition Classes
- Matcher
- See also
MatchResult.and
- def apply[S <: Boolean](v: Expectable[S]): MatchResult[S]
apply this matcher to an Expectable
apply this matcher to an Expectable
- returns
a MatchResult describing the outcome of the match
- Definition Classes
- BeTrueMatcher → Matcher
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def eventually(retries: Int, sleep: (Int) => Duration): Matcher[Boolean]
- sleep
the function applied on the retry number (first is 1)
- returns
a matcher that needs to eventually match, after a given number of retries and a sleep time
aResult mustEqual(expected).eventually(retries = 2, _ * 100.milliseconds)
- Definition Classes
- Matcher
- def eventually(retries: Int, sleep: Duration): Matcher[Boolean]
- returns
a matcher that needs to eventually match, after a given number of retries and a sleep time
- Definition Classes
- Matcher
- def eventually: Matcher[Boolean]
- returns
a matcher that needs to eventually match, after 40 retries and a sleep time of 100 milliseconds
- Definition Classes
- Matcher
- def failure[S <: Boolean](message: => String, value: Expectable[S]): MatchResult[S]
This method can be used to create a failed match result
This method can be used to create a failed match result
- Attributes
- protected
- Definition Classes
- Matcher
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def iff(b: Boolean): Matcher[Boolean]
when the condition is true the matcher is applied, when it's false, the matcher must fail
when the condition is true the matcher is applied, when it's false, the matcher must fail
- Definition Classes
- Matcher
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def lazily: Matcher[() => Boolean]
The
lazily
operator returns a Matcher which will match a function returning the expected valueThe
lazily
operator returns a Matcher which will match a function returning the expected value- Definition Classes
- Matcher
- def mute: Matcher[Boolean]
- returns
a Matcher with no messages
- Definition Classes
- Matcher
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def not: Matcher[Boolean]
negate a Matcher
negate a Matcher
- Definition Classes
- Matcher
- See also
MatchResult.not
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def or[S <: Boolean](m: => Matcher[S]): Matcher[S]
the logical or between 2 matchers
the logical or between 2 matchers
- Definition Classes
- Matcher
- See also
MatchResult.or
- def orPending(message: (String) => String): Matcher[Boolean]
- returns
a Pending MatchResult if this matcher fails, modifying the failure message with a pending message.
- Definition Classes
- Matcher
- def orPending(m: String): Matcher[Boolean]
- returns
a Pending MatchResult if this matcher fails, prefixing the failure message with a pending message. If the pending message is empty, only the failure message is printed
- Definition Classes
- Matcher
- def orPending: Matcher[Boolean]
- returns
a Pending MatchResult if this matcher fails
- Definition Classes
- Matcher
- def orSkip(message: (String) => String): Matcher[Boolean]
- returns
a Skip MatchResult if this matcher fails, modifying the failure message with a skip message.
- Definition Classes
- Matcher
- def orSkip(m: String): Matcher[Boolean]
- returns
a Skip MatchResult if this matcher fails, prefixing the failure message with a skip message. If the skip message is empty, only the failure message is printed
- Definition Classes
- Matcher
- def orSkip: Matcher[Boolean]
- returns
a Skip MatchResult if this matcher fails
- Definition Classes
- Matcher
- def result[S <: Boolean](other: MatchResultMessages.MatchResultMessage, value: Expectable[S]): MatchResult[S]
- returns
a MatchResult using the messages embedded in a MatchResultMessage (i.e. an accumulation of messages from other matches)
- Attributes
- protected
- Definition Classes
- Matcher
- def result[S <: Boolean](other: Result, value: Expectable[S]): MatchResult[S]
- returns
a Match Result from another result
- Attributes
- protected
- Definition Classes
- Matcher
- def result[S <: Boolean](other: MatchResult[_], value: Expectable[S]): MatchResult[S]
- returns
a MatchResult copied on another one, but with a different expectable
- Attributes
- protected
- Definition Classes
- Matcher
- def result[S <: Boolean](test: => Boolean, okMessage: => String, koMessage: => String, value: Expectable[S], details: Details): MatchResult[S]
- returns
a MatchResult with an okMessage, a koMessage, the expectable value and details about the failure if any
- Attributes
- protected
- Definition Classes
- Matcher
- def result[S <: Boolean](test: => Boolean, okMessage: => String, koMessage: => String, value: Expectable[S], expected: String, actual: String): MatchResult[S]
- returns
a MatchResult with an okMessage, a koMessage, the expectable value and the expected/actual values as string to display a failure comparison if necessary
- Attributes
- protected
- Definition Classes
- Matcher
- def result[S <: Boolean](triplet: => (Boolean, String, String), value: Expectable[S]): MatchResult[S]
- returns
a MatchResult with an okMessage, a koMessage and the expectable value
- Attributes
- protected
- Definition Classes
- Matcher
- def result[S <: Boolean](test: => Boolean, okMessage: => String, koMessage: => String, value: Expectable[S]): MatchResult[S]
- returns
a MatchResult with an okMessage, a koMessage and the expectable value
- Attributes
- protected
- Definition Classes
- Matcher
- def setMessage(message: String): Matcher[Boolean]
- returns
set a new failure message of a matcher
- Definition Classes
- Matcher
- def success[S <: Boolean](message: => String, value: Expectable[S]): MatchResult[S]
This method can be used to create a successful match result
This method can be used to create a successful match result
- Attributes
- protected
- Definition Classes
- Matcher
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def test: (Boolean) => Boolean
- returns
a test function corresponding to this matcher
- Definition Classes
- Matcher
- def toString(): String
- Definition Classes
- AnyRef → Any
- def unless(b: Boolean, m: String = ""): Matcher[Boolean]
only apply this matcher if the condition is false
only apply this matcher if the condition is false
- Definition Classes
- Matcher
- def updateMessage(f: (String) => String): Matcher[Boolean]
- returns
update the failure message of a matcher
- Definition Classes
- Matcher
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def when(b: Boolean, m: String = ""): Matcher[Boolean]
only apply this matcher if the condition is true
only apply this matcher if the condition is true
- Definition Classes
- Matcher