This method enables the following syntax:
This method enables the following syntax:
option will not be defined ^
This method enables the following syntax:
This method enables the following syntax:
list will not be empty ^
This method enables the following syntax:
This method enables the following syntax:
file will not be writable ^
This method enables the following syntax:
This method enables the following syntax:
file will not be readable ^
This method enables the following syntax:
This method enables the following syntax:
xs will not be sorted ^
This method enables the following syntax:
This method enables the following syntax:
otherString will not be theSameInstanceAs (string) ^
This method enables the following syntax, where keyEvent
is, for example, of type KeyEvent
and
actionKey
refers to a BePropertyMatcher[KeyEvent]
:
This method enables the following syntax, where keyEvent
is, for example, of type KeyEvent
and
actionKey
refers to a BePropertyMatcher[KeyEvent]
:
keyEvent will not be an (actionKey) ^
This method enables the following syntax, where notFileMock
is, for example, of type File
and
file
refers to a BePropertyMatcher[File]
:
This method enables the following syntax, where notFileMock
is, for example, of type File
and
file
refers to a BePropertyMatcher[File]
:
notFileMock will not be a (file) ^
This method enables the following syntax, where stack
is, for example, of type Stack
and
empty
refers to a BePropertyMatcher[Stack]
:
This method enables the following syntax, where stack
is, for example, of type Stack
and
empty
refers to a BePropertyMatcher[Stack]
:
stack will not be (empty) ^
This method enables the following syntax:
This method enables the following syntax:
map will not be (null) ^
This method enables the following syntax:
This method enables the following syntax:
partialFun will not be definedAt ("apple") ^
This method enables the following syntax:
This method enables the following syntax:
sevenDotOh will not be (6.5 +- 0.2) ^
This method enables the following syntax:
This method enables the following syntax:
result will not be a [Book] ^
This method enables the following syntax:
This method enables the following syntax:
result will not be a [Book] ^
This method enables the following syntax, where oddNumber
refers to
an AnMatcher[Int]
:
This method enables the following syntax, where oddNumber
refers to
an AnMatcher[Int]
:
2 will not be an (oddNumber) ^
This method enables the following syntax, where positiveNumber
refers to
an AMatcher[Int]
:
This method enables the following syntax, where positiveNumber
refers to
an AMatcher[Int]
:
2 will not be a (positiveNumber) ^
This method enables the following syntax, where odd
refers to
a BeMatcher[Int]
:
This method enables the following syntax, where odd
refers to
a BeMatcher[Int]
:
2 will not be (odd) ^
This method enables the following syntax:
This method enables the following syntax:
result will not be > (7) ^
This method enables the following syntax:
This method enables the following syntax:
result will not be < (7) ^
This method enables the following syntax:
This method enables the following syntax:
result will not be >= (7) ^
This method enables the following syntax:
This method enables the following syntax:
result will not be <= (7) ^
This method enables the following syntax:
This method enables the following syntax:
result will not be (7) ^
This method enables the following syntax:
This method enables the following syntax:
object will not contain ("one") ^
This method enables the following syntax:
This method enables the following syntax:
object will not contain (null) ^
This method enables the following syntax:
This method enables the following syntax:
"eight" will not endWith ("1.7") ^
This method enables the following syntax:
This method enables the following syntax:
greeting will not endWith regex ("wor.d") ^
This method enables the following syntax:
This method enables the following syntax:
result will not equal null ^
This method enables the following syntax:
This method enables the following syntax:
sevenDotOh will not equal (6.5 +- 0.2) ^
This method enables the following syntax:
This method enables the following syntax:
result will not equal (7) ^
This method enables the following syntax:
This method enables the following syntax:
string will not fullyMatch regex ("""(-)?(\d+)(\.\d*)?""") ^
The regular expression passed following the regex
token can be either a String
or a scala.util.matching.Regex
.
This method enables the following syntax, where badBook
is, for example, of type Book
and
title ("One Hundred Years of Solitude")
results in a HavePropertyMatcher[Book]
:
This method enables the following syntax, where badBook
is, for example, of type Book
and
title ("One Hundred Years of Solitude")
results in a HavePropertyMatcher[Book]
:
book will not have (title ("One Hundred Years of Solitude")) ^
Enables parentheses to be placed around size (N)
in expressions of the
form: will not have (size (N))
.
Enables parentheses to be placed around size (N)
in expressions of the
form: will not have (size (N))
.
Enables parentheses to be placed around length (N)
in expressions of the
form: will not have (length (N))
.
Enables parentheses to be placed around length (N)
in expressions of the
form: will not have (length (N))
.
This method enables the following syntax:
This method enables the following syntax:
string will not include ("world") ^
This method enables the following syntax:
This method enables the following syntax:
string will not include regex ("wo.ld") ^
The regular expression passed following the regex
token can be either a String
or a scala.util.matching.Regex
.
This method enables the following syntax:
This method enables the following syntax:
result will not matchPattern { case Person("Bob", _) => } ^
This method enables the following syntax:
This method enables the following syntax:
"eight" will not startWith ("1.7") ^
This method enables the following syntax:
This method enables the following syntax:
string will not startWith regex ("Hel*o") ^
The regular expression passed following the regex
token can be either a String
or a scala.util.matching.Regex
.
Overrides toString to return pretty text.
Overrides toString to return pretty text.
The deprecation period for the "be ===" syntax has expired, and the syntax
will now throw NotAllowedException
. Please use will equal, will ===, willEqual,
will be, or willBe instead.
The deprecation period for the "be ===" syntax has expired, and the syntax
will now throw NotAllowedException
. Please use will equal, will ===, willEqual,
will be, or willBe instead.
Note: usually syntax will be removed after its deprecation period. This was left in because otherwise the syntax could in some cases still compile, but silently wouldn't work.
The deprecation period for the be === syntax has expired. Please use will equal, will ===, willEqual, will be, or willBe instead.
This class is part of the ScalaTest matchers DSL. Please see the documentation for
Matchers
for an overview of the matchers DSL.