Esempio n. 1
0
        public static Community CreateTestCommunity(this CommunityTestData data, ICommunitiesCommand communitiesCommand, IVerticalsCommand verticalsCommand, IContentEngine contentEngine)
        {
            data.CreateTestVertical(verticalsCommand, contentEngine);
            var community = new Community
            {
                Id               = data.Id.Value,
                Name             = data.Name,
                EmailDomain      = data.EmailDomain,
                HasMembers       = data.HasMembers,
                HasOrganisations = data.HasOrganisationalUnits,
                OrganisationsCanSearchAllMembers = data.OrganisationsCanSearchAllMembers,
                OrganisationsAreBranded          = data.OrganisationsAreBranded,
            };

            communitiesCommand.CreateCommunity(community);
            return(community);
        }
Esempio n. 2
0
        public static Community CreateTestCommunity(this ICommunitiesCommand communitiesCommand, int index)
        {
            var community = new Community
            {
                Id               = Guid.NewGuid(),
                Name             = string.Format(CommunityNameFormat, index),
                ShortName        = string.Format(CommunityShortNameFormat, index),
                EmailDomain      = null,
                HasMembers       = true,
                HasOrganisations = false,
                OrganisationsCanSearchAllMembers = false,
                OrganisationsAreBranded          = false,
            };

            communitiesCommand.CreateCommunity(community);
            return(community);
        }
Esempio n. 3
0
 public static Community CreateTestCommunity(this TestCommunity community, ICommunitiesCommand communitiesCommand, IVerticalsCommand verticalsCommand)
 {
     return(communitiesCommand.CreateTestCommunity(verticalsCommand, community.ToString()));
 }
Esempio n. 4
0
 private static Community CreateTestCommunity(this ICommunitiesCommand communitiesCommand, IVerticalsCommand verticalsCommand, string name)
 {
     return(GetCommunityTestData(name).CreateTestCommunity(communitiesCommand, verticalsCommand));
 }
Esempio n. 5
0
 public static Community CreateTestCommunity(this CommunityTestData data, ICommunitiesCommand communitiesCommand, IVerticalsCommand verticalsCommand)
 {
     return(CreateTestCommunity(data, communitiesCommand, verticalsCommand, null));
 }