////public void ChoosePaymentMethod()
 ////{
 ////    if (!string.IsNullOrEmpty(this.purchaseTestInput.CreditCardNumber)
 ////        && !this.purchaseTestInput.IsWiretransfer
 ////        && !(this.purchaseTestInput.IsPromotionalPurchase && this.purchaseTestInput.TotalPrice < 5)
 ////        && !(this.purchaseTestInput.TotalPrice == 0))
 ////    {
 ////        this.CreditCard.SendKeys("371449635398431");
 ////        this.SecurityNumber.SendKeys("1234");
 ////    }
 ////    else
 ////    {
 ////        this.Wiretransfer.SendKeys("pathToFile");
 ////    }
 ////}
 public void ChoosePaymentMethod()
 {
     if (IsCreditCardPurchase)
     {
         CreditCard.SendKeys("371449635398431");
         SecurityNumber.SendKeys("1234");
     }
     else
     {
         Wiretransfer.SendKeys("pathToFile");
     }
 }
Exemple #2
0
 public void ChoosePaymentMethod()
 {
     if (_creditCardSpecification.
         And(_wiretransferSpecification.Not()).
         And(_freePurchaseSpecification.Not()).
         And(_promotionalPurchaseSpecification.Not()).
         IsSatisfiedBy(_purchaseTestInput))
     {
         CreditCard.SendKeys("371449635398431");
         SecurityNumber.SendKeys("1234");
     }
     else
     {
         Wiretransfer.SendKeys("pathToFile");
     }
 }