Concordium / concordium-rust-smart-contracts

Libraries and tools for writing and testing smart contracts on Concordium
https://docs.rs/concordium-std/latest/concordium_std/
Mozilla Public License 2.0
57 stars 35 forks source link

Add helpers to check which mock functions were invoked #88

Closed Bargsteen closed 5 months ago

Bargsteen commented 2 years ago

Task description

In the test infrastructure, the TestHost has a number of helper methods for verifying the transfers that occurred. It should have the same options for mock functions. A bit of experimentation will likely be required to figure out what the helper methods should do and return.

The simplest option is something like: TestHost::mocks_invoked(&self) -> Vec<(ContractAddress, EntrypointName)>

But there could also be method that shows the parameter, amount, etc. used for each invocation of a mock function.

Sub-tasks

Bargsteen commented 5 months ago

The mentioned test infrastructure is now deprecated and replaced by https://docs.rs/concordium-smart-contract-testing/latest/concordium_smart_contract_testing/. Closing this issue, as it is no longer relevant.