datasynth-test-utils

Crates.iodatasynth-test-utils
lib.rsdatasynth-test-utils
version0.2.1
created_at2026-01-20 15:16:57.659712+00
updated_at2026-01-24 21:48:59.000367+00
descriptionTest utilities for synthetic data generation
homepage
repository
max_upload_size
id2056776
size107,936
Michael Ivertowski (mivertowski)

documentation

README

datasynth-test-utils

Test utilities and helpers for the SyntheticData workspace.

Overview

datasynth-test-utils provides shared testing infrastructure:

  • Test Fixtures: Pre-configured test data and scenarios
  • Assertion Helpers: Domain-specific assertions for financial data
  • Mock Generators: Simplified generators for unit testing
  • Snapshot Testing: Helpers for snapshot-based testing

Usage

use datasynth_test_utils::{fixtures, assertions};

#[test]
fn test_journal_entry_balance() {
    let entry = fixtures::balanced_journal_entry();
    assertions::assert_balanced(&entry);
}

#[test]
fn test_benford_compliance() {
    let amounts = fixtures::sample_amounts(1000);
    assertions::assert_benford_compliant(&amounts, 0.05);
}

Fixtures

Fixture Description
balanced_journal_entry() Valid balanced JE
sample_amounts(n) Random Benford-compliant amounts
test_chart_of_accounts() Small COA for testing
test_company_config() Minimal company configuration

Assertions

Assertion Description
assert_balanced() Verify debits equal credits
assert_benford_compliant() Check first-digit distribution
assert_valid_document_chain() Verify document references

License

Apache-2.0 - See LICENSE for details.

Commit count: 0

cargo fmt