public void CompanysAllExistInDatabaseAlready()
        {
            var companyRepositoryResult = CompanyFinderResult.Select(d => Company.Create(d.Value, d.Key, Company.ConstituentOfIndex.Unknown));
            this.SetupMocks(CompanyFinderResult, companyRepositoryResult);
            var service = new CompanyDataManagementService(companyFinderService.Object, companyRepository.Object);
            service.GetNewCompanies();

            companyRepository.Verify(m => m.InsertAll(It.IsAny<IEnumerable<Company>>()), Times.Never);
        }
        public void CompanyDoesntExistInDatabase()
        {
            var companyRepositoryResult = CompanyFinderResult.Select(d => Company.Create(d.Value, d.Key, Company.ConstituentOfIndex.Unknown));
            this.SetupMocks(CompanyFinderResult, companyRepositoryResult.Skip(1).Take(2));
            var service = new CompanyDataManagementService(companyFinderService.Object, companyRepository.Object);
            service.GetNewCompanies();

            companyRepository.Verify(m => m.InsertAll(It.Is<IEnumerable<Company>>(c => c.Count() == 1)), Times.Once);
            companyRepository.Verify(m => m.InsertAll(It.Is<IEnumerable<Company>>(c => c.Count(r => r.Name == "Test 1") == 1)), Times.Once);
        }