class Internal[A, R] extends StubbedMethod[A, R] with StubbedMethod0[R]
- Alphabetic
- By Inheritance
- Internal
- StubbedMethod0
- StubbedMethod
- Order
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val asString: String
Returns string representation of method.
- def calls: List[A]
Allows to get arguments with which method was executed.
Allows to get arguments with which method was executed. Returns multiple arguments as tuple. One list item per call.
Scala 3
foo.foo.returns(_ => 5) foo.foo(1) foo.foo(100) foo.foo.calls // List(1, 100)
Scala 2
(foo.foo _).returns(_ => 5) foo.foo(1) foo.foo(100) (foo.foo _).calls // List(1, 100)
- Definition Classes
- Internal → StubbedMethod
- def clear(): Unit
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def impl(args: A): R
- def isAfter(other: Order)(implicit callLog: CallLog): Boolean
Returns true if this method was called after other method.
Returns true if this method was called after other method.
Scala 3
foo.foo.returns(_ => 5) foo.fooBar.returns(_ => "bar") foo.foo(1) foo.fooBar(true, "bar") foo.foo.isAfter(foo.fooBar) // false
Scala 2
(foo.foo _).returns(_ => 5) (foo.fooBar _).returns(_ => "bar") foo.foo(1) foo.fooBar(true, "bar") (foo.foo _).isAfter(foo.fooBar _) // false
- def isBefore(other: Order)(implicit callLog: CallLog): Boolean
Returns true if this method was called before other method.
Returns true if this method was called before other method.
Scala 3
foo.foo.returns(_ => 5) foo.fooBar.returns(_ => "bar") foo.foo(1) foo.fooBar(true, "bar") foo.foo.isBefore(foo.fooBar) // true
Scala 2
(foo.foo _).returns(_ => 5) (foo.fooBar _).returns(_ => "bar") foo.foo(1) foo.fooBar(true, "bar") (foo.foo _).isBefore(foo.fooBar _) // true
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def returns(f: => R): Unit
Allows to set result for method without arguments.
Allows to set result for method without arguments.
(() => foo.foo00()).returns("abc") foo.foo00() // "abc"
- Definition Classes
- Internal → StubbedMethod0
- def returns(f: (A) => R): Unit
Allows to set result for method with arguments.
Allows to set result for method with arguments.
Scala 3
foo.fooBar.returns: case (true, "bar") => "true" case _ => "false
Scala 2
(foo.fooBar _).returns { case (true, "bar") => "true" case _ => "false" }- Definition Classes
- Internal → StubbedMethod
- def returnsWith(value: => R): Unit
Allows to set result for method with arguments.
Allows to set result for method with arguments.
Scala 3
foo.fooBar.returnsWith("true")Scala 2
(foo.fooBar _).returnsWith("true")- Definition Classes
- Internal → StubbedMethod0 → StubbedMethod
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def times: Int
Allows to get number of times method was executed.
Allows to get number of times method was executed.
(() => foo.foo0).returns(5) foo.foo0 foo.foo0 (() => foo.foo0).times // 2
- Definition Classes
- Internal → StubbedMethod0 → StubbedMethod
- final def times(args: A): Int
Allows to get number of times method was executed with specific arguments.
Allows to get number of times method was executed with specific arguments.
Scala 3
foo.foo.returns(_ => 5) foo.foo(1) foo.foo.times(1) // 1 foo.foo.times(100) // 0
Scala 2
(foo.foo _).returns(_ => 5) foo.foo(1) (foo.foo _).times(1) // 1 (foo.foo _).times(100) // 0
- Definition Classes
- StubbedMethod
- def toString(): String
- Definition Classes
- Internal → AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- 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()
ScalaMock
This is the documentation for ScalaMock
For an overview, see org.scalamock.