Esempio n. 1
0
        protected Vertical CreateVertical(int index)
        {
            var vertical = new Vertical {
                Name = string.Format(VerticalNameFormat, index)
            };

            _verticalsCommand.CreateVertical(vertical);
            return(vertical);
        }
Esempio n. 2
0
        protected Community CreateCommunity(int index)
        {
            var id   = CommunityIds[index];
            var name = string.Format("Community{0}", index);
            var url  = string.Format("community{0}", index);

            _verticalsCommand.CreateVertical(new Vertical {
                Id = id, Name = name, Url = url
            });
            var community = new Community {
                Id = id, Name = name, HasMembers = true, HasOrganisations = true
            };

            _communitiesCommand.CreateCommunity(community);
            return(community);
        }
Esempio n. 3
0
        public static Vertical CreateTestVertical(this VerticalTestData data, IVerticalsCommand verticalsCommand, IContentEngine contentEngine)
        {
            if (data.Id != null)
            {
                var vertical = new Vertical
                {
                    Id                           = data.Id.Value,
                    Name                         = data.Name,
                    Url                          = data.Url,
                    Host                         = data.Host,
                    SecondaryHost                = data.SecondaryHost,
                    TertiaryHost                 = data.TertiaryHost,
                    CountryId                    = data.CountryId,
                    RequiresExternalLogin        = data.RequiresExternalLogin,
                    ExternalLoginUrl             = data.ExternalLoginUrl,
                    ExternalCookieDomain         = data.ExternalCookieDomain,
                    EmailDisplayName             = data.EmailDisplayName,
                    ReturnEmailAddress           = data.ReturnEmailAddress,
                    MemberServicesEmailAddress   = data.MemberServicesEmailAddress,
                    EmployerServicesEmailAddress = data.EmployerServicesEmailAddress
                };
                verticalsCommand.CreateVertical(vertical);

                if (contentEngine != null)
                {
                    contentEngine.CreateContent(vertical.Id, data.Header, data.Footer, data.HomePageTitle, data.ImageRootFolder, data.CandidateImageRelativePath, data.FaviconRelativePath);
                }
                return(vertical);
            }

            // Default, so just create the content.

            if (contentEngine != null)
            {
                contentEngine.CreateContent(null, data.Header, data.Footer, data.HomePageTitle, data.ImageRootFolder, data.CandidateImageRelativePath, data.FaviconRelativePath);
            }
            return(null);
        }