|
2 | 2 |
|
3 | 3 | Below is a showcase of various examples of unit testing real and sample Algorand Python smart contracts using `algorand-typescript-testing`. |
4 | 4 |
|
5 | | -| Contract Name | Test File | Key Features Demonstrated | Test versions of Algorand TypeScript Abstractions used | |
6 | | -| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | |
7 | | -| Auction | [contract.algo.ts](https://github.com/algorandfoundation/algorand-typescript-testing/blob/main/examples/auction/contract.algo.ts) | - Use of TestExecutionContext<br>- Mocking of global state and transaction fields<br>- Testing of ARC4 contract methods<br>- Emulation of asset creation and transfers<br>- Verification of inner transactions | - **arc4.Contract**<br>- **Global**<br>- **Txn**<br>- **Asset**<br>- **Account**<br>- **LocalState** | |
8 | | -| Proof of Attendance | [contract.algo.ts](https://github.com/algorandfoundation/algorand-python-testing/blob/main/examples/proof-of-attendance/contract.algo.ts) | - Creation and management of dummy assets<br>- Testing of box storage operations<br>- Verification of inner transactions for asset transfers<br>- Use of any\_\* methods for generating test data | - **arc4.Contract**<br>- **Box**<br>- **BoxMap**<br>- **Asset**<br>- **Account**<br>- **op** | |
9 | | -| Simple Voting | [contract.algo.ts](https://github.com/algorandfoundation/algorand-typescript-testing/blob/main/examples/simple-voting/contract.algo.ts) | - Testing of global and local state operations<br>- Verification of transaction group operations<br>- Mocking of payment transactions | - **BaseContract**<br>- **GlobalState**<br>- **LocalState**<br>- **Txn**<br>- **op.GTxn** | |
10 | | -| ZK Whitelist | [contract.algo.ts](https://github.com/algorandfoundation/algorand-typescript-testing/blob/main/examples/zk-whitelist/contract.algo.ts) | - Testing of zero-knowledge proof verification<br>- Mocking of external application calls<br>- Use of ARC4 types and methods | - **arc4.Contract**<br>- **arc4 types**<br>- **LocalState**<br>- **Global**<br>- **Txn** | |
11 | | -| HTLC LogicSig | [signature.algo.ts](https://github.com/algorandfoundation/algorand-typescript-testing/blob/main/examples/htlc-logicsig/signature.algo.ts) | - Testing of LogicSig contracts<br>- Verification of time-based conditions<br>- Mocking of transaction parameters | - **logicsig**<br>- **Account**<br>- **Txn**<br>- **Global**<br>- **op** | |
12 | | -| Marketplace | [contract.algo.ts](https://github.com/algorandfoundation/algorand-typescript-testing/blob/main/examples/marketplace/contract.algo.ts) | - Testing of complex marketplace operations<br>- Use of BoxMap for listings<br>- Testing of asset transfers and payments | - **arc4.Contract**<br>- **BoxMap**<br>- **Asset**<br>- **arc4 types**<br>- **Global**<br>- **Txn** | |
13 | | -| Scratch Storage | [contract.algo.ts](https://github.com/algorandfoundation/algorand-typescript-testing/blob/main/examples/scratch-storage/contract.algo.ts) | - Testing of scratch space usage<br>- Verification of scratch slot values | - **arc4.Contract**<br>- **Contract**<br>- **op** | |
| 5 | +| Contract Name | Test File | Key Features Demonstrated | Test versions of Algorand TypeScript Abstractions used | |
| 6 | +| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | |
| 7 | +| Auction | [contract.algo.ts](https://github.com/algorandfoundation/algorand-typescript-testing/blob/main/examples/auction/contract.algo.ts) | - Use of TestExecutionContext<br>- Mocking of global state and transaction fields<br>- Testing of ARC4 contract methods<br>- Emulation of asset creation and transfers<br>- Verification of inner transactions | - **arc4.Contract**<br>- **Global**<br>- **Txn**<br>- **Asset**<br>- **Account**<br>- **LocalState** | |
| 8 | +| Proof of Attendance | [contract.algo.ts](https://github.com/algorandfoundation/algorand-typescript-testing/blob/main/examples/proof-of-attendance/contract.algo.ts) | - Creation and management of dummy assets<br>- Testing of box storage operations<br>- Verification of inner transactions for asset transfers<br>- Use of any\_\* methods for generating test data | - **arc4.Contract**<br>- **Box**<br>- **BoxMap**<br>- **Asset**<br>- **Account**<br>- **op** | |
| 9 | +| Simple Voting | [contract.algo.ts](https://github.com/algorandfoundation/algorand-typescript-testing/blob/main/examples/simple-voting/contract.algo.ts) | - Testing of global and local state operations<br>- Verification of transaction group operations<br>- Mocking of payment transactions | - **BaseContract**<br>- **GlobalState**<br>- **LocalState**<br>- **Txn**<br>- **op.GTxn** | |
| 10 | +| ZK Whitelist | [contract.algo.ts](https://github.com/algorandfoundation/algorand-typescript-testing/blob/main/examples/zk-whitelist/contract.algo.ts) | - Testing of zero-knowledge proof verification<br>- Mocking of external application calls<br>- Use of ARC4 types and methods | - **arc4.Contract**<br>- **arc4 types**<br>- **LocalState**<br>- **Global**<br>- **Txn** | |
| 11 | +| HTLC LogicSig | [signature.algo.ts](https://github.com/algorandfoundation/algorand-typescript-testing/blob/main/examples/htlc-logicsig/signature.algo.ts) | - Testing of LogicSig contracts<br>- Verification of time-based conditions<br>- Mocking of transaction parameters | - **logicsig**<br>- **Account**<br>- **Txn**<br>- **Global**<br>- **op** | |
| 12 | +| Marketplace | [contract.algo.ts](https://github.com/algorandfoundation/algorand-typescript-testing/blob/main/examples/marketplace/contract.algo.ts) | - Testing of complex marketplace operations<br>- Use of BoxMap for listings<br>- Testing of asset transfers and payments | - **arc4.Contract**<br>- **BoxMap**<br>- **Asset**<br>- **arc4 types**<br>- **Global**<br>- **Txn** | |
| 13 | +| Scratch Storage | [contract.algo.ts](https://github.com/algorandfoundation/algorand-typescript-testing/blob/main/examples/scratch-storage/contract.algo.ts) | - Testing of scratch space usage<br>- Verification of scratch slot values | - **arc4.Contract**<br>- **Contract**<br>- **op** | |
0 commit comments