Expand description
Test utilities for synthetic data generation testing.
This crate provides common testing utilities including:
- Pre-built test fixtures and configurations
- Custom assertion macros for accounting invariants
- Mock implementations for testing
- Test server utilities
Re-exports§
pub use assertions::*;pub use fixtures::*;pub use mocks::*;pub use server::*;
Modules§
- assertions
- Custom assertion macros for testing accounting invariants.
- fixtures
- Pre-built test fixtures and configurations.
- mocks
- Mock implementations for testing.
- server
- Test server utilities for integration testing.
Macros§
- assert_
all_ balanced - Assert that all journal entries in a collection are balanced.
- assert_
balance_ coherent - Assert that balance snapshots maintain accounting equation coherence. Checks that Assets = Liabilities + Equity within tolerance.
- assert_
balanced - Assert that a journal entry is balanced (debits equal credits).
- assert_
benford_ compliant - Assert that an amount follows Benford’s Law distribution within tolerance. This checks if the first digit distribution matches expected frequencies.
- assert_
benford_ passes - Assert that amounts pass Benford’s Law chi-squared test. Uses the chi-squared statistic with configurable threshold.
- assert_
document_ chain_ complete - Assert that document chains meet completeness threshold.
- assert_
fidelity_ passes - Assert that fidelity passes the threshold.
- assert_
subledger_ reconciled - Assert that subledgers reconcile to GL control accounts.