public void CleanUp() { if (ContextSharePoint.VerifyServer(site)) { site.Dispose(); } }
public void CreateColumnSiteBoolean() { if (!ContextSharePoint.VerifyServer(site)) { Assert.Inconclusive(); } siteColumn = new Entities.Artefacts.SiteColumn(new ParamsSiteColumnBaseExtended { AddPrefix = true, FieldType = SPFieldType.Boolean, Group = "TEST", MultiValue = false, Name = "ColumnBoolean", Requiered = false, Web = site.RootWeb }); Assert.IsTrue(siteColumn.Create()); siteColumn = new Entities.Artefacts.SiteColumn(new ParamsSiteColumnBase { AddPrefix = true, Name = "ColumnBoolean", Web = site.RootWeb }); Assert.IsTrue(siteColumn.Exist()); Assert.IsTrue(siteColumn.Delete()); }
public void CreateListAddField() { if (!ContextSharePoint.VerifyServer(Site)) { Assert.Inconclusive(); } var contentType = new ContentType(Site.RootWeb, this.Logger, "TESTHELLO", "TEST", "Elemento"); contentType.Create(string.Empty); ListSharePoint = new ListSharePoint(Site.RootWeb, Logger, "LISTATEST"); Assert.IsTrue(ListSharePoint.Create("descripcion", ListTemplateType.Contacts, true)); var siteColumn = new Entities.Artefacts.SiteColumn(new ParamsSiteColumnBaseExtended { AddPrefix = false, FieldType = SPFieldType.Text, Group = "Lista", Logger = this.Logger, MultiValue = false, Name = "Field1", Requiered = true, Web = Site.RootWeb }); Assert.IsTrue(ListSharePoint.AddField(siteColumn)); Assert.IsTrue(ListSharePoint.DeleteField(siteColumn)); Assert.IsTrue(ListSharePoint.Delete()); }
public void CleanUp() { if (ContextSharePoint.VerifyServer(Site)) { SiteColumn.Delete(); Site.Dispose(); } }
public void AddGroupFail() { if (!ContextSharePoint.VerifyServer(Site)) { Assert.Inconclusive(); } Taxonomy = new Taxonomy(this.Site, this.Logger, string.Empty); Assert.IsFalse(Taxonomy.AddGroup("Test")); }
public void CreateSiteFail() { if (!ContextSharePoint.VerifyServer(SpSite)) { Assert.Inconclusive(); } Site = new Site(null, this.Logger); Assert.IsFalse(Site.CreateSite("Test", "Test", "Descripcion", "STS#0", 3082)); }
public void AddTerm() { if (!ContextSharePoint.VerifyServer(Site)) { Assert.Inconclusive(); } Taxonomy = new Taxonomy(this.Site, this.Logger, "Managed Metadata Service", "Test"); Assert.IsTrue(Taxonomy.AddTerms("Adrian")); }
public void CreateContentType() { if (!ContextSharePoint.VerifyServer(Site)) { Assert.Inconclusive(); } ContentType = new ContentType(Site.RootWeb, Logger, "Nuevo Tipo Contenido1", "TEST", "Item"); Assert.IsTrue(ContentType.Create(string.Empty)); Assert.IsTrue(ContentType.Delete()); }
public void CreateList() { if (!ContextSharePoint.VerifyServer(Site)) { Assert.Inconclusive(); } ListSharePoint = new ListSharePoint(Site.RootWeb, Logger, "LISTATEST"); Assert.IsTrue(ListSharePoint.Create("descripcion", ListTemplateType.Contacts, true)); Assert.IsTrue(ListSharePoint.Delete()); }
public void CreateContentTypebyGuid() { if (!ContextSharePoint.VerifyServer(Site)) { Assert.Inconclusive(); } ContentType = new ContentType(Site.RootWeb, Logger, "Nuevo tipo Contenido", "TEst", "Elemento"); Assert.IsTrue(ContentType.Create("0x0100B84152A0E015D14CA1300027B66FAD1F")); Assert.IsTrue(ContentType.Delete()); }
public void Permision() { if (!ContextSharePoint.VerifyServer(SpSite)) { Assert.Inconclusive(); } Site = new Site(SpSite.RootWeb, this.Logger); Assert.IsTrue(Site.AddPermision("Administradores de jerarquías", RoleType.Administrator)); Assert.IsTrue(Site.RemovePermision("Administradores de jerarquías")); }
public void GetTerm() { if (!ContextSharePoint.VerifyServer(Site)) { Assert.Inconclusive(); } Taxonomy = new Taxonomy(this.Site, this.Logger, "Managed Metadata Service", "Test"); Assert.IsTrue(Taxonomy.GetAllTerms().Any()); Assert.IsTrue(Taxonomy.GetTerms("Test").Any()); Assert.IsTrue(Taxonomy.GetSubTerms("Test", "Adrian").Count == 0); }
public void PropertyBug() { if (!ContextSharePoint.VerifyServer(SpSite)) { Assert.Inconclusive(); } SPWeb web = SpSite.RootWeb; Assert.IsTrue(web.SetPropertyBag("hola11", "World")); Assert.AreEqual(web.GetPropertyBag("hola11"), "World"); }
public void CreateListAddContentType() { if (!ContextSharePoint.VerifyServer(Site)) { Assert.Inconclusive(); } var contentType = new ContentType(Site.RootWeb, this.Logger, "TESTHELLO", "TEST", "Elemento"); contentType.Create(string.Empty); ListSharePoint = new ListSharePoint(Site.RootWeb, Logger, "LISTATEST"); Assert.IsTrue(ListSharePoint.Create("descripcion", ListTemplateType.Contacts, true)); Assert.IsTrue(ListSharePoint.AddContentType("TESTHELLO")); Assert.IsTrue(ListSharePoint.DeleteContentType("TESTHELLO")); Assert.IsFalse(ListSharePoint.AddContentType("TESTBYE")); Assert.IsTrue(ListSharePoint.Delete()); }
public void Init() { Site = ContextSharePoint.CreateClientContext(); if (ContextSharePoint.VerifyServer(Site)) { SiteColumn = new Entities.Artefacts.SiteColumn(new ParamsSiteColumnBaseExtended { AddPrefix = true, FieldType = SPFieldType.Text, Group = "Test", MultiValue = false, Name = "test1", Requiered = false, Web = Site.RootWeb }); SiteColumn.Create(); } Logger = new LogManager().GetLogger(new System.Diagnostics.StackTrace().GetFrame(0)); }
public void CreateColumnSiteDateTime() { if (!ContextSharePoint.VerifyServer(site)) { Assert.Inconclusive(); } siteColumn = new Entities.Artefacts.SiteColumn(new ParamsSiteColumnBaseExtended { Web = site.RootWeb, AddPrefix = true, FieldType = SPFieldType.DateTime, Group = "TEST", MultiValue = false, Name = "ColumnDateTime", Requiered = false }, TypeDate.Date); Assert.IsTrue(siteColumn.Create()); Assert.IsTrue(siteColumn.Delete()); }
public void CreateColumnSiteText() { if (!ContextSharePoint.VerifyServer(site)) { Assert.Inconclusive(); } var siteColumn = new Entities.Artefacts.SiteColumn(new ParamsSiteColumnDefaultValue { Web = site.RootWeb, AddPrefix = true, FieldType = SPFieldType.Text, Group = "TEST", MultiValue = false, Name = "ColumnText", Requiered = false, DefaultValue = "GIKA" }); Assert.IsTrue(siteColumn.Create()); Assert.IsTrue(siteColumn.Delete()); }
public void CreateColumnSiteChoiceParams() { if (!ContextSharePoint.VerifyServer(site)) { Assert.Inconclusive(); } siteColumn = new Entities.Artefacts.SiteColumn(new ParamsSiteColumnChoices { Web = site.RootWeb, AddPrefix = true, FieldType = SPFieldType.Choice, Group = "TEST", MultiValue = false, Name = "ColumnChoice", Requiered = false, Choices = new StringCollection { "one", "thow" } }, "thow", true); Assert.IsTrue(siteColumn.Create()); Assert.IsTrue(siteColumn.Delete()); }