public void VolumesExcludedCurrentContractBillingMonths()
        {
            var currentContract     = ContractReaderStub.Contract();
            var contracts           = ContractReaderStub.Contracts();
            var previousSiteVolumes =
                ContractProductSiteVolumeReaderStub.PreviousSiteVolumes();
            var currentContractSiteVolumes =
                ContractProductSiteVolumeReaderStub.CurrentSiteVolume();
            var previousContractForTheClient =
                SiteVolumeCalculator.PreviousContractForClient(currentContract,
                                                               contracts);
            var previousContractSiteVolumes =
                SiteVolumeCalculator.SiteVolumesForContract(
                    previousContractForTheClient,
                    previousSiteVolumes);
            var currentContractBillingMonths =
                SiteVolumeCalculator.BillingMonths(
                    currentContractSiteVolumes);

            var actualResult =
                SiteVolumeCalculator
                .VolumesExcludedCurrentContractBillingMonths(
                    currentContractBillingMonths, previousContractSiteVolumes);

            //march 3rd 2015
            Assert.AreEqual(50, actualResult.ElementAt(0).Volume);
            Assert.AreEqual(30, actualResult.ElementAt(0).SiteId);
            Assert.AreEqual(new DateTime(2015, 3, 1),
                            actualResult.ElementAt(0).BillingMonth);
        }
        public void TotalContractedVolumeForNoVolumeAvailableContract()
        {
            var contract  = ContractReaderStub.Contract();
            var contracts = ContractReaderStub.Contracts();
            var products  = ContractProductReaderStub.Products();
            var sites     = ContractProductSiteReaderStub.Sites();
            var volumes   = ContractProductSiteVolumeReaderStub.PreviousSiteVolumes();

            var forecaster =
                new SiteVolumeCalculator();

            var totalContractedSiteVolume =
                forecaster.TotalContractedVolume(contract,
                                                 contracts,
                                                 products, sites, volumes);

            Assert.AreEqual(150, totalContractedSiteVolume);
        }