This method enables syntax such as the following:
This method enables syntax such as the following:
string will compile ^
This method enables syntax such as the following:
This method enables syntax such as the following:
string will fullyMatch regex ("""(-)?(\d+)(\.\d*)?""") ^
Supports the registration of subject descriptions with after words
in WordSpec
and fixture.WordSpec
.
Supports the registration of subject descriptions with after words
in WordSpec
and fixture.WordSpec
.
For example, this method enables syntax such as the following in WordSpec
and fixture.WordSpec
:
def provide = afterWord("provide") "The ScalaTest Matchers DSL" will provide { ^
WordSpec
passes in a function via the implicit parameter that takes
two strings and a ResultOfAfterWordApplication
and results in Unit
. This method
simply invokes this function, passing in leftSideString, the verb string
"will"
, and the ResultOfAfterWordApplication
passed to will
.
Supports the registration of subject descriptions in WordSpec
and fixture.WordSpec
.
Supports the registration of subject descriptions in WordSpec
and fixture.WordSpec
.
For example, this method enables syntax such as the following in WordSpec
and fixture.WordSpec
:
"A Stack (when empty)" will { ... ^
WordSpec
passes in a function via the implicit parameter of type StringVerbBlockRegistration
,
a function that takes two strings and a no-arg function and results in Unit
. This method
simply invokes this function, passing in leftSideString, the verb string
"will"
, and the right by-name parameter transformed into a
no-arg function.
Supports shared test registration in FlatSpec
and fixture.FlatSpec
.
Supports shared test registration in FlatSpec
and fixture.FlatSpec
.
For example, this method enables syntax such as the following in FlatSpec
and fixture.FlatSpec
:
"A Stack (with one item)" will behave like nonEmptyStack(stackWithOneItem, lastValuePushed) ^
FlatSpec
and fixture.FlatSpec
passes in a function via the implicit parameter that takes
a string and results in a BehaveWord
. This method
simply invokes this function, passing in leftSideString, and returns the result.
Supports test registration in FlatSpec
and fixture.FlatSpec
.
Supports test registration in FlatSpec
and fixture.FlatSpec
.
For example, this method enables syntax such as the following in FlatSpec
and fixture.FlatSpec
:
"A Stack (when empty)" will "be empty" in { ... } ^
FlatSpec
passes in a function via the implicit parameter that takes
three strings and results in a ResultOfStringPassedToVerb
. This method
simply invokes this function, passing in leftSideString, the verb string
"will"
, and right, and returns the result.
This method enables syntax such as the following:
This method enables syntax such as the following:
string will endWith regex ("world") ^
This method enables syntax such as the following:
This method enables syntax such as the following:
string will startWith regex ("hello") ^
This method enables syntax such as the following:
This method enables syntax such as the following:
string will include regex ("hi") ^
This method enables syntax such as the following:
This method enables syntax such as the following:
file will not (exist) ^
This method enables syntax such as the following:
This method enables syntax such as the following:
file will exist ^
This method enables syntax such as the following:
This method enables syntax such as the following:
xs will contain oneOf (1, 2, 3) ^
This method enables syntax such as the following:
This method enables syntax such as the following:
result will have length (3) ^ result will have size (3) ^
This method enables syntax such as the following:
This method enables syntax such as the following:
result will be a aMatcher ^
This method enables syntax such as the following:
This method enables syntax such as the following:
result will === (100 +- 1) ^
This method enables syntax such as the following:
This method enables syntax such as the following:
a will === (b) ^
This method enables syntax such as the following:
This method enables syntax such as the following:
result will not equal (3) ^
This method enables syntax such as the following:
This method enables syntax such as the following:
result will (equal (expected) and have length 3) ^
This method enables syntax such as the following:
This method enables syntax such as the following:
result will equal (3) ^
This method enables syntax such as the following:
This method enables syntax such as the following:
result will be (3) ^
This method enables the following syntax, where excellentRead
refers to a BePropertyMatcher[Book]
:
This method enables the following syntax, where excellentRead
refers to a BePropertyMatcher[Book]
:
programmingInScala willBe an (excellentRead) ^
This method enables the following syntax, where goodRead
refers to a BePropertyMatcher[Book]
:
This method enables the following syntax, where goodRead
refers to a BePropertyMatcher[Book]
:
programmingInScala willBe a (goodRead) ^
This method enables the following syntax, where excellentRead
refers to a BePropertyMatcher[Book]
:
This method enables the following syntax, where excellentRead
refers to a BePropertyMatcher[Book]
:
programmingInScala willBe excellentRead ^
This method enables syntax such as the following:
This method enables syntax such as the following:
result willBe theSameInstanceAs (anotherObject) ^
This method enables syntax such as the following:
This method enables syntax such as the following:
result willBe null ^
This method enables syntax such as the following:
This method enables syntax such as the following:
result willBe defined ^
This method enables syntax such as the following:
This method enables syntax such as the following:
result willBe empty ^
This method enables syntax such as the following:
This method enables syntax such as the following:
result willBe writable ^
This method enables syntax such as the following:
This method enables syntax such as the following:
result willBe readable ^
This method enables syntax such as the following:
This method enables syntax such as the following:
aDouble willBe an [Book] ^
This method enables syntax such as the following:
This method enables syntax such as the following:
aDouble willBe a [Book] ^
This method enables syntax such as the following:
This method enables syntax such as the following:
result willBe sorted ^
This method enables syntax such as the following:
This method enables syntax such as the following:
result willBe 7.1 +- 0.2 ^
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]
:
testing 1 willBe odd ^
This method enables syntax such as the following:
This method enables syntax such as the following:
8 willBe >= (7) ^
This method enables syntax such as the following:
This method enables syntax such as the following:
5 willBe <= (7) ^
This method enables syntax such as the following:
This method enables syntax such as the following:
8 willBe > (7) ^
This method enables syntax such as the following:
This method enables syntax such as the following:
5 willBe < (7) ^
This method enables syntax such as the following:
This method enables syntax such as the following:
aDouble willBe 8.8 ^
This method enables syntax such as the following:
This method enables syntax such as the following:
result willEqual null ^
This method enables syntax such as the following:
This method enables syntax such as the following:
result willEqual 7.1 +- 0.2 ^
This method enables syntax such as the following:
This method enables syntax such as the following:
a willEqual b ^
This method enables syntax such as the following:
This method enables syntax such as the following:
string willNot typeCheck ^
This method enables syntax such as the following:
This method enables syntax such as the following:
string willNot compile ^
This method enables syntax such as the following:
This method enables syntax such as the following:
string willNot fullyMatch regex ("""(-)?(\d+)(\.\d*)?""") ^
This method enables syntax such as the following:
This method enables syntax such as the following:
string willNot include regex ("hi") ^
This method enables syntax such as the following:
This method enables syntax such as the following:
string willNot endWith regex ("world") ^
This method enables syntax such as the following:
This method enables syntax such as the following:
string willNot startWith regex ("hello") ^
This method enables syntax such as the following:
This method enables syntax such as the following:
file willNot exist ^
This method enables syntax such as the following:
This method enables syntax such as the following:
xs willNot contain (oneOf (1, 2, 3)) ^
This method enables syntax such as the following:
This method enables syntax such as the following:
result willNot have length (3) ^ result willNot have size (3) ^ exception willNot have message ("file not found") ^
This method enables syntax such as the following:
This method enables syntax such as the following:
result willNot (be readable) ^
This method enables syntax such as the following:
This method enables syntax such as the following:
result willNot (be (3)) ^
This method enables syntax such as the following:
This method enables syntax such as the following:
result willNot be (3) ^
This method enables syntax such as the following:
This method enables syntax such as the following:
string will fullyMatch regex ("a(b*)c" withGroup "bb") ^
This method enables syntax such as the following:
This method enables syntax such as the following:
string will fullyMatch regex ("a(b*)(c*)" withGroups ("bb", "cc")) ^
This class is part of the ScalaTest matchers DSL. Please see the documentation for
Matchers
for an overview of the matchers DSL.This class is used in conjunction with an implicit conversion to enable
will
methods to be invoked onString
s.