コード例 #1
0
 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());
 }
コード例 #2
0
 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());
 }
コード例 #3
0
 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());
 }
コード例 #4
0
 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());
 }