Instance Constructors
-
new
JMockExpectations
()
Value Members
-
def
!=
(arg0: AnyRef): Boolean
-
def
!=
(arg0: Any): Boolean
-
def
##
(): Int
-
def
==
(arg0: AnyRef): Boolean
-
def
==
(arg0: Any): Boolean
-
def
allowing
[T]
(arg0: T): T
-
def
allowing
(arg0: org.hamcrest.Matcher[_]): MethodClause
-
def
asInstanceOf
[T0]
: T0
-
def
atLeast
(arg0: Int): ReceiverClause
-
def
atMost
(arg0: Int): ReceiverClause
-
def
between
(arg0: Int, arg1: Int): ReceiverClause
-
def
buildExpectations
(arg0: Action, arg1: ExpectationCollector): Unit
-
def
clone
(): AnyRef
-
def
currentBuilder
(): InvocationExpectationBuilder
-
def
eq
(arg0: AnyRef): Boolean
-
def
equals
(arg0: Any): Boolean
-
def
exactly
(arg0: Int): ReceiverClause
-
def
finalize
(): Unit
-
def
getClass
(): java.lang.Class[_]
-
def
hashCode
(): Int
-
def
ignoring
(arg0: org.hamcrest.Matcher[_]): MethodClause
-
def
ignoring
[T]
(arg0: T): T
-
def
inSequence
(arg0: Sequence): Unit
-
def
inSequences
(arg0: <repeated...>[Sequence]): Unit
-
def
isInstanceOf
[T0]
: Boolean
-
def
ne
(arg0: AnyRef): Boolean
-
def
never
[T]
(arg0: T): T
-
def
notify
(): Unit
-
def
notifyAll
(): Unit
-
def
one
[T]
(arg0: T): T
-
def
oneOf
[T]
(arg0: T): T
-
def
synchronized
[T0]
(arg0: ⇒ T0): T0
-
def
then
(arg0: State): Unit
-
def
toString
(): String
-
def
wait
(): Unit
-
def
wait
(arg0: Long, arg1: Int): Unit
-
def
wait
(arg0: Long): Unit
-
def
when
(arg0: StatePredicate): Unit
-
def
will
(arg0: Action): Unit
-
def
with
[T]
(arg0: T): T
-
def
with
(arg0: Double): Double
-
def
with
(arg0: Float): Float
-
def
with
(arg0: Long): Long
-
def
with
(arg0: Int): Int
-
def
with
(arg0: Char): Char
-
def
with
(arg0: Short): Short
-
def
with
(arg0: Byte): Byte
-
def
with
(arg0: Boolean): Boolean
-
def
with
(arg0: Matcher[Double]): Double
-
def
with
(arg0: Matcher[Float]): Float
-
def
with
(arg0: Matcher[Long]): Long
-
def
with
(arg0: Matcher[Integer]): Int
-
def
with
(arg0: Matcher[Character]): Char
-
def
with
(arg0: Matcher[Short]): Short
-
def
with
(arg0: Matcher[Byte]): Byte
-
def
with
(arg0: Matcher[Boolean]): Boolean
-
def
with
[T]
(arg0: Matcher[T]): T
-
def
withArg
(matcher: Matcher[Char]): Char
-
def
withArg
(matcher: Matcher[Double]): Double
-
def
withArg
(matcher: Matcher[Float]): Float
-
def
withArg
(matcher: Matcher[Boolean]): Boolean
-
def
withArg
(matcher: Matcher[Long]): Long
-
def
withArg
(matcher: Matcher[Byte]): Byte
-
def
withArg
(matcher: Matcher[Short]): Short
-
def
withArg
(matcher: Matcher[Int]): Int
-
def
withArg
[T]
(matcher: Matcher[T]): T
-
def
withArg
(value: Char): Char
-
def
withArg
(value: Double): Double
-
def
withArg
(value: Float): Float
-
def
withArg
(value: Boolean): Boolean
-
def
withArg
(value: Long): Long
-
def
withArg
(value: Byte): Byte
-
def
withArg
(value: Short): Short
-
def
withArg
(value: Int): Int
-
def
withArg
[T]
(value: T): T
Inherited from Expectations
Inherited from ActionClause
Inherited from ArgumentConstraintPhrases
Inherited from CardinalityClause
Inherited from ExpectationBuilder
Inherited from AnyRef
Inherited from Any
Subclass of
org.jmock.Expectationsthat provideswithArgalternatives to thewithmethods defined in its superclass.JMockCycle'sexpectingmethod of passes an instance of this class to the function passed intoexpectations. BecauseJMockExpectationsextendsorg.jmock.Expectations, all of theExpectationsmethods are available to be invoked on instances of this class, in addition to several overloadedwithArgmethods defined in this class. ThesewithArgmethods simply invoke correspondingwithmethods onthis. Becausewithis a keyword in Scala, to invoke these directly you must surround them in back ticks, like this:By importing the members of the
JMockExpectationsobject passed to aJMockCycle'sexecutingmethod, you can instead callwithArgwith no back ticks needed:oneOf (mockCollaborator).documentAdded(withArg("Document"))