fn oxlMockHit
How many earlier calls the mock arm key answered (the index of the response to give).
Example:
service Ledger {
@public rpc note(n: i64) -> i64
}
impl Ledger {
rpc note(n) => n
}
test "responses in turn" {
mock Ledger {
note(n) => [10, 20]
}
assert_eq(Ledger.note(1)!, 10)
assert_eq(Ledger.note(1)!, 20)
}pub(api) fn oxlMockHit(key: i64) -> i64С версии. 1.0.0-beta
Параметры
| Имя | Тип |
|---|---|
key | i64 |
Возвращает
i64
Эффекты
не объявлены (чистая, пока тело не говорит иное)
Определено в: std/core/testing.oxl:210