Esempio n. 1
0
        public void Context()
        {
            Product product = new Product(10);
            Coupon  coupon  = CreateCoupon.For(product).Starting(DateTime.Now.AddDays(-4)).Ending(DateTime.Now.AddDays(-1)).WithDiscountOf(.1m);

            _order = CreateOrder.Of(product).On(DateTime.Now).Apply(coupon).In(StateOf.UT);
        }
        [TestFixtureSetUp] public void Context()
        {
            Product product = new Product(10);
            Coupon  coupon  = CreateCoupon.For(product).WithDiscountOf(.1m);

            _order = CreateOrder.Of(product, product).Apply(coupon).In(StateOf.UT);
        }
        [TestFixtureSetUp] public void Context()
        {
            Product product1 = new Product(10);
            Product product2 = new Product(10);
            Coupon  coupon1  = CreateCoupon.For(product1).Starting(DateTime.Now).Ending(DateTime.Now).WithDiscountOf(.75m);
            Coupon  coupon2  = CreateCoupon.For(product1).Starting(DateTime.Now).Ending(DateTime.Now).WithDiscountOf(.50m);

            _order = CreateOrder.Of(product1, product2).On(DateTime.Now).Apply(coupon1, coupon2).In(StateOf.UT);
        }
Esempio n. 4
0
        private static void Sample5()
        {
            Product luxuryProduct = new Product(10)
            {
                IsLuxuryItem = true
            };
            Product nonLuxuryProduct = new Product(10);
            Order   order            = CreateOrder.Of(luxuryProduct, nonLuxuryProduct).
                                       Apply(CreatePromotion.WithDiscountOf(.1m), CreateCoupon.For(luxuryProduct).WithDiscountOf(.5m)).
                                       In(StateOf.NC);

            DisplayOrder(order, "Order in North Carolina (5% tax rate) with $10 luxury item and $10 non-luxury item and 10% promotion and 50% coupon on luxury item:");
        }