feat(tests): update tests to use GBM for random data generation; improve consistency and realism in Skew and Variance tests; refine validation logic in Beta tests

This commit is contained in:
Miha Kralj
2025-12-26 12:05:07 -08:00
parent c2bc665ecf
commit 9c113767ec
5 changed files with 30 additions and 17 deletions
+6
View File
@@ -11,6 +11,12 @@ These tests verify the internal logic, state management, and API contract of the
- **`Constructor_ValidatesInput`**: Verify that invalid parameters (e.g., `period <= 0`) throw `ArgumentException`.
- **`Constructor_ValidatesOptionalArgs`**: If applicable, verify other parameters (e.g., `alpha`, `sigma`).
### Random Data Generation
- **Use `GBM` Helper**: Always use the `GBM` (Geometric Brownian Motion) helper class for generating random test data.
- **Avoid `System.Random`**: Do not use `System.Random` directly in tests to ensure consistency and realism.
- **Example**: `var gbm = new GBM(startPrice: 100, mu: 0.05, sigma: 0.2, seed: 123);`
### Basic Functionality
- **`Calc_ReturnsValue`**: Verify `Update` returns a valid `TValue` and updates the `Last` property.