com.bdmendes.smockito

Members list

Type members

Classlikes

object MockedMethod

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
object Smockito

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Smockito.type
trait Smockito

The trait to mix in for using Smockito facilities in a specification. It includes the mock and spy methods for creating mocks, and the various syntax extensions on them, such as on, calls and times. Those extensions expect method references via context functions with a Mock context parameter, retrievable via the it method.

The trait to mix in for using Smockito facilities in a specification. It includes the mock and spy methods for creating mocks, and the various syntax extensions on them, such as on, calls and times. Those extensions expect method references via context functions with a Mock context parameter, retrievable via the it method.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object Stubber

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Stubber.type
class Stubber[T <: AnyRef, N <: Tuple, A <: Tuple, R]

Configures a mocked method's response based on its one-based call number and arguments. Calls with an unmatched call number or arguments throw an exception.

Configures a mocked method's response based on its one-based call number and arguments. Calls with an unmatched call number or arguments throw an exception.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Types

type Arguments[N <: Tuple, A <: Tuple] = A match { case EmptyTuple => Unit case Tuple1[h] => h case Tuple => NamedTuple[N, A] }

Arguments, as required by stubs and yielded by verifications, are of the most convenient shape to the caller: a scalar for single argument methods and a named tuple for multi-argument methods.

Arguments, as required by stubs and yielded by verifications, are of the most convenient shape to the caller: a scalar for single argument methods and a named tuple for multi-argument methods.

Attributes

opaque type Mock[+T <: AnyRef]

A Mock represents a type mocked by Mockito.

A Mock represents a type mocked by Mockito.

Attributes

opaque type MockedMethod[A <: Tuple, R]

The internal representation of a method to mock. The compiler synthesizes conversions from functions and values to this type, for up to 22 parameters, via implicit conversions.

The internal representation of a method to mock. The compiler synthesizes conversions from functions and values to this type, for up to 22 parameters, via implicit conversions.

Attributes

opaque type Spy[+T <: AnyRef]

A Spy is a mock whose answer is to forward all method calls to a real instance.

A Spy is a mock whose answer is to forward all method calls to a real instance.

Attributes