Example #1
0
 public OrderTestContext(PurchaseTestInput purchaseTestInput, OrderTestContextConfigurator orderTestContextConfigurator)
 {
     this.PurchaseTestInput = purchaseTestInput;
     this.IsPromoCodePurchase = orderTestContextConfigurator.FreePurchaseSpecification.
         Or(orderTestContextConfigurator.PromotionalPurchaseSpecification).
         IsSatisfiedBy(purchaseTestInput);
     this.IsCreditCardPurchase =
         orderTestContextConfigurator.CreditCardSpecification.
         And(orderTestContextConfigurator.WiretransferSpecification.Not()).
         And(orderTestContextConfigurator.FreePurchaseSpecification.Not()).
         And(orderTestContextConfigurator.PromotionalPurchaseSpecification.Not()).
         IsSatisfiedBy(purchaseTestInput);
 }
Example #2
0
 public OrderTestContext(PurchaseTestInput purchaseTestInput, OrderTestContextConfigurator orderTestContextConfigurator)
 {
     this.PurchaseTestInput   = purchaseTestInput;
     this.IsPromoCodePurchase = orderTestContextConfigurator.FreePurchaseSpecification.
                                Or(orderTestContextConfigurator.PromotionalPurchaseSpecification).
                                IsSatisfiedBy(purchaseTestInput);
     this.IsCreditCardPurchase =
         orderTestContextConfigurator.CreditCardSpecification.
         And(orderTestContextConfigurator.WiretransferSpecification.Not()).
         And(orderTestContextConfigurator.FreePurchaseSpecification.Not()).
         And(orderTestContextConfigurator.PromotionalPurchaseSpecification.Not()).
         IsSatisfiedBy(purchaseTestInput);
 }