public void TestExclude() { Win32Path FirstPath = new Win32Path(@"d:\music\whitney houston\greatest hits\song1.mp3"); Win32Path SecondPath = new Win32Path(@"d:\music"); IPath ExcludedPath = FirstPath.Exclude(SecondPath); Assert.AreEqual(ExcludedPath.ToString(), @"\whitney houston\greatest hits\song1.mp3"); }
public void TestCombine() { Win32Path FirstPath = new Win32Path(@"c:\users\jasonsch\desktop"); Win32Path SecondPath = new Win32Path(@"subdir1\subdir2\foo.jpg"); IPath CombinedPath = FirstPath.Combine(SecondPath); Assert.AreEqual(CombinedPath.ToString(), @"c:\users\jasonsch\desktop\subdir1\subdir2\foo.jpg"); }
public void TestGetFile() { Win32Path Path = new Win32Path(@"d:\music\whitney houston\greatest hits\song1.mp3"); Assert.AreEqual(Path.GetFile().ToString(), "song1.mp3"); }