public void PathCreateFromUrl() { Console.WriteLine("Filesystem.Shell32.PathCreateFromUrl()"); string urlPath = Shell32.UrlCreateFromPath(AppData); string filePath = Shell32.PathCreateFromUrl(urlPath); Console.WriteLine("\n\tDirectory : [{0}]", AppData); Console.WriteLine("\n\tShell32.UrlCreateFromPath(): [{0}]", urlPath); Console.WriteLine("\n\tShell32.PathCreateFromUrl() == [{0}]\n", filePath); bool startsWith = urlPath.StartsWith("file:///"); bool equalsAppData = filePath.Equals(AppData); Console.WriteLine("\n\turlPath.StartsWith(\"file:///\") == [{0}]: {1}", TextTrue, startsWith); Console.WriteLine("\n\tfilePath.Equals(AppData) == [{0}]: {1}\n", TextTrue, equalsAppData); Assert.IsTrue(startsWith); Assert.IsTrue(equalsAppData); }
public void AlphaFS_Shell32_PathCreateFromUrl() { Console.WriteLine("Filesystem.Shell32.PathCreateFromUrl()"); var urlPath = Shell32.UrlCreateFromPath(UnitTestConstants.AppData); var filePath = Shell32.PathCreateFromUrl(urlPath); Console.WriteLine("\n\tDirectory : [{0}]", UnitTestConstants.AppData); Console.WriteLine("\n\tShell32.UrlCreateFromPath(): [{0}]", urlPath); Console.WriteLine("\n\tShell32.PathCreateFromUrl() == [{0}]\n", filePath); var startsWith = urlPath.StartsWith("file:///"); var equalsAppData = filePath.Equals(UnitTestConstants.AppData); Console.WriteLine("\n\turlPath.StartsWith(\"file:///\") == [{0}]: {1}", UnitTestConstants.TextTrue, startsWith); Console.WriteLine("\n\tfilePath.Equals(AppData) == [{0}]: {1}\n", UnitTestConstants.TextTrue, equalsAppData); Assert.IsTrue(startsWith); Assert.IsTrue(equalsAppData); }