public void Setup() { _mockChangeCalculator = MockRepository.GenerateMock <IChangeCalculator>(); _mockVendingMachineRepository = MockRepository.GenerateMock <IVendingMachineRepository>(); _fixture = new Fixture(); _sut = new PurchaseHandler(_mockChangeCalculator, _mockVendingMachineRepository); }
public PurchaseHandler(IChangeCalculator changeCalculator, IVendingMachineRepository vendingMachineRepository) { CoinsEntered = new List <double>(); TransactionState = TransactionState.StandBy; _changeCalculator = changeCalculator; _vendingMachineRepository = vendingMachineRepository; }
public PaymentController(IVendingMachineRepository repository, ICreditCardProcessor creditCardProcessor) { _repository = repository; _creditCardProcessor = creditCardProcessor; }
public PaymentControllerTests() { _repository = new TestRepository.VendingMachineRepository(); _ccProcessor = new CreditCard.TestCreditCardProcessor(); }
public ProductControllerTests() { _repository = new TestRepository.VendingMachineRepository(); }
public ProductController(IVendingMachineRepository repository) { _repository = repository; }