package stubs
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- stubs
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Type Members
-
class
CallLog extends AnyRef
Allows to check order of executed methods.
Allows to check order of executed methods. Should be declared before stub generation
-
abstract
type
Stub[+T] <: T
Indicates that object of type T was generated
-
trait
StubbedMethod[A, R] extends Order
Representation of stubbed method with arguments.
Representation of stubbed method with arguments.
Stubs interface provides implicit conversions from selected method to StubbedMethod.
trait Foo: def foo(x: Int): Int def fooBar(bar: Boolean, baz: String): String val foo = stub[Foo]
Scala 2
val fooStubbed: StubbedMethod[Int, Int] = foo.foo _ val fooBarStubbed: StubbedMethod[(Boolean, String), String] = foo.fooBar _
Scala 3
val fooStubbed: StubbedMethod[Int, Int] = foo.foo val fooBarStubbed: StubbedMethod[(Boolean, String), String] = foo.fooBar
-
trait
StubbedMethod0[R] extends Order
Representation of stubbed method without arguments.
Representation of stubbed method without arguments.
Stubs interface provides implicit conversion from selected method to StubbedMethod0
You need to explicitly convert it to a function () => R
trait Foo: def foo0: Int def foo00(): String val foo = stub[Foo] val foo0Stubbed: StubbedMethod0[Int] = () => foo.foo0 val foo00Stubbed: StubbedMethod0[String] = () => foo.foo00()
- trait Stubs extends StubsBase
Value Members
- object CallLog
- object StubbedMethod
ScalaMock
This is the documentation for ScalaMock
For an overview, see org.scalamock.