예제 #1
0
        public void Insert_Delete_Category()
        {
            TextContent news1 = new TextContent(repository.Name, newsSchema.Name, textFolder.FullName);

            news1["Title"] = "title1";
            news1["body"]  = "body1";
            provider.Add(news1);

            TextContent category1 = new TextContent(repository.Name, "category", "category");

            category1["Title"] = "category1";
            provider.Add(category1);

            var categories = new Category[] { new Category()
                                              {
                                                  ContentUUID = news1.UUID, CategoryFolder = category1.FolderName, CategoryUUID = category1.UUID
                                              } };

            provider.AddCategories(news1, categories);
            provider.DeleteCategories(news1, categories);
            provider.AddCategories(news1, categories);
            provider.ClearCategories(news1);

            provider.ClearCategories(news1);
        }
예제 #2
0
 public void Test_AddCategories()
 {
     provider.Add(news1);
     provider.Add(category1);
     provider.AddCategories(news1, categories);
     provider.ClearCategories(news1);
     provider.AddCategories(news1, categories);
     provider.DeleteCategories(news1, categories);
     provider.Delete(news1);
     provider.Delete(category1);
 }
예제 #3
0
        public void TestClearCategory()
        {
            var     contentProvider = new TextContentProvider();
            dynamic category1       = new TextContent(repository.Name, categorySchema.Name, categoryFolder.Name);

            category1.UserKey = "TestClearCategory-category1";
            category1.Title   = "TestClearCategory-category1";
            contentProvider.Add(category1);
            dynamic content1 = new TextContent(repository.Name, newsSchema.Name, newsFolder.Name);

            content1.UserKey = "TestClearCategory-news1";
            content1.Title   = "TestClearCategory-news1";
            contentProvider.Add(content1);
            contentProvider.AddCategories(content1, new Category()
            {
                ContentUUID = content1.uuid, CategoryFolder = categoryFolder.Name, CategoryUUID = category1.UUID
            });

            contentProvider.ClearCategories(content1);
        }
예제 #4
0
 public virtual void ClearCategories(Repository repository, TextContent textContent)
 {
     TextContentProvider.ClearCategories(textContent);
 }
예제 #5
0
        public void TestClearCategory()
        {
            var contentProvider = new TextContentProvider();
            dynamic category1 = new TextContent(repository.Name, categorySchema.Name, categoryFolder.Name);
            category1.UserKey = "TestClearCategory-category1";
            category1.Title = "TestClearCategory-category1";
            contentProvider.Add(category1);
            dynamic content1 = new TextContent(repository.Name, newsSchema.Name, newsFolder.Name);
            content1.UserKey = "TestClearCategory-news1";
            content1.Title = "TestClearCategory-news1";
            contentProvider.Add(content1);
            contentProvider.AddCategories(content1, new Category() { ContentUUID = content1.uuid, CategoryFolder = categoryFolder.Name, CategoryUUID = category1.UUID });

            contentProvider.ClearCategories(content1);
        }