ScalaTest 1.0
|
|
org/scalatest/verb/CanVerb.scala
]
final
class
StringCanWrapperForVerb(left : java.lang.String)
extends
AnyRefFlatSpec
, WordSpec
, FixtureFlatSpec
,
and FixtureWordSpec
.
This class is used in conjunction with an implicit conversion to enable can
methods to
be invoked on String
s.
Method Summary | |
def
|
can
(right : java.lang.String)(implicit fun : (java.lang.String, java.lang.String, java.lang.String) => ResultOfStringPassedToVerb) : ResultOfStringPassedToVerb
Supports test registration in
FlatSpec and FixtureFlatSpec . |
def
|
can
(right : => Unit)(implicit fun : StringVerbBlockRegistration) : Unit
Supports the registration of subject descriptions in
WordSpec
and FixtureWordSpec . |
def
|
can
(right : BehaveWord)(implicit fun : (java.lang.String) => BehaveWord) : BehaveWord
Supports shared test registration in
FlatSpec and FixtureFlatSpec . |
def
|
can
(resultOfAfterWordApplication : ResultOfAfterWordApplication)(implicit fun : (java.lang.String, java.lang.String, ResultOfAfterWordApplication) => Unit) : Unit
Supports the registration of subject descriptions with after words
in
WordSpec and FixtureWordSpec . |
Methods inherited from AnyRef | |
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Method Details |
def
can(right : java.lang.String)(implicit
fun : (java.lang.String, java.lang.String, java.lang.String) => ResultOfStringPassedToVerb) : ResultOfStringPassedToVerb
FlatSpec
and FixtureFlatSpec
.
For example, this method enables syntax such as the following in FlatSpec
and FixtureFlatSpec
:
"A Stack (when empty)" can "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 left, the verb string
"can"
, and right, and returns the result.
def
can(right : BehaveWord)(implicit
fun : (java.lang.String) => BehaveWord) : BehaveWord
FlatSpec
and FixtureFlatSpec
.
For example, this method enables syntax such as the following in FlatSpec
and FixtureFlatSpec
:
"A Stack (with one item)" can behave like nonEmptyStack(stackWithOneItem, lastValuePushed) ^
FlatSpec
and FixtureFlatSpec
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 left, and returns the result.
def
can(right : => Unit)(implicit
fun : StringVerbBlockRegistration) : Unit
WordSpec
and FixtureWordSpec
.
For example, this method enables syntax such as the following in WordSpec
and FixtureWordSpec
:
"A Stack (when empty)" can { ... ^
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 left, the verb string
"can"
, and the right by-name parameter transformed into a
no-arg function.
def
can(resultOfAfterWordApplication : ResultOfAfterWordApplication)(implicit
fun : (java.lang.String, java.lang.String, ResultOfAfterWordApplication) => Unit) : Unit
WordSpec
and FixtureWordSpec
.
For example, this method enables syntax such as the following in WordSpec
and FixtureWordSpec
:
def provide = afterWord("provide") "The ScalaTest Matchers DSL" can 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 left, the verb string
"can"
, and the ResultOfAfterWordApplication
passed to can
.
ScalaTest 1.0
|
|