Skip to main content

Crate datasynth_test_utils

Crate datasynth_test_utils 

Source
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.