fn oxlMockUnmatched
A call no arm of the mock matches (or an arm whose responses are used up): the test fails with the call (§18.3); the caller of the rpc sees an internal error.
Example:
service Ledger {
@public rpc note(n: i64) -> i64
}
impl Ledger {
rpc note(n) => n
}
// a call no arm matches (here `note(2)`) fails the test; the arm below answers `note(1)`
test "the expected call is answered" {
mock Ledger {
note(1) => 1
}
assert_eq(Ledger.note(1)!, 1)
}pub(api) fn oxlMockUnmatched(why: str) -> neverSince. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
why | str |
Returns
never
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/testing.oxl:236