public void Init() { var phones = new List <Phone> { new Phone(111), new Phone(222) }; var tariff = new BasicTariff(1, costPerMinute: 1000, name: "1"); firstClient = new IndividualClient(1, tariff, phones[0], 0, ClientStatus.Avalible, "111"); secondClient = new IndividualClient(2, tariff, phones[1], 0, ClientStatus.Avalible, "222"); var clients = new List <Client> { firstClient, secondClient }; this.unitOfWork = new BillingUnitOfWork( new PhoneRepository(phones), new TariffRepository(new List <BasicTariff> { tariff }), null, new ClientRepository(clients), new BillingRepository(new List <Data.Billing>())); this.exchangeBilling = new ExchangeBilling(unitOfWork, TimeSpan.FromSeconds(5), (uint)DateTime.Now.Day, 1); }
public ExchangeBilling(BillingUnitOfWork data, TimeSpan callReceivingDelay, uint balanceCheckDayNumb = 1, double balanceCountIntervalSeconds = 30) { this._data = data; this.CallReceivingDelay = callReceivingDelay; this._balanceCheck = new BalanceCheck(_data.Clients, _data.Billing, TimeSpan.FromSeconds(balanceCountIntervalSeconds)); _balanceCheck.SetControlDay(balanceCheckDayNumb); this._currentRings = new Dictionary <(Phone sender, Phone reciver), Data.Billing>(); }
//private ICollection<Commands> _commands; public UssdRunner(BillingUnitOfWork unitOfWork) { this._unitOfWork = unitOfWork; //this._commands = null; }