method str.oxlMockCalls
S.calls(.m) is rewritten by the compiler to "pkg.module.S".oxlMockCalls("m") (D-6106, D-7250).
Example:
service Ledger {
@public rpc note(n: i64) -> i64
}
impl Ledger {
rpc note(n) => n
}
test "calls are listed" {
mock Ledger {
note(n) => n
}
let _ = Ledger.note(1)
let _ = Ledger.note(2)
assert_eq(Ledger.calls(.note).count, 2)
}pub(api) fn oxlMockCalls(m: str) -> List<Call>Complexity. O(calls).
Since. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
m | str |
Returns
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/testing.oxl:304