public Provider GetProvider(string ukprn, bool errorIfNotFound = true) { Condition.Requires(ukprn).IsNotNullOrEmpty(); _logService.Debug("Calling ProviderReadRepository to get provider with UKPRN='{0}'.", ukprn); return(_providerReadRepository.GetByUkprn(ukprn, errorIfNotFound)); }
public void ShouldGetProvider() { // Act. var provider = _providerReadRepository.GetByUkprn(SeedData.Providers.HopwoodHallCollege.Ukprn); // Assert. provider.Should().NotBeNull(); // Act provider = _providerReadRepository.GetById(provider.ProviderId); // Assert. provider.Should().NotBeNull(); // Act var providers = _providerReadRepository.GetByIds(new[] { provider.ProviderId }); providers.Should().HaveCount(1); providers.First().ShouldBeEquivalentTo(provider); }