Create 3 missing service READMEs (api_gateway, data_acquisition_service, trading_agent_service). Create bin/fxt/README.md. Create testing/service-integration/README.md. Update existing service and testing READMEs to standard template. Delete 4 subdirectory READMEs from testing/integration/ and testing/e2e/. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
31 lines
886 B
Markdown
31 lines
886 B
Markdown
# test-common
|
|
|
|
Shared test fixtures, builders, and assertions for the Foxhunt workspace. Consolidates duplicate test code across 39+ files.
|
|
|
|
## Key Types
|
|
|
|
- `TestDb` -- isolated test database with automatic cleanup
|
|
- `MockOrderBuilder` -- fluent order/trade builder
|
|
- `BarBuilder` -- OHLCV bar generation with realistic price movements
|
|
- `PositionBuilder` -- mock positions with P&L calculations
|
|
|
|
## Fixtures
|
|
|
|
- `generate_ohlcv_bars()` -- realistic OHLCV data
|
|
- `generate_random_walk()` -- Monte Carlo price simulations
|
|
- `generate_crisis_returns()` -- 2008 crisis patterns
|
|
- `generate_order_book()` -- order book levels
|
|
|
|
## Assertions
|
|
|
|
- `assert_approx_eq!` -- percentage tolerance comparison
|
|
- `assert_ohlc_valid` -- OHLC bar validation
|
|
- `assert_var_exceedances` -- VaR exceedance checks
|
|
|
|
## Usage
|
|
|
|
```toml
|
|
[dev-dependencies]
|
|
test_common = { path = "../../testing/test-common" }
|
|
```
|