public void Setup()
 {
     _paymentStrategyFactory = A.Fake <IPaymentStrategyFactory>();
     _orderService           = A.Fake <IOrderService>();
     _paymentStrategy        = A.Fake <IPaymentStrategy>();
     A.CallTo(() => _paymentStrategyFactory.Create(A <string> ._)).Returns(_paymentStrategy);
     _paymentController = new PaymentController(_paymentStrategyFactory, _orderService);
 }
Exemple #2
0
 public SubscriptionService(IPaymentStrategyFactory paymentStrategyFactory)
 {
     _paymentStrategyFactory = paymentStrategyFactory;
 }
 public PaymentController(IPaymentStrategyFactory paymentStrategyFactory,
                          IOrderService orderService)
 {
     _paymentStrategyFactory = paymentStrategyFactory;
     _orderService           = orderService;
 }