public void Calculate_IfBaseTariff_BaseMonthCostCloseToMaxInt_ThrowOverflowException(int baseCost, int consumption) { var validator = new TariffCalculationSettingsValidator(); var settings = new TariffCalculationSettings(baseMonthCost: baseCost); _productFactory = new ElectricityProductFactory(validator); _product = _productFactory.Create(settings, TariffType.Base).FirstOrDefault(); Assert.Throws <OverflowException>(() => _product.Calculate(consumption)); }
internal void PackageTariffProductSetUp() { var calculationSettings = new TariffCalculationSettings(); _product = _productFactory.Create(calculationSettings, TariffType.Package).FirstOrDefault(); }