public PaymentIntegrationTest() { this.platePriceService = new InMemoryPriceRepository(); this.regularBillCalculator = new RegularCalculationService(platePriceService); this.menuBillCalculator = new MenuCalculationService(platePriceService, new MenuSplitStrategyService()); this.calculationStrategySelector = new CalculationStrategySelectorService(this.regularBillCalculator, this.menuBillCalculator); this.clockMock = new Mock <IClock>(); this.paymentService = new PaymentService(this.calculationStrategySelector, clockMock.Object); }
public OptmizedCalculationIntegrationTest() { this.priceRepository = new InMemoryPriceRepository(); this.regularBillCalculator = new RegularCalculationService(priceRepository); this.menuBillCalculator = new MenuCalculationService(priceRepository, new MenuSplitStrategyService()); this.calculationStrategySelector = new CalculationStrategySelectorService(this.regularBillCalculator, this.menuBillCalculator); this.clockMock = new Mock <IClock>(); this.paymentService = new PaymentService(this.calculationStrategySelector, clockMock.Object); this.orderRepository = new InMemoryOrderRepository(); this.orderService = new OrderService(this.paymentService, this.orderRepository, this.priceRepository, clockMock.Object); }
public CalculationStrategySelectorServiceTests() { this.regularCalculatorMock = new Mock <IRegularCalculationService>(); this.menuCalculatorMock = new Mock <IMenuCalculationService>(); this.strategySelector = new CalculationStrategySelectorService(this.regularCalculatorMock.Object, this.menuCalculatorMock.Object); }