fn oxlMockCallsOf
S.calls(.m) -> List<Call> (§18.3): the calls of one mocked rpc, oldest first (.count, [i], .all(c => …), D-7250);
svc is the service as written in the test (matched against the end of its qualified name, D-6103).
Example:
service Ledger {
@public rpc note(n: i64) -> i64
}
impl Ledger {
rpc note(n) => n
}
test "calls of a mocked rpc" {
mock Ledger {
note(n) => n
}
let _ = Ledger.note(7)
assert_eq(Ledger.calls(.note).count, 1)
}pub(api) fn oxlMockCallsOf(svc: str, m: str) -> List<Call>Complexity. O(calls).
Since. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
svc | str |
m | str |
Returns
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/testing.oxl:265