//! Property-based tests using proptest for Foxhunt HFT system.

use proptest::prelude::*;
// CANONICAL TYPE IMPORTS - Use types::prelude::Decimal

proptest! {
    #[test]
    fn test_decimal_arithmetic_properties(
        a in any::<i64>().prop_map(Decimal::from),
        b in any::<i64>().prop_map(Decimal::from)
    ) {
        // Test commutative property of addition
        prop_assert_eq!(a + b, b + a);
        
        // Test associative property (simplified)
        if let (Some(sum1), Some(sum2)) = (a.checked_add(b), b.checked_add(a)) {
            prop_assert_eq!(sum1, sum2);
        }
    }

    #[test]
    fn test_price_calculations(price in 1i64..1000000i64) {
        let decimal_price = Decimal::from(price);
        
        // Price should always be positive in our domain
        prop_assert!(decimal_price > Decimal::ZERO);
        
        // Price with commission should be higher
        let commission = Decimal::from(10); // 10 basis points
        let with_commission = decimal_price + (decimal_price * commission / Decimal::from(10000));
        prop_assert!(with_commission > decimal_price);
    }

    #[test]
    fn test_uuid_generation(seed in any::<u128>()) {
        // Test that UUIDs are unique (simplified test)
        let uuid1 = uuid::Uuid::new_v4();
        let uuid2 = uuid::Uuid::new_v4();
        prop_assert_ne!(uuid1, uuid2);
    }
}