StubbedIOMethod0

org.scalamock.stubs.StubbedIOMethod0
class StubbedIOMethod0[R](delegate: StubbedMethod0[R]) extends StubbedMethod0[R]

Same as StubbedMethod0, but with additional IO methods.

Attributes

Graph
Supertypes
trait StubbedMethod0[R]
trait Order
class Object
trait Matchable
class Any

Members list

Type members

Inherited types

type Result = R

Attributes

Inherited from:
StubbedMethod0

Value members

Concrete methods

def asString: String

Returns string representation of method. Representation currently depends on scala version.

Returns string representation of method. Representation currently depends on scala version.

Attributes

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

Attributes

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

Attributes

def returns[RR](f: => RR)(implicit ev: RR <:< Result): Unit

Allows to set result for method without arguments.

Allows to set result for method without arguments.

Scala 3

 foo.foo00().returns("abc")
 foo.foo00() // "abc"

Scala 2

  (() => foo.foo00()).returns("abc")
  foo.foo00() // "abc"

Attributes

def returnsIO(f: => Result): IO[Unit]
def times: Int

Allows to get number of times method was executed.

Allows to get number of times method was executed.

Scala 3

 foo.foo0.returns(5)
 foo.foo0
 foo.foo0

 foo.foo0.times // 2

Scala 2

  (() => foo.foo0).returns(5)
  foo.foo0
  foo.foo0

  (() => foo.foo0).times // 2

Attributes

def timesIO: IO[Int]
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any