public void IsContractHasSomeVolume()
        {
            var contract = ContractReaderStub.Contract();
            var volumes  = ContractProductSiteVolumeReaderStub.SomeVolumes();

            var actualResult =
                SiteVolumeCalculator.IsContractHasSomeVolume(contract, volumes);

            Assert.AreEqual(true, actualResult);
        }
        public void CurrentContractBillingMonths()
        {
            var contract    = ContractReaderStub.Contract();
            var volumes     = ContractProductSiteVolumeReaderStub.SomeVolumes();
            var siteVolumes =
                SiteVolumeCalculator.SiteVolumesForContract(contract,
                                                            volumes);

            var billingMonths =
                SiteVolumeCalculator.BillingMonths(
                    siteVolumes);


            Assert.AreEqual(1, billingMonths[0].Item1);
            Assert.AreEqual(2016, billingMonths[0].Item2);
        }
        public void DecoupleSiteVolumeCalculatorFromForecaster()
        {
            var contract  = ContractReaderStub.Contract();
            var contracts = ContractReaderStub.Contracts();
            var products  = ContractProductReaderStub.Products();
            var sites     = ContractProductSiteReaderStub.Sites();
            var volumes   = ContractProductSiteVolumeReaderStub.SomeVolumes();

            var volumeCalculator =
                new SiteVolumeCalculator();
            var volumeForecaster = new SiteVolumeForecaster(volumeCalculator);

            var actualResult = volumeForecaster.TotalContractedVolume(
                contract, contracts,
                products,
                sites,
                volumes);

            Assert.AreEqual(250, actualResult);
        }