예제 #1
0
        public void RelativeTo_WithCaseInsensitivePathAndDifferentCasing_CalculatesRelativePath()
        {
            var expected = new PureWindowsPath(@"nemec\downloads");
            var root     = new PureWindowsPath(@"C:\users");
            var abs      = new PureWindowsPath(@"C:\USERS\nemec\downloads");

            var actual = abs.RelativeTo(root);

            Assert.AreEqual(expected, actual);
        }
예제 #2
0
        public void RelativeTo_WithRootAndDrive_CalculatesRelativePath()
        {
            var expected = new PureWindowsPath(@"users\nemec");
            var root     = new PureWindowsPath(@"C:\");
            var abs      = new PureWindowsPath(@"C:\users\nemec");

            var actual = abs.RelativeTo(root);

            Assert.AreEqual(expected, actual);
        }
예제 #3
0
        public void RelativeTo_WithRootAndDrive_CalculatesRelativePath()
        {
            var expected = new PureWindowsPath(@"users\nemec");
            var root = new PureWindowsPath(@"C:\");
            var abs = new PureWindowsPath(@"C:\users\nemec");

            var actual = abs.RelativeTo(root);

            Assert.AreEqual(expected, actual);
        }
예제 #4
0
        public void RelativeTo_WithCaseInsensitivePathAndDifferentCasing_CalculatesRelativePath()
        {
            var expected = new PureWindowsPath(@"nemec\downloads");
            var root = new PureWindowsPath(@"C:\users");
            var abs = new PureWindowsPath(@"C:\USERS\nemec\downloads");

            var actual = abs.RelativeTo(root);

            Assert.AreEqual(expected, actual);
        }