public void CanFind_ShadowFolder_WithoutDefaultFolderRoot(DefaultDirectoryMode stragegy, string expectedPath) { config.DefaultDirectory.Mode = stragegy; DefaultDirectorySelector finder = new DefaultDirectorySelector(host, config); string path = finder.GetDefaultDirectory(item2); Assert.That(path, Is.EqualTo(expectedPath)); }
public void CanFind_ShadowFolder_WhenUploading_NewFile() { config.DefaultDirectory.Mode = DefaultDirectoryMode.RecursiveNamesFromParent; config.DefaultDirectory.RootPath = "~/DefaultFolder/"; DefaultDirectorySelector finder = new DefaultDirectorySelector(host, config); var item3 = CreateOneItem<Items.NormalPage>(4, "item3", null); item3.VersionOf = item2; string path = finder.GetDefaultDirectory(item3); Assert.That(path, Is.EqualTo("~/DefaultFolder/item1/"), "Strategy ~/DefaultFolder/item1/"); }