Exemple #1
0
        public void Configure(string name, TenantManager options)
        {
            Configure(options);

            options.TenantService = TenantService.Get(name);
            options.QuotaService  = QuotaService.Get(name);
            options.TariffService = TariffService.Get(name);
        }
Exemple #2
0
        public async Task Get_Tariff_CorrectData()
        {
            Assert.IsNotNull(_testTariffId, "The testProduct id has to be defined");
            TariffDTO tariffDTO = await _tariffService.Get(_testTariffId);

            Assert.IsNotNull(tariffDTO, "Test tariff NOT found!");
            Assert.AreEqual(_baseCostsAnnualTest, tariffDTO.BaseCostsAnnual, "Something is wrong with your search. Annual costs do not equal.");
            Assert.NotNull(tariffDTO.NextPricingTier, "Next pricing tier should be defined, got null.");
            Assert.AreEqual(_consumptionCostsPerKwHNextTier, tariffDTO.NextPricingTier.ConsumptionCostsPerKWh, "The next pricing tier seems to wrong. Consumption per kWh does not match.");
        }
 public void Configure(string name, HostedSolution hostedSolution)
 {
     Configure(hostedSolution);
     hostedSolution.Region              = name;
     hostedSolution.TenantService       = TenantService.Get(name);
     hostedSolution.UserService         = UserService.Get(name);
     hostedSolution.QuotaService        = QuotaService.Get(name);
     hostedSolution.TariffService       = TariffService.Get(name);
     hostedSolution.ClientTenantManager = TenantManager.Get(name);
     hostedSolution.TenantUtil          = TenantUtil.Get(name);
     hostedSolution.SettingsManager     = DbSettingsManager.Get(name);
     hostedSolution.CoreSettings        = CoreSettings.Get(name);
 }
Exemple #4
0
        public ActionResult List()
        {
            var result = tariffService.Get();

            return(Json(result, JsonRequestBehavior.AllowGet));
        }