Package-level declarations

Types

Link copied to clipboard
class Asserter(coverAllInvocations: Boolean = false) : AsserterBase

Container which collects and holds actual references of proxy calls in a freezing manner. The references are ordered by their invocation. This is intended as default mode for Verification.

Link copied to clipboard
class NonFreezingAsserter(coverAllInvocations: Boolean = false) : AsserterBase

Container which collects and holds actual references of proxy calls in a non freezing manner. The references are ordered by their invocation.

Link copied to clipboard

Alias to NonFreezingAsserter.

Link copied to clipboard
typealias Verifier = Asserter

Alias to Asserter.

Functions

Link copied to clipboard
Link copied to clipboard

Asserts a chain of Expectations. Each Expectation must be in strict order of the referenced Proxy invocations and all invocations must be present.

Link copied to clipboard

Asserts Expectations of proxies. Each Expectation relates to a specific Proxy and they must be in order. Also multiple Proxies are allowed but no relation between them is covered (use assertOrder in this case).

Link copied to clipboard

Asserts a chain of Expectations in a coroutine Context. Each Expectation must be in strict order of the referenced Proxy invocations and all invocations must be present. Use that context only in combination with proxy access methods.

Link copied to clipboard
suspend fun asyncAssertProxy(action: suspend KMockContract.CloseableAssertionContext.() -> Unit)

Asserts Expectations of proxies in Coroutine Context. Each Expectation relates to a specific Proxy and they must be in order. Also multiple Proxies are allowed but no relation between them is covered (use assertOrder in this case). Use that context only in combination with proxy access methods.

Link copied to clipboard
suspend fun asyncVerify(exactly: Int? = null, atLeast: Int = 1, atMost: Int? = null, action: suspend KMockContract.VerificationContext.() -> KMockContract.Expectation)

Verifies the last produced VerificationHandle in a Coroutine Context. Use that context only in combination with proxy access methods.

Link copied to clipboard

Verifies a chain of Expectations in a Coroutine Context. Each Expectation must be in order but gaps are allowed. Also the chain does not need to be exhaustive. Use that context only in combination with proxy access methods.

Link copied to clipboard

Verifies a chain of Expectations in a Coroutine Context. Expectation between different proxies can contain gaps. Also the chain does not need to be exhaustive. Use that context only in combination with proxy access methods.

Link copied to clipboard

Operator to determine the symmetrical difference of 2 VerificationHandles call indices. Both handles must be refer to same Proxy.

Link copied to clipboard

Operator to determine the intersection of 2 VerificationHandles call indices. Both handles must be refer to same Proxy.

Link copied to clipboard
Link copied to clipboard

Operator to determine the union of 2 VerificationHandles call indices. Both handles must be refer to same Proxy.

Link copied to clipboard
fun verify(exactly: Int? = null, atLeast: Int = 1, atMost: Int? = null, action: KMockContract.VerificationContext.() -> KMockContract.Expectation)

Verifies the last produced VerificationHandle.

Link copied to clipboard

Verifies a chain of Expectations. Each Expectation must be in order but gaps are allowed. Also the chain does not need to be exhaustive.

Link copied to clipboard

Verifies a chain of Expectations. Expectation between different proxies can contain gaps. Also the chain does not need to be exhaustive.

Link copied to clipboard