/// <summary>
        /// Gets all available tariffs with data.
        /// </summary>
        /// <returns>List of available tariffs.</returns>
        public virtual List<Tariff> GetAll()
        {
            var result = new List<Tariff>();
            var basicTariff = "Basic";
            var packagedTariff = "Packaged";

            var tariff = new Tariff()
            {
                TariffType = TariffType.Basic,
                Name = basicTariff,
                BaseCostProMonat = 5.0F,
                CostProKWh = 0.22F
            };
            result.Add(tariff);

            tariff = new Tariff()
            {
                TariffType = TariffType.Packaged,
                Name = packagedTariff,
                AboveLimitCost = 0.30F,
                TariffLimit = 4000,
                BaseCost = 800.0F
            };
            result.Add(tariff);
            return result;
        }
        public override Result CalculateAnnualCost(Tariff tariff, int consumption)
        {
            var result = new Result() {
                TariffName = tariff.Name
            };

            if (consumption <= tariff.TariffLimit)
                result.AnnualCost = tariff.BaseCost;
            else {
                result.AnnualCost = tariff.BaseCost + 1.0F * tariff.AboveLimitCost * (consumption - tariff.TariffLimit);
            }

            return result;
        }
        private void CheckResult(int consumption, float[] checkArray)
        {
            var tariff1 = new Tariff()
            {
                TariffType = TariffType.Basic,
                Name = "Basic",
                BaseCostProMonat = 5.0F,
                CostProKWh = 0.22F
            };

            var tariff2 = new Tariff()
            {
                TariffType = TariffType.Packaged,
                Name = "Packaged",
                AboveLimitCost = 0.30F,
                TariffLimit = 4000,
                BaseCost = 800.0F
            };

            var tariffRepoMock = new Mock<TariffRepository>();
            tariffRepoMock.Setup(m => m.GetAll()).Returns(new List<Tariff>
            {
                tariff1,
                tariff2
            });

            var factory = new ServiceContainerFactory();
            ServiceContainer.Instance = factory.BuildContainer();

            Context.Current.PushScope(Context.Current.Scope.BeginLifetimeScope(b =>
            {
                b.RegisterInstance(tariffRepoMock.Object).As<TariffRepository>();
            }));

            var results = Context.Resolve<TariffComparer>().GetResultsList(consumption);

            Assert.AreEqual(checkArray.Length, results.Count, "Invalid results count: ");

            for (int i = 0; i < checkArray.Length; i++)
            {
                Assert.AreEqual(checkArray[i], results[i].AnnualCost);
            }
        }
 /// <summary>
 /// Calculates the annual cost.
 /// </summary>
 /// <param name="tariff">The Tariff data.</param>
 /// <param name="consumption">Annual consumption.</param>
 /// <returns>Result object with calculated data.</returns>
 public abstract Result CalculateAnnualCost(Tariff tariff, int consumption);