public IEnumerable <MusicContract> FindContracts(string partnerName, DateTime date)
        {
            var partnerContract = _partnerContractRepo.GetByPartnerName(partnerName);

            if (partnerContract == null)
            {
                throw new ArgumentException("Partner does not exist.", nameof(partnerName));
            }

            var contracts = _musicContractRepo.GetForUsageAndDate(partnerContract.Usage, date);

            return(contracts.Select(c => new MusicContract
            {
                Artist = c.Artist,
                Title = c.Title,
                Usages = new[] { partnerContract.Usage },
                StartDate = c.StartDate,
                EndDate = c.EndDate
            }).ToArray());
        }
        public void FindContracts_ShouldThrowIfPartnerDoesntExist()
        {
            A.CallTo(() => _partnerContractRepo.GetByPartnerName("partner")).Returns(null);

            var ex = Assert.Throws <ArgumentException>(() => _sut.FindContracts("partner", new DateTime(2012, 6, 1)));
        }