Skip to main content

neo_test/
lib.rs

1// Copyright (c) 2025-2026 R3E Network
2// Licensed under the MIT License
3
4//! Neo N3 Contract Testing Framework
5//!
6//! This crate provides utilities for testing Neo N3 smart contracts
7//! with a mock runtime environment.
8//!
9//! # Usage
10//!
11//! ```ignore
12//! use neo_test::*;
13//!
14//! // Create a test environment
15//! let mut env = TestEnvironment::new();
16//!
17//! // Set up contract state
18//! env.set_storage(b"owner", b"AV4GGdKS2C7j1GqC3w5y4qX5");
19//!
20//! // Add witness
21//! env.add_witness(b"AV4GGdKS2C7j1GqC3w5y4qX5");
22//!
23//! // Assert
24//! env.assert_storage().assert_contains(b"owner");
25//! env.assert_runtime().assert_witness(b"AV4GGdKS2C7j1GqC3w5y4qX5");
26//! ```
27
28mod assertions;
29mod environment;
30mod mock_runtime;
31
32#[cfg(test)]
33mod tests;
34
35pub use assertions::*;
36pub use environment::*;
37pub use mock_runtime::*;