trait
Spyable[A] extends Mockable[A]
Abstract Value Members
-
abstract
def
environment(mock: Mock): Has[A]
-
abstract
def
mock(environment: Has[A]): Mock
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
-
-
def
finalize(): Unit
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Spyable[A]models the capability to spy on a service of typeA. Implementations must define both a methodenvironmentto genereate a live environment given a mock and a methodmockto generate a mock given a live environment. Given these definitions, it is possible to convert a service to a mock, see and modify state based on method calls, inputs, and outputs, and then convert the mock back to a live environment to spy on the service.