Example #1
0
        public void RelativePath()
        {
            Assert.AreEqual(@"C:\temp\f1\file.txt", FileReferenceUtils.ResolveShortcutPath(m_collection.ListShortcuts(), @"[Anna]\f1\file.txt"));
            Assert.AreEqual(@"C:\temp\sub\f1\file.txt", FileReferenceUtils.ResolveShortcutPath(m_collection.ListShortcuts(), @"[Christina]\f1\file.txt"));

            Assert.AreEqual(@"C:\temp\..\f2\file.txt", FileReferenceUtils.ResolveShortcutPath(m_collection.ListShortcuts(), @"[Anna]\..\f2\file.txt"));
            Assert.AreEqual(@"C:\temp\sub\..\f2\file.txt", FileReferenceUtils.ResolveShortcutPath(m_collection.ListShortcuts(), @"[Christina]\..\f2\file.txt"));

            Assert.AreEqual(@"C:\f2\file.txt", FileReferenceUtils.GetFullPath(m_collection.ListShortcuts(), @"[Anna]\..\f2\file.txt"));
            Assert.AreEqual(@"C:\temp\f2\file.txt", FileReferenceUtils.GetFullPath(m_collection.ListShortcuts(), @"[Christina]\..\f2\file.txt"));
        }
Example #2
0
 public void NoRelative()
 {
     Assert.AreEqual(@"C:\temp", FileReferenceUtils.ResolveShortcutPath(m_collection.ListShortcuts(), "[Anna]"));
     Assert.AreEqual(@"C:\temp\sub", FileReferenceUtils.ResolveShortcutPath(m_collection.ListShortcuts(), "[Christina]"));
 }
Example #3
0
 public void NoShortcut()
 {
     Assert.AreEqual(@"myfile.txt", FileReferenceUtils.ResolveShortcutPath(m_collection.ListShortcuts(), "myfile.txt"));
     Assert.AreEqual(@"c:\temp\myfile.txt", FileReferenceUtils.ResolveShortcutPath(m_collection.ListShortcuts(), @"c:\temp\myfile.txt"));
 }