protected override void PerformAct()
 {
     _shippingAddressPage.ClickDifferentBillingCheckBox(_clientPurchaseInfo);
     _shippingAddressPage.ClickContinueButton();
     _shippingPaymentPage.ClickBottomContinueButton();
     _shippingAddressPage.FillBillingInfo(_clientPurchaseInfo);
 }
        public void PurchaseItem(string itemUrl, string itemPrice, ClientLoginInfo clientLoginInfo, ClientPurchaseInfo clientPurchaseInfo)
        {
            _itemPage.Navigate(itemUrl);
            _itemPage.ClickBuyNowButton();
            _previewShoppingCartPage.ClickProceedToCheckoutButton();
            _signInPage.Login(clientLoginInfo.Email, clientLoginInfo.Password);
            _shippingAddressPage.FillShippingInfo(clientPurchaseInfo);
            _shippingAddressPage.ClickDifferentBillingCheckBox(clientPurchaseInfo);
            _shippingAddressPage.ClickContinueButton();
            _shippingPaymentPage.ClickBottomContinueButton();
            _shippingAddressPage.FillBillingInfo(clientPurchaseInfo);
            _shippingAddressPage.ClickContinueButton();
            _shippingPaymentPage.ClickTopContinueButton();
            double couponDiscount = 0;

            if (_purchasePromotionalCodeStrategy != null)
            {
                _purchasePromotionalCodeStrategy.AssertPromotionalCodeDiscount();
                couponDiscount = _purchasePromotionalCodeStrategy.GetPromotionalCodeDiscountAmount();
            }
            var totalPrice = double.Parse(itemPrice);

            _placeOrderPage.AssertOrderTotalPrice(totalPrice, couponDiscount);
            // Some other actions...
            if (_purchasePromotionalCodeStrategy != null)
            {
                _purchasePromotionalCodeStrategy.AssertPromotionalCodeDiscount();
            }
        }
コード例 #3
0
 public override void PerformAct()
 {
     _shippingAddressPage.ClickDifferentBillingCheckBox(PurchaseTestContext.ClientPurchaseInfo);
     _shippingAddressPage.ClickContinueButton();
     _shippingPaymentPage.ClickBottomContinueButton();
     _shippingAddressPage.FillBillingInfo(PurchaseTestContext.ClientPurchaseInfo);
 }
コード例 #4
0
        public void PurchaseItem(
            string itemUrl,
            string itemPrice,
            ClientLoginInfo clientLoginInfo,
            ClientPurchaseInfo clientPurchaseInfo)
        {
            _itemPage.Navigate(itemUrl);
            _itemPage.ClickBuyNowButton();
            _previewShoppingCartPage.ClickProceedToCheckoutButton();
            _signInPage.Login(clientLoginInfo.Email, clientLoginInfo.Password);
            _shippingAddressPage.FillShippingInfo(clientPurchaseInfo);
            _shippingAddressPage.ClickDifferentBillingCheckBox(clientPurchaseInfo);
            _shippingAddressPage.ClickContinueButton();
            _shippingPaymentPage.ClickBottomContinueButton();
            _shippingAddressPage.FillBillingInfo(clientPurchaseInfo);
            _shippingAddressPage.ClickContinueButton();
            _shippingPaymentPage.ClickTopContinueButton();
            var totalPrice = double.Parse(itemPrice);

            _placeOrderPage.AssertOrderTotalPrice(totalPrice);
        }