eq
Matches if the value is equal to the provided value via the deepEquals function.
If matchers are being used, the eq argument matcher must be used to match literal values. When no matchers are used, literal arguments are automatically matched using eq.
Example:
class Calculator {
fun add(a: Int, b: Int) = a + b
}
val calculator = mockk<Calculator>()
every { calculator.add(any(), eq(5)) } returns 44
every { calculator.add(1, 2) returns 55Content copied to clipboard