Packages

class Internal[A, R] extends StubbedMethod[A, R]

Linear Supertypes
StubbedMethod[A, R], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Internal
  2. StubbedMethod
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Internal(asString: String, callLog: Option[CallLog], io: Option[StubIO])

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. val asString: String

    Returns string representation of method.

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

    Definition Classes
    InternalStubbedMethod
  6. def calls: List[A]

    Allows to get arguments with which method was executed.

    Allows to get arguments with which method was executed. Returns multiple arguments as tuple. One list item per call.

    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)
    Definition Classes
    InternalStubbedMethod
  7. def clear(): Unit
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. def impl(args: A): R
  15. def isAfter(other: StubbedMethod[_, _])(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
    Definition Classes
    InternalStubbedMethod
  16. def isBefore(other: StubbedMethod[_, _])(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
    Definition Classes
    InternalStubbedMethod
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. def returns(f: (A) ⇒ R): Unit

    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"
    }
    Definition Classes
    InternalStubbedMethod
  22. def returnsWith(value: ⇒ R): Unit

    Allows to set result for method with arguments.

    Allows to set result for method with arguments.

    Scala 3

    foo.fooBar.returnsWith("true")

    Scala 2

    (foo.fooBar _).returnsWith("true")
    Definition Classes
    InternalStubbedMethod
  23. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  24. def times: Int

    Allows to get number of times method was executed.

    Allows to get number of times method was executed.

    Scala 3

    foo.foo.returns(x => 5)
    foo.foo(1)
    
    foo.foo.times // 1

    Scala 2

    (foo.foo _).returns(_ => 5)
    foo.foo(1)
    
    (foo.foo _).times // 1
    Definition Classes
    InternalStubbedMethod
  25. final def times(args: A): Int

    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
    Definition Classes
    StubbedMethod
  26. def toString(): String
    Definition Classes
    Internal → AnyRef → Any
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from StubbedMethod[A, R]

Inherited from AnyRef

Inherited from Any

Ungrouped