final class JMockExpectations extends Expectations
Subclass of org.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"))
- Source
- JMockExpectations.scala
- Alphabetic
- By Inheritance
- JMockExpectations
- Expectations
- AbstractExpectations
- ActionClause
- ArgumentConstraintPhrases
- CardinalityClause
- ExpectationBuilder
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new JMockExpectations()
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addParameterMatcher(arg0: Matcher[_ <: AnyRef]): Unit
- Attributes
- protected[org.jmock]
- Definition Classes
- AbstractExpectations
- def allowing[T <: AnyRef](arg0: T): T
- Definition Classes
- AbstractExpectations → CardinalityClause
- def allowing(arg0: Matcher[_ <: AnyRef]): MethodClause
- Definition Classes
- AbstractExpectations → CardinalityClause
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def atLeast(arg0: Int): ReceiverClause
- Definition Classes
- AbstractExpectations → CardinalityClause
- def atMost(arg0: Int): ReceiverClause
- Definition Classes
- AbstractExpectations → CardinalityClause
- def between(arg0: Int, arg1: Int): ReceiverClause
- Definition Classes
- AbstractExpectations → CardinalityClause
- def buildExpectations(arg0: Action, arg1: ExpectationCollector): Unit
- Definition Classes
- AbstractExpectations → ExpectationBuilder
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def currentBuilder(): InvocationExpectationBuilder
- Attributes
- protected[org.jmock]
- Definition Classes
- AbstractExpectations
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def exactly(arg0: Int): ReceiverClause
- Definition Classes
- AbstractExpectations → CardinalityClause
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def ignoring(arg0: Matcher[_ <: AnyRef]): MethodClause
- Definition Classes
- AbstractExpectations → CardinalityClause
- def ignoring[T <: AnyRef](arg0: T): T
- Definition Classes
- AbstractExpectations → CardinalityClause
- def inSequence(arg0: Sequence): Unit
- Definition Classes
- AbstractExpectations
- def inSequences(arg0: <repeated...>[Sequence]): Unit
- Definition Classes
- AbstractExpectations
- Annotations
- @transient()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def never[T <: AnyRef](arg0: T): T
- Definition Classes
- AbstractExpectations → CardinalityClause
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def one[T <: AnyRef](arg0: T): T
- Definition Classes
- AbstractExpectations → CardinalityClause
- def oneOf[T <: AnyRef](arg0: T): T
- Definition Classes
- AbstractExpectations → CardinalityClause
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def then(arg0: State): Unit
- Definition Classes
- AbstractExpectations
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- def when(arg0: StatePredicate): Unit
- Definition Classes
- AbstractExpectations
- def will(arg0: Action): Unit
- Definition Classes
- AbstractExpectations → ActionClause
- def with(arg0: Matcher[Double]): Double
- Definition Classes
- Expectations
- def with(arg0: Matcher[Float]): Float
- Definition Classes
- Expectations
- def with(arg0: Matcher[Long]): Long
- Definition Classes
- Expectations
- def with(arg0: Matcher[Integer]): Int
- Definition Classes
- Expectations
- def with(arg0: Matcher[Character]): Char
- Definition Classes
- Expectations
- def with(arg0: Matcher[Short]): Short
- Definition Classes
- Expectations
- def with(arg0: Matcher[Byte]): Byte
- Definition Classes
- Expectations
- def with(arg0: Matcher[Boolean]): Boolean
- Definition Classes
- Expectations
- def with[T <: AnyRef](arg0: T): T
- Definition Classes
- AbstractExpectations
- def with(arg0: Double): Double
- Definition Classes
- AbstractExpectations
- def with(arg0: Float): Float
- Definition Classes
- AbstractExpectations
- def with(arg0: Long): Long
- Definition Classes
- AbstractExpectations
- def with(arg0: Int): Int
- Definition Classes
- AbstractExpectations
- def with(arg0: Char): Char
- Definition Classes
- AbstractExpectations
- def with(arg0: Short): Short
- Definition Classes
- AbstractExpectations
- def with(arg0: Byte): Byte
- Definition Classes
- AbstractExpectations
- def with(arg0: Boolean): Boolean
- Definition Classes
- AbstractExpectations
- def with[T <: AnyRef](arg0: Matcher[T]): T
- Definition Classes
- AbstractExpectations → ArgumentConstraintPhrases
- def withArg(matcher: Matcher[Char]): Char
Invokes
withon this instance, passing in the passed matcher. - def withArg(matcher: Matcher[Double]): Double
Invokes
withon this instance, passing in the passed matcher. - def withArg(matcher: Matcher[Float]): Float
Invokes
withon this instance, passing in the passed matcher. - def withArg(matcher: Matcher[Boolean]): Boolean
Invokes
withon this instance, passing in the passed matcher. - def withArg(matcher: Matcher[Long]): Long
Invokes
withon this instance, passing in the passed matcher. - def withArg(matcher: Matcher[Byte]): Byte
Invokes
withon this instance, passing in the passed matcher. - def withArg(matcher: Matcher[Short]): Short
Invokes
withon this instance, passing in the passed matcher. - def withArg(matcher: Matcher[Int]): Int
Invokes
withon this instance, passing in the passed matcher. - def withArg[T](matcher: Matcher[T]): T
Invokes
withon this instance, passing in the passed matcher. - def withArg(value: Char): Char
Invokes
withon this instance, passing in the passed value. - def withArg(value: Double): Double
Invokes
withon this instance, passing in the passed value. - def withArg(value: Float): Float
Invokes
withon this instance, passing in the passed value. - def withArg(value: Boolean): Boolean
Invokes
withon this instance, passing in the passed value. - def withArg(value: Long): Long
Invokes
withon this instance, passing in the passed value. - def withArg(value: Byte): Byte
Invokes
withon this instance, passing in the passed value. - def withArg(value: Short): Short
Invokes
withon this instance, passing in the passed value. - def withArg(value: Int): Int
Invokes
withon this instance, passing in the passed value. - def withArg[T](value: T): T
Invokes
withon this instance, passing in the passed value.
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated