StubbedIOMethod
Same as StubbedMethod, but with additional IO methods.
Attributes
- Graph
-
- Supertypes
-
trait StubbedMethod[A, R]trait Orderclass Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
Returns string representation of method. Representation currently depends on scala version.
Returns string representation of method. Representation currently depends on scala version.
Attributes
Allows to get arguments with which method was executed.
Allows to get arguments with which method was executed.
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)
Attributes
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
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
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"
}
Attributes
Allows to get number of times method was executed.
Allows to get number of times method was executed.
Scala 3
foo.foo.returns(_ => 5)
foo.foo(1)
foo.foo.times // 1
Scala 2
(foo.foo _).returns(_ => 5)
foo.foo(1)
(foo.foo _).times // 1
Attributes
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
Inherited methods
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
Attributes
- Inherited from:
- StubbedMethod