예제 #1
0
        public ParkingCalculatorTests()
        {
            _mockRepository = new Mock <IRepository <RefData> >();
            var refDataBuilder         = new RefDataBuilder(_mockRepository.Object);
            var earlyBirdCalculator    = new EarlyBirdCalculator(refDataBuilder);
            var standardRateCalculator = new StandardRateCalculator(refDataBuilder);
            var mockParkingCalculator  = new Mock <ParkingCalculator>(earlyBirdCalculator, standardRateCalculator);

            _calculator = mockParkingCalculator.Object;
        }
        public ParkingCalculatorTests()
        {
            _mockRefDataBuilder = new Mock <IModelBuilder <string, IEnumerable <RefData> > >();
            var refDataBuilder         = _mockRefDataBuilder.Object;
            var earlyBirdCalculator    = new EarlyBirdCalculator(refDataBuilder);
            var standardRateCalculator = new StandardRateCalculator(refDataBuilder);
            var nightRateCalculator    = new NightRateCalculator(refDataBuilder);
            var weekendRateCalculator  = new WeekendRateCalculator(refDataBuilder);
            var mockParkingCalculator  = new Mock <ParkingCalculator>(earlyBirdCalculator, standardRateCalculator, nightRateCalculator, weekendRateCalculator);

            _calculator = mockParkingCalculator.Object;
        }