Packages

package stubs

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. stubs
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class CallLog extends AnyRef

    Allows to check order of executed methods.

    Allows to check order of executed methods. Should be declared before stub generation

  2. abstract type Stub[+T] <: T

    Indicates that object of type T was generated

  3. 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
  4. 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()
  5. trait Stubs extends StubsBase

Value Members

  1. object CallLog
  2. object StubbedMethod

Inherited from AnyRef

Inherited from Any

Ungrouped