| Crates.io | datasynth-test-utils |
| lib.rs | datasynth-test-utils |
| version | 0.2.1 |
| created_at | 2026-01-20 15:16:57.659712+00 |
| updated_at | 2026-01-24 21:48:59.000367+00 |
| description | Test utilities for synthetic data generation |
| homepage | |
| repository | |
| max_upload_size | |
| id | 2056776 |
| size | 107,936 |
Test utilities and helpers for the SyntheticData workspace.
datasynth-test-utils provides shared testing infrastructure:
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);
}
| 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 |
| Assertion | Description |
|---|---|
assert_balanced() |
Verify debits equal credits |
assert_benford_compliant() |
Check first-digit distribution |
assert_valid_document_chain() |
Verify document references |
Apache-2.0 - See LICENSE for details.