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

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

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

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

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