Пример #1
0
        public void Test_ExportCategoryData()
        {
            provider.Add(news1);
            provider.Add(category1);
            provider.AddCategories(news1, categories);

            var list = provider.ExportCategoryData(repository);

            provider.DeleteCategories(news1, categories);
            provider.Delete(news1);
            provider.Delete(category1);

            Assert.IsTrue(list.Count() > 0);
        }
Пример #2
0
        public void Export_Categories_Data()
        {
            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);

            var exportedCategories = provider.ExportCategoryData(repository);

            Assert.IsTrue(exportedCategories.Count() > 1);
        }
Пример #3
0
 public void TestExport()
 {
     var news         = textContentProvider.ExportSchemaData(newsSchema).ToArray();
     var categoryData = textContentProvider.ExportCategoryData(repository).ToArray();
 }