Esempio n. 1
0
        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");
        }
Esempio n. 2
0
        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");
        }
Esempio n. 3
0
        public void TestGetFile()
        {
            Win32Path Path = new Win32Path(@"d:\music\whitney houston\greatest hits\song1.mp3");

            Assert.AreEqual(Path.GetFile().ToString(), "song1.mp3");
        }