//! Test utilities for Foxhunt HFT system
//!
//! This module provides standardized test configuration and utilities
//! to eliminate hardcoded production values and improve test maintainability.

use common::Symbol;

/// Test symbol constants to replace hardcoded symbols in tests
pub mod test_symbols {
    use super::*;

    /// Primary test symbol (replaces AAPL)
    pub const TEST_SYMBOL_1: &str = "TEST1";

    /// Secondary test symbol (replaces MSFT)
    pub const TEST_SYMBOL_2: &str = "TEST2";

    /// Tertiary test symbol (replaces GOOGL)
    pub const TEST_SYMBOL_3: &str = "TEST3";

    /// Generic test symbol for single-symbol tests
    pub const TEST_SYMBOL: &str = "TESTSYM";

    /// Extreme value test symbol
    pub const TEST_SYMBOL_EXTREME: &str = "EXTREME";

    /// Unknown symbol for error testing
    pub const TEST_SYMBOL_UNKNOWN: &str = "UNKNOWN";

    /// Helper function to create a Symbol from test constants
    pub fn test_symbol_1() -> Symbol {
        Symbol::from(TEST_SYMBOL_1)
    }

    /// Helper function to create a Symbol from test constants
    pub fn test_symbol_2() -> Symbol {
        Symbol::from(TEST_SYMBOL_2)
    }

    /// Helper function to create a Symbol from test constants
    pub fn test_symbol_3() -> Symbol {
        Symbol::from(TEST_SYMBOL_3)
    }

    /// Helper function to create a generic test Symbol
    pub fn test_symbol() -> Symbol {
        Symbol::from(TEST_SYMBOL)
    }

    /// Helper function to create an extreme test Symbol
    pub fn test_symbol_extreme() -> Symbol {
        Symbol::from(TEST_SYMBOL_EXTREME)
    }

    /// Helper function to create an unknown test Symbol
    pub fn test_symbol_unknown() -> Symbol {
        Symbol::from(TEST_SYMBOL_UNKNOWN)
    }

    /// Create a collection of test symbols
    pub fn test_symbols_vec() -> Vec<Symbol> {
        vec![test_symbol_1(), test_symbol_2(), test_symbol_3()]
    }
}

#[cfg(test)]
mod tests {
    use super::test_symbols::*;

    #[test]
    fn test_symbol_constants() {
        assert_eq!(test_symbol_1().as_str(), TEST_SYMBOL_1);
        assert_eq!(test_symbol_2().as_str(), TEST_SYMBOL_2);
        assert_eq!(test_symbol_3().as_str(), TEST_SYMBOL_3);
        assert_eq!(test_symbol().as_str(), TEST_SYMBOL);

        let symbols = test_symbols_vec();
        assert_eq!(symbols.len(), 3);
        assert!(symbols.contains(&test_symbol_1()));
        assert!(symbols.contains(&test_symbol_2()));
        assert!(symbols.contains(&test_symbol_3()));
    }
}
