|
| 1 | + |
| 2 | +=== COMPLEX SCENARIO 1 === |
| 3 | +User: Premium membership, 8 years, Lifetime: $120000 |
| 4 | + First-time: False, Student: False, Employee: True |
| 5 | + Corporate: False, Subscription: True |
| 6 | +Order: 21 items, Total: $13400.00 |
| 7 | + Event: BlackFriday, Payment: BankTransfer, Express: True |
| 8 | + Pre-order: True, Bulk: True, Gift Wrap: False |
| 9 | + Region: PremiumZone |
| 10 | +Electronics: $6550.00, Clothing: $2950.00, Accessories: $3900.00 |
| 11 | +Coupon: FLASHSALE25 (percent, 25%, Valid: True, Expired: False) |
| 12 | +--- COMPLEX PRICING CALCULATION --- |
| 13 | +Base Total: $13400.00 |
| 14 | +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%) |
| 15 | +Total Discount: 78.5% (Electronics capped at 15%) |
| 16 | +Shipping Cost: $35.00 |
| 17 | +Final Price: $8801.00 |
| 18 | +============================================================ |
| 19 | + |
| 20 | +=== COMPLEX SCENARIO 2 === |
| 21 | +User: Gold membership, 3 years, Lifetime: $8000 |
| 22 | + First-time: False, Student: False, Employee: True |
| 23 | + Corporate: False, Subscription: False |
| 24 | +Order: 21 items, Total: $13400.00 |
| 25 | + Event: BlackFriday, Payment: BankTransfer, Express: True |
| 26 | + Pre-order: True, Bulk: True, Gift Wrap: False |
| 27 | + Region: PremiumZone |
| 28 | +Electronics: $6550.00, Clothing: $2950.00, Accessories: $3900.00 |
| 29 | +Coupon: SAVE15 (percent, 15%, Valid: True, Expired: False) |
| 30 | +--- COMPLEX PRICING CALCULATION --- |
| 31 | +Base Total: $13400.00 |
| 32 | +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%) |
| 33 | +Total Discount: 69.0% (Electronics capped at 15%) |
| 34 | +Shipping Cost: $35.00 |
| 35 | +Final Price: $9171.50 |
| 36 | +============================================================ |
| 37 | + |
| 38 | +=== COMPLEX SCENARIO 3 === |
| 39 | +User: Silver membership, 1 years, Lifetime: $1500 |
| 40 | + First-time: False, Student: True, Employee: False |
| 41 | + Corporate: False, Subscription: False |
| 42 | +Order: 10 items, Total: $2495.00 |
| 43 | + Event: BackToSchool, Payment: PayPal, Express: True |
| 44 | + Pre-order: False, Bulk: False, Gift Wrap: True |
| 45 | + Region: Domestic |
| 46 | +Electronics: $2400.00, Clothing: $0.00, Accessories: $95.00 |
| 47 | +Coupon: SAVE15 (percent, 15%, Valid: True, Expired: False) |
| 48 | +--- COMPLEX PRICING CALCULATION --- |
| 49 | +Base Total: $2495.00 |
| 50 | +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%) |
| 51 | +Total Discount: 55.0% (Electronics capped at 15%) |
| 52 | +Shipping Cost: $10.00 |
| 53 | +Final Price: $2092.75 |
| 54 | +============================================================ |
| 55 | + |
| 56 | +=== COMPLEX SCENARIO 4 === |
| 57 | +User: Guest membership, 0 years, Lifetime: $0 |
| 58 | + First-time: True, Student: False, Employee: False |
| 59 | + Corporate: False, Subscription: False |
| 60 | +Order: 6 items, Total: $1160.00 |
| 61 | + Event: NewYear, Payment: CreditCard, Express: True |
| 62 | + Pre-order: False, Bulk: False, Gift Wrap: False |
| 63 | + Region: PremiumZone |
| 64 | +Electronics: $1110.00, Clothing: $0.00, Accessories: $50.00 |
| 65 | +Coupon: FLASHSALE25 (percent, 25%, Valid: True, Expired: False) |
| 66 | +--- COMPLEX PRICING CALCULATION --- |
| 67 | +Base Total: $1160.00 |
| 68 | +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%) |
| 69 | +Total Discount: 60.0% (Electronics capped at 15%) |
| 70 | +Shipping Cost: $35.00 |
| 71 | +Final Price: $998.50 |
| 72 | +============================================================ |
| 73 | + |
| 74 | +=== COMPLEX SCENARIO 5 === |
| 75 | +User: Premium membership, 8 years, Lifetime: $120000 |
| 76 | + First-time: False, Student: False, Employee: True |
| 77 | + Corporate: False, Subscription: True |
| 78 | +Order: 21 items, Total: $13400.00 |
| 79 | + Event: BlackFriday, Payment: BankTransfer, Express: True |
| 80 | + Pre-order: True, Bulk: True, Gift Wrap: False |
| 81 | + Region: PremiumZone |
| 82 | +Electronics: $6550.00, Clothing: $2950.00, Accessories: $3900.00 |
| 83 | +Coupon: EXPIRED20 (percent, 20%, Valid: False, Expired: True) |
| 84 | +--- COMPLEX PRICING CALCULATION --- |
| 85 | +Coupon expired. No discount applied. |
| 86 | +Base Total: $13400.00 |
| 87 | +Applied Discounts: Premium membership (15%), Ultra high-value bonus (10%), Premium seasonal bonus (8%), Coupon EXPIRED20 expired - no discount, Major bulk purchase (8%) |
| 88 | +Total Discount: 41.0% (Electronics capped at 15%) |
| 89 | +Shipping Cost: $35.00 |
| 90 | +Final Price: $10263.50 |
| 91 | +============================================================ |
| 92 | + |
| 93 | +=== COMPLEX SCENARIO 6 === |
| 94 | +User: Gold membership, 3 years, Lifetime: $8000 |
| 95 | + First-time: False, Student: False, Employee: True |
| 96 | + Corporate: False, Subscription: False |
| 97 | +Order: 21 items, Total: $13400.00 |
| 98 | + Event: BlackFriday, Payment: BankTransfer, Express: True |
| 99 | + Pre-order: True, Bulk: True, Gift Wrap: False |
| 100 | + Region: PremiumZone |
| 101 | +Electronics: $6550.00, Clothing: $2950.00, Accessories: $3900.00 |
| 102 | +Coupon: None |
| 103 | +--- COMPLEX PRICING CALCULATION --- |
| 104 | +Base Total: $13400.00 |
| 105 | +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%) |
| 106 | +Total Discount: 51.0% (Electronics capped at 15%) |
| 107 | +Shipping Cost: $35.00 |
| 108 | +Final Price: $9873.50 |
| 109 | +============================================================ |
| 110 | + |
| 111 | +=== SECURITY TESTING === |
| 112 | + |
| 113 | +--- Test 1: Null User Protection --- |
| 114 | +Exception thrown: 'System.ArgumentNullException' in ECommercePricingEngine.dll |
| 115 | +✓ Security measure working: User cannot be null (Parameter 'user') |
| 116 | + |
| 117 | +--- Test 2: Null Order Protection --- |
| 118 | +Exception thrown: 'System.ArgumentNullException' in ECommercePricingEngine.dll |
| 119 | +✓ Security measure working: Order cannot be null (Parameter 'order') |
| 120 | + |
| 121 | +--- Test 3: Invalid Order Data (Negative Prices) --- |
| 122 | +Testing with negative price item... |
| 123 | +Error: Invalid order data detected. Pricing calculation aborted. |
| 124 | + |
| 125 | +--- Test 4: Empty Order --- |
| 126 | +Testing with empty order... |
| 127 | +Error: Invalid order data detected. Pricing calculation aborted. |
| 128 | + |
| 129 | +--- Test 5: Extreme Coupon Value Protection --- |
| 130 | +Testing with 99% coupon (should be capped at 50%)... |
| 131 | +Base Total: $100.00 |
| 132 | +Applied Discounts: Silver membership (8%), Coupon EXTREME99 (50%) |
| 133 | +Total Discount: 58.0% (Electronics capped at 15%) |
| 134 | +Shipping Cost: $10.00 |
| 135 | +Final Price: $95.00 |
| 136 | + |
| 137 | +=== SECURITY TESTING COMPLETE === |
| 138 | + |
| 139 | +The program '[34928] ECommercePricingEngine.exe' has exited with code 0 (0x0). |
0 commit comments