public void DirectoryIteratorBehaviorAbsolutePath() { Debug.WriteLine("TEST START: DirectoryIteratorBehaviorAbsolutePath"); _io.Write("a.txt", _data); _io.Write("b.txt", _data); _io.Write("x/y/c.txt", _data); var expectedEntriesPaths = new HashSet <string> { Path.Combine(AssemblyUtilsEx.GetExecutingAssemblyDirectory(), TestFolder, "a.txt"), Path.Combine(AssemblyUtilsEx.GetExecutingAssemblyDirectory(), TestFolder, "b.txt"), Path.Combine(AssemblyUtilsEx.GetExecutingAssemblyDirectory(), TestFolder, "x") }; var actualEntriesPaths = new HashSet <string>( Directory.EnumerateFileSystemEntries(Path.Combine(AssemblyUtilsEx.GetExecutingAssemblyDirectory(), TestFolder))); // When iterating over an absolute path, it produces absolute paths Assert.IsTrue(HashSetUtil.AreEqual(actualEntriesPaths, expectedEntriesPaths)); }
public void CurrentPathFormat() { Debug.WriteLine("TEST START: CurrentPathFormat"); Assert.IsTrue(Path.IsPathRooted(AssemblyUtilsEx.GetExecutingAssemblyDirectory())); }
public void TestInitialize() { TestCleanup(); _io = new WindowsFileSystemCacheKeyStorage(Path.Combine(AssemblyUtilsEx.GetExecutingAssemblyDirectory(), TestFolder)); _data = RandomDataUtils.GetRandomData(1024); }