public ProviderSite GetProviderSite(string edsUrn)
        {
            Condition.Requires(edsUrn).IsNotNullOrEmpty();

            _logService.Debug("Calling ProviderSiteReadRepository to get provider site with ERN='{0}'.", edsUrn);

            return(_providerSiteReadRepository.GetByEdsUrn(edsUrn));
        }
Exemple #2
0
        public void ShouldGetProviderSite()
        {
            // Act.
            var edsUrn = SeedData.ProviderSites.HopwoodCampus.EdsUrn;
            var providerSiteByEdsUrn = _providerSiteReadRepository.GetByEdsUrn(edsUrn);

            // Assert.
            providerSiteByEdsUrn.Should().NotBeNull();
            providerSiteByEdsUrn.EdsUrn.Should().Be(edsUrn);

            // Act.
            var providerSiteById = _providerSiteReadRepository.GetById(providerSiteByEdsUrn.ProviderSiteId);

            // Assert.
            providerSiteById.Should().NotBeNull();
            providerSiteById.ShouldBeEquivalentTo(providerSiteByEdsUrn);
        }