rskit_testutil/lib.rs
1//! Test utilities, mock providers, and assertion helpers.
2//!
3//! Designed for use in `#[cfg(test)]` blocks and integration tests across the rskit ecosystem.
4//!
5//! [`TestWorkspace`] is the generic fixture harness.
6//! Configure any fixture root with [`TestWorkspace::with_fixture_dir`],
7//! or use [`test_workspace!`] for the conventional `<crate>/tests/fixtures` layout.
8//!
9#![warn(missing_docs)]
10
11/// Assertion helpers for `AppResult`.
12pub mod assertions;
13/// Fake components for lifecycle tests.
14pub mod component;
15/// Test config helpers.
16pub mod config;
17/// Process working-directory guard for tests.
18pub mod current_dir;
19/// Hook and event-bus test helpers.
20pub mod hook;
21/// Generic mock provider for testing.
22pub mod mock_provider;
23/// Temporary workspace and fixture helpers.
24pub mod workspace;
25
26pub use assertions::{assert_err_code, assert_ok};
27pub use component::FakeComponent;
28pub use config::TestAppConfig;
29pub use current_dir::CurrentDirGuard;
30pub use hook::TestEvent;
31pub use mock_provider::MockProvider;
32pub use workspace::TestWorkspace;
33
34mod concurrency;
35mod macros;
36
37pub use concurrency::CONCURRENCY_TEST_NOTE;