PropertyProxy

Proxy in order to stub/mock property behaviour.

Author

Matthias Geisler

Parameters

Value

the value type of the hosting PropertyProxy.

Functions

clear
Link copied to clipboard
common
abstract fun clear()
Clears the Proxies captured arguments
get
Link copied to clipboard
common
abstract operator fun get(callIndex: Int): KMockContract.GetOrSet
Alias for getArgumentsForCall
getArgumentsForCall
Link copied to clipboard
common
abstract fun getArgumentsForCall(callIndex: Int): KMockContract.GetOrSet
Resolves given arguments of an invocation.
returns
Link copied to clipboard
common
abstract infix override fun returns(value: Value)
Alias setter of get.
returnsMany
Link copied to clipboard
common
abstract infix override fun returnsMany(values: List<Value>)
Alias getMany get.
runOnGet
Link copied to clipboard
common
abstract infix fun runOnGet(sideEffect: () -> Value)
Alias setter of getSideEffect.
runOnSet
Link copied to clipboard
common
abstract infix fun runOnSet(sideEffect: (Value) -> Unit)
Alias setter of set.

Properties

calls
Link copied to clipboard
common
abstract val calls: Int
Counter of the actual invocations of the Proxy.
frozen
Link copied to clipboard
common
abstract val frozen: Boolean
Indicates that the proxies uses the frozen memory model.
get
Link copied to clipboard
common
abstract var get: () -> Value
Setter/Getter in order to set/get custom SideEffect for the properties getter.
getMany
Link copied to clipboard
common
abstract var getMany: List<Value>
getValue
Link copied to clipboard
common
abstract var getValue: Value
Setter/Getter in order to set/get constant Value of the property.
getValues
Link copied to clipboard
common
abstract var getValues: List<Value>
Setter/Getter in order to set/get a List of Values of the property.
id
Link copied to clipboard
common
abstract val id: String
Unique Id of the Proxy derived from the Interface which it build upon.
set
Link copied to clipboard
common
abstract var set: (Value) -> Unit
Setter/Getter in order to set/get custom SideEffect for the properties setter.