Esempio n. 1
0
        public void NumberOfSkuSubjectToFraudCheckTest()
        {
            MyHLShoppingCart cart =
                MyHLShoppingCartGenerator.GetBasicShoppingCart("STAFF", "en-US", "FED", "03", ShoppingCartItemHelper.GetDistributorShoppingCartItemList(new List <string> {
                "1455", "8612", "2674"
            }), ServiceProvider.CatalogSvc.OrderCategoryType.RSO);
            MyHLConfiguration conf = createMyHLConfiguration(100, new List <DistributorLevelType> {
                DistributorLevelType._DS
            }, true, false, 10, new List <string> {
                "F1P"
            }, 2, false, new List <string>(), 100, new List <string>());
            //
            var result = FraudControlProvider.IsSubjectToFraudCheck("en-US", cart, "DS", DateTime.Now.AddYears(-1), conf);

            Assert.AreEqual(true, result);
        }
Esempio n. 2
0
        public void ShiptoZipcodeSubjectToFraudCheckTest()
        {
            MyHLShoppingCart cart =
                MyHLShoppingCartGenerator.GetBasicShoppingCart("STAFF", "en-US", "FED", "03", new ShippingAddress_V02 {
                Address = new MyHerbalife3.Ordering.ServiceProvider.ShippingSvc.Address_V01 {
                    Country = "US", City = "Fake", PostalCode = "90502",
                }
            });
            MyHLConfiguration conf = createMyHLConfiguration(100, new List <DistributorLevelType> {
                DistributorLevelType._DS
            }, true, false, 10, new List <string> {
                "F1P"
            }, 2, false, new List <string> {
                "90275"
            }, 100, new List <string>());
            //
            var result = FraudControlProvider.IsSubjectToFraudCheck("en-US", cart, "DS", DateTime.Now.AddYears(-1), conf);

            Assert.AreEqual(true, result);
        }