コード例 #1
0
        public void Setup()
        {
            transactionScope = new TransactionScope();

            var paymentDAO = new EFPaymentDAO();
            var paymentProcessor = new CoinPaymentProcessor(paymentDAO);
            vendingMachine = new VendingMachine(paymentProcessor);
        }
コード例 #2
0
        public void Setup()
        {
            transactionScope = new TransactionScope();

            var paymentDAO = new ADOPaymentDAO();
            var paymentProcessor = new CoinPaymentProcessor(paymentDAO);
            var vendingMachine = new VendingMachine(paymentProcessor);
            controller = new HomeController(vendingMachine);
        }
コード例 #3
0
 public void Setup()
 {
     paymentProcessor = new Mock<IPaymentProcessor>();
     vendingMachine = new VendingMachine(paymentProcessor.Object);
 }