Packages

c

org.scalamock.stubs

StubbedZIOMethod0

class StubbedZIOMethod0[R] extends StubbedMethod0[R]

Representation of stubbed method without arguments.

ZIOStubs interface provides implicit conversion from selected method to StubbedMethodZIO0.

trait Foo:
  def foo00(): String
  def fooIO: IO[String, Int]

val foo = stub[Foo]

The default way of getting stub for such method - convert it to a function () => R.

Exclusively for ZIO - you can omit converting it to function

val foo00Stubbed: StubbedMethod0[String] = () => foo.foo00()
val fooIOStubbed: StubbedMethod0[IO[String, Int]] = foo.fooIO
Linear Supertypes
StubbedMethod0[R], Order, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StubbedZIOMethod0
  2. StubbedMethod0
  3. Order
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new StubbedZIOMethod0(delegate: StubbedMethod0[R])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def asString: String

    Returns string representation of method.

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

    Definition Classes
    StubbedZIOMethod0 → Order
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. 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.

    Definition Classes
    StubbedZIOMethod0 → Order
  13. 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.

    Definition Classes
    StubbedZIOMethod0 → Order
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. def returns(f: ⇒ R): Unit

    Allows to set result for method without arguments.

    Allows to set result for method without arguments.

    (() => foo.foo00()).returns("result")
    foo.fooIO.returns(ZIO.succeed(1))
    Definition Classes
    StubbedZIOMethod0 → StubbedMethod0
  19. def returnsZIO(f: ⇒ R): UIO[Unit]

    Allows to set result for method without arguments.

    Allows to set result for method without arguments. Returns ZIO.

    for {
      _ <- (() => foo.foo00()).returnsZIO("result")
      _ <- foo.fooIO.returnsZIO(ZIO.succeed(1))
    } yield ()
  20. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  21. def times: Int

    Allows to get number of times method was executed.

    Allows to get number of times method was executed.

    for {
      _ <- foo.fooIO.returnsZIO(ZIO.succeed(1))
      _ <- foo.fooIO.repeatN(10)
    } yield foo.fooIO.times == 11 // true
    Definition Classes
    StubbedZIOMethod0 → StubbedMethod0
  22. def timesZIO: UIO[Int]

    Allows to get number of times method was executed.

    Allows to get number of times method was executed. Returns ZIO

    for {
      _ <- foo.fooIO.returnsZIO(ZIO.succeed(1))
      _ <- foo.fooIO.repeatN(10)
      fooIOTimes <- foo.fooIO.timesZIO
    } yield fooIOTimes == 11 // true
  23. def toString(): String
    Definition Classes
    StubbedZIOMethod0 → AnyRef → Any
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from StubbedMethod0[R]

Inherited from Order

Inherited from AnyRef

Inherited from Any

Ungrouped