AnyMatchers

This trait provides matchers which are applicable to any type of value

Companion:
object
class Object
trait Matchable
class Any

Value members

Concrete methods

def !==[T](t: => T)(using evidence$4: Diffable[T]): Matcher[T]

matches if a != b

matches if a != b

def ===[T](t: => T)(using evidence$3: Diffable[T]): EqualityMatcher[T]

matches if a == b

matches if a == b

def ==~[T, S](s: => S)(using evidence$8: Diffable[T], convert: Conversion[S, T]): Matcher[T]

matches if a == b after an implicit conversion

matches if a == b after an implicit conversion

def anyOf[T](t: T*): Matcher[T]

alias for beOneOf, which can be used with contain matchers

alias for beOneOf, which can be used with contain matchers

def be[T <: AnyRef](t: => T): BeTheSameAs[T]

alias for beTheSameAs

alias for beTheSameAs

def beAnInstanceOf[T](using evidence$14: ClassTag[T]): Matcher[AnyRef]
def beAnyOf[T](t: T*): Matcher[T]

alias for beOneOf

alias for beOneOf

def beAsNullAs[T](a: => T): Matcher[T]

matches if a is null when v is null and a is not null when v is not null

matches if a is null when v is null and a is not null when v is not null

def beAssignableFrom[T](using evidence$13: ClassTag[T]): Matcher[Class[_]]

matches if v.isAssignableFrom(c)

matches if v.isAssignableFrom(c)

def beEmpty[T](using evidence$9: IsEmpty[T]): Matcher[T]

matches if a.isEmpty

matches if a.isEmpty

def beEqualTo[T](t: => T)(using evidence$5: Diffable[T]): EqualityMatcher[T]

matches if a == b

matches if a == b

def beFalse: Matcher[Boolean]

matches if a == false

matches if a == false

def beLike[T](pattern: PartialFunction[T, Result]): Matcher[T]

matches if the value returns a successful result when applied to a PartialFunction

matches if the value returns a successful result when applied to a PartialFunction

def beNull[T]: BeNull[T]

matches if the value is null

matches if the value is null

def beOneOf[T](t: T*): Matcher[T]

matches if t.toSeq.exists(_ == v)

matches if t.toSeq.exists(_ == v)

def beTheSameAs[T <: AnyRef](t: => T): BeTheSameAs[T]

matches if a eq b

matches if a eq b

def beTrue: Matcher[Boolean]

matches if a == true

matches if a == true

def be_!=[T](t: => T)(using evidence$2: Diffable[T]): Matcher[T]

matches if a != b

matches if a != b

def be_==[T](t: => T)(using evidence$1: Diffable[T]): EqualityMatcher[T]

matches if a == b

matches if a == b

def be_==~[T, S](s: => S)(using evidence$7: Diffable[T], convert: Conversion[S, T]): Matcher[T]

matches if a == b after an implicit conversion

matches if a == b after an implicit conversion

def equalTo[T](t: => T)(using evidence$6: Diffable[T]): EqualityMatcher[T]

matches if a == b

matches if a == b

def haveClass[T](using evidence$10: ClassTag[T]): Matcher[AnyRef]

matches if v.getClass == c

matches if v.getClass == c

def haveInterface[T](using evidence$12: ClassTag[T]): Matcher[AnyRef]

matches if x.getClass.getInterfaces.contains(T)

matches if x.getClass.getInterfaces.contains(T)

def haveSuperclass[T](using evidence$11: ClassTag[T]): Matcher[AnyRef]

matches if c.isAssignableFrom(v.getClass.getSuperclass)

matches if c.isAssignableFrom(v.getClass.getSuperclass)

def not[T](m: Matcher[T]): Matcher[T]

negate a matcher

negate a matcher