public void Test_Add_Folder() { MediaFolder mediaFolder = new MediaFolder(repository, "Test_Add_Folder"); mediaFolder.DisplayName = "Test Add Folder"; mediaFolder.UserId = "admin"; provider.Add(mediaFolder); }
public void TestBinaryContentFolder() { MediaFolderProvider repository = new MediaFolderProvider(); var folderName = "Images"; var folder = new MediaFolder(contentRepository, folderName) { AllowedExtensions = new[] { ".jpg", ".png" } }; repository.Add(folder); var all = repository.All(contentRepository); Assert.AreEqual(1, all.Count()); var item = (MediaFolder)repository.Get(all.First()); Assert.AreEqual(folder.Name, item.Name); Assert.AreEqual(folder.DisplayName, item.DisplayName); Assert.AreEqual(folder.Repository, item.Repository); Assert.AreEqual(folder.AllowedExtensions.Count(), item.AllowedExtensions.Count()); // repository.Remove(item); }
public void TestBinaryContentFolder() { MediaFolderProvider repository = new MediaFolderProvider(); var folderName = "Images"; var folder = new MediaFolder(contentRepository, folderName) { AllowedExtensions = new[] { ".jpg", ".png" } }; repository.Add(folder); var all = repository.All(contentRepository); Assert.AreEqual(1, all.Count()); var item = (MediaFolder)repository.Get(all.First()); Assert.AreEqual(folder.Name, item.Name); Assert.AreEqual(folder.DisplayName, item.DisplayName); Assert.AreEqual(folder.Repository, item.Repository); Assert.AreEqual(folder.AllowedExtensions.Count(), item.AllowedExtensions.Count()); // repository.Remove(item); }