public void Test_ImportCategoryData() { provider.Add(news1); provider.Add(category1); provider.ImportCategoryData(repository, categories); provider.DeleteCategories(news1, categories); provider.Delete(news1); provider.Delete(category1); }
public void TestImport() { var category = new TextContent(categorySchema.Repository.Name, categorySchema.Name, categoryFolder.FullName); category.UserKey = "import-category"; category["Title"] = "import-category"; var news1 = new TextContent(newsSchema.Repository.Name, newsSchema.Name, newsFolder.FullName); news1.UserKey = "import-news"; news1["Title"] = "import-news"; news1["Body"] = "import-news"; textContentProvider.ImportSchemaData(categorySchema, new[] { category }); textContentProvider.ImportSchemaData(newsSchema, new[] { news1 }); textContentProvider.ImportCategoryData(repository, new[] { new Category() { ContentUUID = news1.UUID, CategoryFolder = category.FolderName, CategoryUUID = category.UUID } }); }