public override IEnumerable <DefinitionBase> GetAdditionalArtifacts()
        {
            var sandboxSolution = new SandboxSolutionDefinitionGenerator().GenerateRandomDefinition();
            var webpartFeature  = new FeatureDefinition
            {
                Scope  = FeatureDefinitionScope.Site,
                Id     = new Guid("9acf0f59-3cdc-412b-a647-4185dd4cd9bc"),
                Enable = true
            };

            return(new DefinitionBase[] { sandboxSolution, webpartFeature });
        }
Exemplo n.º 2
0
        public void CanDeploy_SandboxSiteFeature()
        {
            var sandboxSolution = new SandboxSolutionDefinitionGenerator().GenerateRandomDefinition() as SandboxSolutionDefinition;

            var model = SPMeta2Model
                .NewSiteModel(site =>
                {
                    site.AddSandboxSolution(sandboxSolution);

                    site.AddFeature(new FeatureDefinition
                    {
                        Enable = true,
                        ForceActivate = true,
                        Id = DefaultContainers.Sandbox.SiteFeatureId,
                        Scope = FeatureDefinitionScope.Site
                    });
                });

            TestModel(model);
        }
Exemplo n.º 3
0
        public void CanDeploy_SandboxSiteFeature()
        {
            var sandboxSolution = new SandboxSolutionDefinitionGenerator().GenerateRandomDefinition() as SandboxSolutionDefinition;

            var model = SPMeta2Model
                        .NewSiteModel(site =>
            {
                site.AddSandboxSolution(sandboxSolution);

                site.AddFeature(new FeatureDefinition
                {
                    Enable        = true,
                    ForceActivate = true,
                    Id            = DefaultContainers.Sandbox.SiteFeatureId,
                    Scope         = FeatureDefinitionScope.Site
                });
            });

            TestModel(model);
        }