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 Test_Get_Folder() { MediaFolder mediaFolder = new MediaFolder(repository, "Test_Get_Folder"); mediaFolder.DisplayName = "Test get Folder"; mediaFolder.UserId = "admin"; provider.Add(mediaFolder); var gotFolder = provider.Get(mediaFolder); Assert.IsNotNull(gotFolder); Assert.AreEqual(mediaFolder.DisplayName, gotFolder.DisplayName); Assert.AreEqual(mediaFolder.UserId, gotFolder.UserId); }