Example #1
0
            public void WhenBreakoutRelativePath(string input, char directorySeparator, string expected)
            {
                PathRef pathRef    = new PathRef(input);
                string  normalized = pathRef.NormalizePath(directorySeparator);

                Assert.That(normalized, Is.EqualTo(expected));
            }
Example #2
0
            public void When_UsingToString(string input)
            {
                PathRef pathRef = new PathRef(input);

                Assert.That(pathRef.ToString(), Is.EqualTo(pathRef.NormalizePath()));
            }
Example #3
0
            public void When_NormalizingAsUnixPath(string input)
            {
                PathRef pathRef = new PathRef(input);

                Assert.That(pathRef.PosixPath, Is.EqualTo(pathRef.NormalizePath('/')));
            }
Example #4
0
            public void When_NormalizingAsWindowsPath(string input)
            {
                PathRef pathRef = new PathRef(input);

                Assert.That(pathRef.WindowsPath, Is.EqualTo(pathRef.NormalizePath('\\')));
            }
Example #5
0
            public void When_UsingLocalPath(string input)
            {
                PathRef pathRef = new PathRef(input);

                Assert.That(pathRef.LocalPath, Is.EqualTo(pathRef.NormalizePath(Path.DirectorySeparatorChar)));
            }