Esempio n. 1
0
        public void CalculateCosts_GivenAnnualBaseCostsLimitInKWh_ReturnsAnnualBaseCosts()
        {
            PackagedTariffCostsCalculation calculationUnderTest = CreateCalculation();
            double actual = calculationUnderTest.CalculateCosts(periodInMonths: 12, calculationUnderTest.AnnualBaseCostsLimitInKWh);

            Assert.Equal(calculationUnderTest.AnnualBaseCosts, actual);
        }
Esempio n. 2
0
        public void CalculateCosts_Given0Months_ReturnsZero()
        {
            PackagedTariffCostsCalculation calculationUnderTest = CreateCalculation();
            double actual = calculationUnderTest.CalculateCosts(periodInMonths: 0, consumptionInKWh: 0);

            Assert.Equal(0, actual);
        }
Esempio n. 3
0
        public void CalculateCosts_Given0KWhInOneYear_ReturnsAnnualBaseCosts()
        {
            PackagedTariffCostsCalculation calculationUnderTest = CreateCalculation();
            double actual = calculationUnderTest.CalculateCosts(periodInMonths: 12, consumptionInKWh: 0);

            Assert.Equal(calculationUnderTest.AnnualBaseCosts, actual);
        }
Esempio n. 4
0
        public void CalculateCosts_GivenNegativeConsumption_Throws()
        {
            PackagedTariffCostsCalculation calculationUnderTest = CreateCalculation();

            Assert.ThrowsAny <ArgumentException>(() => calculationUnderTest.CalculateCosts(periodInMonths: 0, consumptionInKWh: -1));
        }