
=== COMPLEX SCENARIO 1 ===
User: Premium membership, 8 years, Lifetime: $120000
      First-time: False, Student: False, Employee: True
      Corporate: False, Subscription: True
Order: 21 items, Total: $13400.00
       Event: BlackFriday, Payment: BankTransfer, Express: True
       Pre-order: True, Bulk: True, Gift Wrap: False
       Region: PremiumZone
Electronics: $6550.00, Clothing: $2950.00, Accessories: $3900.00
Coupon: FLASHSALE25 (percent, 25%, Valid: True, Expired: False)
--- COMPLEX PRICING CALCULATION ---
Base Total: $13400.00
Applied Discounts: Premium membership (15%), Ultra high-value bonus (10%), Premium seasonal bonus (8%), Premium-enhanced coupon FLASHSALE25 (32.5%), Black Friday premium coupon boost (5%), Major bulk purchase (8%)
Total Discount: 78.5% (Electronics capped at 15%)
Shipping Cost: $35.00
Final Price: $8801.00
============================================================

=== COMPLEX SCENARIO 2 ===
User: Gold membership, 3 years, Lifetime: $8000
      First-time: False, Student: False, Employee: True
      Corporate: False, Subscription: False
Order: 21 items, Total: $13400.00
       Event: BlackFriday, Payment: BankTransfer, Express: True
       Pre-order: True, Bulk: True, Gift Wrap: False
       Region: PremiumZone
Electronics: $6550.00, Clothing: $2950.00, Accessories: $3900.00
Coupon: SAVE15 (percent, 15%, Valid: True, Expired: False)
--- COMPLEX PRICING CALCULATION ---
Base Total: $13400.00
Applied Discounts: Gold membership (12%), Gold seasonal bonus (6%), Gold bulk bonus (4%), Category diversity bonus (3%), Employee gold discount (10%), Pre-order employee bonus (5%), Alternative payment bonus (3%), Gold-enhanced coupon SAVE15 (18.0%), Major bulk purchase (8%)
Total Discount: 69.0% (Electronics capped at 15%)
Shipping Cost: $35.00
Final Price: $9171.50
============================================================

=== COMPLEX SCENARIO 3 ===
User: Silver membership, 1 years, Lifetime: $1500
      First-time: False, Student: True, Employee: False
      Corporate: False, Subscription: False
Order: 10 items, Total: $2495.00
       Event: BackToSchool, Payment: PayPal, Express: True
       Pre-order: False, Bulk: False, Gift Wrap: True
       Region: Domestic
Electronics: $2400.00, Clothing: $0.00, Accessories: $95.00
Coupon: SAVE15 (percent, 15%, Valid: True, Expired: False)
--- COMPLEX PRICING CALCULATION ---
Base Total: $2495.00
Applied Discounts: Silver membership (8%), Student silver bonus (5%), Back-to-school bonus (7%), Student bulk discount (4%), Student tech focus bonus (6%), Gift presentation bonus (2%), Express education bonus (3%), Coupon SAVE15 (15%), Bulk purchase (5%)
Total Discount: 55.0% (Electronics capped at 15%)
Shipping Cost: $10.00
Final Price: $2092.75
============================================================

=== COMPLEX SCENARIO 4 ===
User: Guest membership, 0 years, Lifetime: $0
      First-time: True, Student: False, Employee: False
      Corporate: False, Subscription: False
Order: 6 items, Total: $1160.00
       Event: NewYear, Payment: CreditCard, Express: True
       Pre-order: False, Bulk: False, Gift Wrap: False
       Region: PremiumZone
Electronics: $1110.00, Clothing: $0.00, Accessories: $50.00
Coupon: FLASHSALE25 (percent, 25%, Valid: True, Expired: False)
--- COMPLEX PRICING CALCULATION ---
Base Total: $1160.00
Applied Discounts: First-time buyer (10%), Seasonal welcome bonus (5%), First-order volume bonus (4%), Premium payment newcomer bonus (3%), High-value newcomer bonus (6%), Premium zone newcomer bonus (4%), Express shipping trial bonus (3%), Coupon FLASHSALE25 (25%)
Total Discount: 60.0% (Electronics capped at 15%)
Shipping Cost: $35.00
Final Price: $998.50
============================================================

=== COMPLEX SCENARIO 5 ===
User: Premium membership, 8 years, Lifetime: $120000
      First-time: False, Student: False, Employee: True
      Corporate: False, Subscription: True
Order: 21 items, Total: $13400.00
       Event: BlackFriday, Payment: BankTransfer, Express: True
       Pre-order: True, Bulk: True, Gift Wrap: False
       Region: PremiumZone
Electronics: $6550.00, Clothing: $2950.00, Accessories: $3900.00
Coupon: EXPIRED20 (percent, 20%, Valid: False, Expired: True)
--- COMPLEX PRICING CALCULATION ---
Coupon expired. No discount applied.
Base Total: $13400.00
Applied Discounts: Premium membership (15%), Ultra high-value bonus (10%), Premium seasonal bonus (8%), Coupon EXPIRED20 expired - no discount, Major bulk purchase (8%)
Total Discount: 41.0% (Electronics capped at 15%)
Shipping Cost: $35.00
Final Price: $10263.50
============================================================

=== COMPLEX SCENARIO 6 ===
User: Gold membership, 3 years, Lifetime: $8000
      First-time: False, Student: False, Employee: True
      Corporate: False, Subscription: False
Order: 21 items, Total: $13400.00
       Event: BlackFriday, Payment: BankTransfer, Express: True
       Pre-order: True, Bulk: True, Gift Wrap: False
       Region: PremiumZone
Electronics: $6550.00, Clothing: $2950.00, Accessories: $3900.00
Coupon: None
--- COMPLEX PRICING CALCULATION ---
Base Total: $13400.00
Applied Discounts: Gold membership (12%), Gold seasonal bonus (6%), Gold bulk bonus (4%), Category diversity bonus (3%), Employee gold discount (10%), Pre-order employee bonus (5%), Alternative payment bonus (3%), Major bulk purchase (8%)
Total Discount: 51.0% (Electronics capped at 15%)
Shipping Cost: $35.00
Final Price: $9873.50
============================================================

=== SECURITY TESTING ===

--- Test 1: Null User Protection ---
Exception thrown: 'System.ArgumentNullException' in ECommercePricingEngine.dll
✓ Security measure working: User cannot be null (Parameter 'user')

--- Test 2: Null Order Protection ---
Exception thrown: 'System.ArgumentNullException' in ECommercePricingEngine.dll
✓ Security measure working: Order cannot be null (Parameter 'order')

--- Test 3: Invalid Order Data (Negative Prices) ---
Testing with negative price item...
Error: Invalid order data detected. Pricing calculation aborted.

--- Test 4: Empty Order ---
Testing with empty order...
Error: Invalid order data detected. Pricing calculation aborted.

--- Test 5: Extreme Coupon Value Protection ---
Testing with 99% coupon (should be capped at 50%)...
Base Total: $100.00
Applied Discounts: Silver membership (8%), Coupon EXTREME99 (50%)
Total Discount: 58.0% (Electronics capped at 15%)
Shipping Cost: $10.00
Final Price: $95.00

=== SECURITY TESTING COMPLETE ===
