|
ScalaTest 1.0
|
|
final
class
JMockExpectations
extends org.jmock.Expectations with AnyReforg.jmock.Expectations that provides withArg
alternatives to the with methods defined in its superclass.
JMockCycle's expecting method of passes an instance of this class
to the function passed into expectations. Because JMockExpectations
extends org.jmock.Expectations, all of the Expectations methods are
available to be invoked on instances of this class, in addition to
several overloaded withArg methods defined in this class. These withArg methods simply
invoke corresponding with methods on this. Because with is
a keyword in Scala, to invoke these directly you must surround them in back ticks, like this:
oneOf (mockCollaborator).documentAdded(`with`("Document"))
By importing the members of the JMockExpectations object passed to
a JMockCycle's executing method, you can
instead call withArg with no back ticks needed:
oneOf (mockCollaborator).documentAdded(withArg("Document"))
| Method Summary | |
def
|
withArg
(value : Float) : Float
Invokes
with on this instance, passing in the passed value. |
def
|
withArg
(matcher : org.hamcrest.Matcher[Float]) : Float
Invokes
with on this instance, passing in the passed matcher. |
def
|
withArg
(value : Double) : Double
Invokes
with on this instance, passing in the passed value. |
def
|
withArg
(matcher : org.hamcrest.Matcher[Boolean]) : Boolean
Invokes
with on this instance, passing in the passed matcher. |
def
|
withArg
(value : Boolean) : Boolean
Invokes
with on this instance, passing in the passed value. |
def
|
withArg
(matcher : org.hamcrest.Matcher[Long]) : Long
Invokes
with on this instance, passing in the passed matcher. |
def
|
withArg
(value : Char) : Char
Invokes
with on this instance, passing in the passed value. |
def
|
withArg
(matcher : org.hamcrest.Matcher[Byte]) : Byte
Invokes
with on this instance, passing in the passed matcher. |
def
|
withArg
(value : Long) : Long
Invokes
with on this instance, passing in the passed value. |
def
|
withArg
[T](value : T) : T
Invokes
with on this instance, passing in the passed value. |
def
|
withArg
[T](matcher : org.hamcrest.Matcher[T]) : T
Invokes
with on this instance, passing in the passed matcher. |
def
|
withArg
(value : Short) : Short
Invokes
with on this instance, passing in the passed value. |
def
|
withArg
(value : Int) : Int
Invokes
with on this instance, passing in the passed value. |
def
|
withArg
(matcher : org.hamcrest.Matcher[Int]) : Int
Invokes
with on this instance, passing in the passed matcher. |
def
|
withArg
(matcher : org.hamcrest.Matcher[Char]) : Char
Invokes
with on this instance, passing in the passed matcher. |
def
|
withArg
(matcher : org.hamcrest.Matcher[Double]) : Double
Invokes
with on this instance, passing in the passed matcher. |
def
|
withArg
(matcher : org.hamcrest.Matcher[Short]) : Short
Invokes
with on this instance, passing in the passed matcher. |
def
|
withArg
(value : Byte) : Byte
Invokes
with on this instance, passing in the passed value. |
| 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 |
with on this instance, passing in the passed value.with on this instance, passing in the passed value.with on this instance, passing in the passed value.with on this instance, passing in the passed value.with on this instance, passing in the passed value.with on this instance, passing in the passed value.with on this instance, passing in the passed value.with on this instance, passing in the passed value.with on this instance, passing in the passed value.
def
withArg[T](matcher : org.hamcrest.Matcher[T]) : T
with on this instance, passing in the passed matcher.
def
withArg(matcher : org.hamcrest.Matcher[Int]) : Int
with on this instance, passing in the passed matcher.
def
withArg(matcher : org.hamcrest.Matcher[Short]) : Short
with on this instance, passing in the passed matcher.
def
withArg(matcher : org.hamcrest.Matcher[Byte]) : Byte
with on this instance, passing in the passed matcher.
def
withArg(matcher : org.hamcrest.Matcher[Long]) : Long
with on this instance, passing in the passed matcher.
def
withArg(matcher : org.hamcrest.Matcher[Boolean]) : Boolean
with on this instance, passing in the passed matcher.
def
withArg(matcher : org.hamcrest.Matcher[Float]) : Float
with on this instance, passing in the passed matcher.
def
withArg(matcher : org.hamcrest.Matcher[Double]) : Double
with on this instance, passing in the passed matcher.
def
withArg(matcher : org.hamcrest.Matcher[Char]) : Char
with on this instance, passing in the passed matcher.|
ScalaTest 1.0
|
|