public void DodgyVfsShouldPartiallyLoad() { var vf = Path.Combine(testFolder, "test.vf"); Directory.CreateDirectory(testFolder); var dir1 = Path.Combine(testFolder, "test"); Directory.CreateDirectory(dir1 + "\\path"); VirtualFolderContents generator = new VirtualFolderContents(""); generator.AddFolder(dir1); generator.AddFolder(@"\\10.0.0.4\mydir"); File.WriteAllText(vf, generator.Contents); var root = Kernel.Instance.GetLocation<VirtualFolderMediaLocation>(vf) ; Assert.AreEqual(1, root.Children.Count); }
public void VirtualFoldersCanContainDuplicateFiles() { Directory.CreateDirectory(testFolder); var dir1 = Path.Combine(testFolder, "test"); var dir2 = Path.Combine(testFolder, "test2"); var vf = Path.Combine(testFolder, "test.vf"); Directory.CreateDirectory(dir1 + "\\path"); Directory.CreateDirectory(dir2 + "\\path"); VirtualFolderContents generator = new VirtualFolderContents(""); generator.AddFolder(dir1); generator.AddFolder(dir2); File.WriteAllText(vf, generator.Contents); var root = Kernel.Instance.GetLocation<VirtualFolderMediaLocation>(vf); Assert.AreEqual(2, root.Children.Count); Assert.AreEqual(true, root.ContainsChild("path")); }