public void GetProviderNameTest()
        {
            //Assign
            //Act
            structuredDataInjectionRepository.GetProviderName();

            //Assert
            A.CallTo(() => fakeStructuredDataDynamicModuleRepository.GetProviderName())
            .MustHaveHappenedOnceExactly();
        }
Ejemplo n.º 2
0
        public StructuredDataInjection GetByJobProfileUrlName(string urlName)
        {
            var jobProfile = jobprofileRepository.Get(item => item.UrlName == urlName && item.Status == ContentLifecycleStatus.Live && item.Visible);

            if (jobProfile != null)
            {
                var structuredDataItems = dynamicContentExtensions.GetRelatedParentItems(jobProfile, DynamicTypes.StructuredDataInjectionContentType, structuredDataDynamicModuleRepository.GetProviderName());

                if (structuredDataItems.Any())
                {
                    var structuredDataItem = converter.ConvertFrom(structuredDataItems.First());
                    structuredDataItem.JobProfileLinkName = urlName;
                    return(structuredDataItem);
                }
            }

            return(null);
        }
Ejemplo n.º 3
0
 public string GetProviderName()
 {
     return(emailTemplateRepository.GetProviderName());
 }
 public string GetProviderName()
 {
     return(repository.GetProviderName());
 }
        public IQueryable <ApprenticeVacancy> GetApprenticeVacanciesBySocCode(string socCode)
        {
            var socCodeItem = repository.Get(item => item.Visible && item.Status == ContentLifecycleStatus.Live && item.GetValue <string>(nameof(SocCode.SOCCode)) == socCode);
            var vacancies   = dynamicContentExtensions.GetRelatedParentItems(socCodeItem, DynamicTypes.JobProfileApprenticeshipContentType, repository.GetProviderName());

            if (vacancies.Any())
            {
                return(vacancies.Select(item => converter.ConvertFrom(item)));
            }

            return(Enumerable.Empty <ApprenticeVacancy>().AsQueryable());
        }