public PricePlanComparisonTest()
        {
            var readings = new Dictionary <string, List <Domain.ElectricityReading> >();

            meterReadingService = new MeterReadingService(readings);
            var pricePlans = new List <PricePlan>()
            {
                new PricePlan()
                {
                    EnergySupplier = Supplier.DrEvilsDarkEnergy, UnitRate = 10, PeakTimeMultiplier = NoMultipliers()
                },
                new PricePlan()
                {
                    EnergySupplier = Supplier.TheGreenEco, UnitRate = 2, PeakTimeMultiplier = NoMultipliers()
                },
                new PricePlan()
                {
                    EnergySupplier = Supplier.PowerForEveryone, UnitRate = 1, PeakTimeMultiplier = NoMultipliers()
                }
            };
            var pricePlanService = new PricePlanService(pricePlans, meterReadingService);
            var accountService   = new AccountService(smartMeterToPricePlanAccounts);

            controller = new PricePlanComparatorController(pricePlanService, accountService);
        }
示例#2
0
        public PricePlanServiceTest()
        {
            _mockMeterReadingService = new Mock <MeterReadingService>();
            _pricePlanService        = new PricePlanService(_pricePlans, _mockMeterReadingService.Object);

            _mockMeterReadingService.Setup(service => service.GetReadings(It.IsAny <string>())).Returns(new List <ElectricityReading>()
            {
                new ElectricityReading(),
                new ElectricityReading()
            });
        }