public void SetUp() { Guid page1Id = ServerOperations.Pages().CreatePage(PageName); ServerOperationsFeather.Pages().AddDocumentsListWidgetToPage(page1Id); ServerSideUpload.CreateDocumentLibrary(DocumentLibraryTitle); List <Guid> listOfIds = new List <Guid>(); var guidDoc1 = ServerSideUpload.UploadDocument(DocumentLibraryTitle, DocumentTitle + 1, ImageResource1); listOfIds.Add(guidDoc1); var guidDoc2 = ServerSideUpload.UploadDocument(DocumentLibraryTitle, DocumentTitle + 2, ImageResource2); listOfIds.Add(guidDoc2); var guidDoc3 = ServerSideUpload.UploadDocument(DocumentLibraryTitle, DocumentTitle + 3, ImageResource3); listOfIds.Add(guidDoc3); var guidDoc4 = ServerSideUpload.UploadDocument(DocumentLibraryTitle, DocumentTitle + 4, ImageResource4); listOfIds.Add(guidDoc4); this.AssignTaxonomiesToImages(listOfIds); this.ChangeThePublicationDateOfADocument(); }
public void Setup() { ServerOperations.Documents().CreateDocumentLibrary(LibraryTitle); ServerSideUpload.UploadDocument(LibraryTitle, DocumentTitle + 1, DocumentResource1); ServerSideUpload.UploadDocument(LibraryTitle, DocumentTitle + 3, DocumentResource3); ServerSideUpload.UploadDocument(LibraryTitle, DocumentTitle + 2, DocumentResource2); }
public void SetUp() { Guid templateId = ServerOperations.Templates().GetTemplateIdByTitle(PageTemplateName); Guid pageId = ServerOperations.Pages().CreatePage(PageName, templateId); Guid pageNodeId = ServerOperations.Pages().GetPageNodeId(pageId); ServerSideUpload.CreateDocumentLibrary(DocumentLibraryTitle); Guid documentId = ServerSideUpload.UploadDocument(DocumentLibraryTitle, DocumentTitle, DocumentResource1); ServerOperations.Taxonomies().CreateCategory(this.taxonTitleDocuments); Guid categoryId = TaxonomyManager.GetManager().GetTaxa <HierarchicalTaxon>().SingleOrDefault(t => t.Title == this.taxonTitleDocuments).Id; ServerOperations.Documents().AssignTaxonToDocument(documentId, "Category", categoryId); ServerOperations.Taxonomies().CreateCategory(this.taxonTitleNews + "0"); for (int i = 1; i < 4; i++) { ServerOperations.Taxonomies().CreateCategory(this.taxonTitleNews + i, this.taxonTitleNews + (i - 1)); ServerOperationsFeather.NewsOperations().CreatePublishedNewsItem(NewsTitle + i, NewsContent, AuthorName, SourceName, new List <string> { this.taxonTitleNews + i }, null, null); } ServerOperationsFeather.Pages().AddNewsWidgetToPage(pageNodeId, Placeholder); ServerOperationsFeather.Pages().AddCategoriesWidgetToPage(pageNodeId, Placeholder); ServerOperationsFeather.Pages().AddDocumentsListWidgetToPage(pageNodeId, Placeholder); }
public void SetUp() { Guid templateId = Telerik.Sitefinity.TestUtilities.CommonOperations.ServerOperations.Templates().GetTemplateIdByTitle(PageTemplateName); Telerik.Sitefinity.TestUtilities.CommonOperations.ServerOperations.Pages().CreatePage(PageName, templateId); ServerOperations.Documents().CreateDocumentLibrary(LibraryTitle); ServerSideUpload.UploadDocument(LibraryTitle, DocumentTitle1, DocumentResource1); ServerSideUpload.UploadDocument(LibraryTitle, DocumentTitle2, DocumentResource2); }
public void UploadDocument() { ServerOperations.Documents().CreateDocumentLibrary(LibraryTitle); Guid id = ServerSideUpload.UploadDocument(LibraryTitle, DocumentTitle, DocumentResource); var manager = LibrariesManager.GetManager(); var master = manager.GetDocument(id); var live = manager.Lifecycle.GetLive(master); ServerArrangementContext.GetCurrent().Values.Add("documentId", live.Id.ToString()); }
public void SetUp() { Guid templateId = Telerik.Sitefinity.TestUtilities.CommonOperations.ServerOperations.Templates().GetTemplateIdByTitle(PageTemplateName); Guid pageId = Telerik.Sitefinity.TestUtilities.CommonOperations.ServerOperations.Pages().CreatePage(PageName, templateId); pageId = ServerOperations.Pages().GetPageNodeId(pageId); ServerOperationsFeather.Pages().AddDocumentsListWidgetToPage(pageId, "Contentplaceholder1"); ServerSideUpload.CreateDocumentLibrary(LibraryTitle); ServerSideUpload.CreateDocumentLibrary(AnotherDocumentLibraryTitle); ServerSideUpload.UploadDocument(LibraryTitle, DocumentTitle + 1, ImageResource1); ServerSideUpload.UploadDocument(AnotherDocumentLibraryTitle, DocumentTitle + 2, ImageResource2); ServerSideUpload.UploadDocument(AnotherDocumentLibraryTitle, DocumentTitle + 3, ImageResource3); }
public void SetUp() { AuthenticationHelper.AuthenticateUser(AdminUserName, AdminPass, true); Guid templateId = Telerik.Sitefinity.TestUtilities.CommonOperations.ServerOperations.Templates().GetTemplateIdByTitle(PageTemplateName); Guid pageId = Telerik.Sitefinity.TestUtilities.CommonOperations.ServerOperations.Pages().CreatePage(PageName, templateId); pageId = ServerOperations.Pages().GetPageNodeId(pageId); ServerOperationsFeather.Pages().AddContentBlockWidgetToPage(pageId, string.Empty, PlaceHolderId); ServerOperations.Documents().CreateDocumentLibrary(LibraryTitle); ServerSideUpload.UploadDocument(LibraryTitle, DocumentTitle1, DocumentResource1); ServerSideUpload.UploadDocument(LibraryTitle, DocumentTitle2, DocumentResource2); }
public void SetUp() { Guid page1Id = ServerOperations.Pages().CreatePage(PageName); ServerOperationsFeather.Pages().AddDocumentsListWidgetToPage(page1Id); Guid singleItemPageId = ServerOperations.Pages().CreatePage(SingleItemPage); ServerOperationsFeather.Pages().AddDocumentsListWidgetToPage(singleItemPageId); var parentId = ServerSideUpload.CreateDocumentLibrary(DocumentLibraryTitle); var childId = ServerSideUpload.CreateFolder(ChildLibraryTitle, parentId); ServerSideUpload.UploadDocument(DocumentLibraryTitle, DocumentTitle + 1, ImageResource1); ServerSideUpload.UploadDocument(DocumentLibraryTitle, DocumentTitle + 4, ImageResource4); ServerOperationsFeather.MediaOperations().UploadDocumentInFolder(childId, DocumentTitle + 3, ImageResource3); ServerOperationsFeather.MediaOperations().UploadDocumentInFolder(childId, DocumentTitle + 2, ImageResource2); }
public void SetUp() { AuthenticationHelper.AuthenticateUser(AdminUserName, AdminPass, true); Guid page1Id = ServerOperations.Pages().CreatePage(PageName); ServerOperationsFeather.Pages().AddContentBlockWidgetToPage(page1Id); var parentId = ServerSideUpload.CreateDocumentLibrary(DocumentLibraryTitle); var childId = ServerSideUpload.CreateFolder(ChildLibraryTitle, parentId); var nextChildId = ServerSideUpload.CreateFolder(NextChildLibraryTitle, childId); ServerSideUpload.UploadDocument(DocumentLibraryTitle, DocumentTitle + 1, DocumentResource); ServerOperationsFeather.MediaOperations().UploadDocumentInFolder(childId, DocumentTitle + 2, DocumentResourceChild); ServerOperations.Users().CreateUserWithProfileAndRoles("administrator", "password", "Administrator", "User", "*****@*****.**", new List <string> { "BackendUsers", "Administrators" }); AuthenticationHelper.AuthenticateUser("administrator", "password", true); ServerOperationsFeather.MediaOperations().UploadDocumentInFolder(nextChildId, DocumentTitle + 3, DocumentResourceNextChild); }