Beispiel #1
0
        public void MakeAbsolutePathCorrectlyHandlesRelativeFilePaths(
            string folderPath,
            string filePath,
            string expectedAbsolutePath)
        {
            var generatedPath = _sut.MakeAbsolutePath(folderPath, filePath);

            Assert.Equal(expectedAbsolutePath, generatedPath);
        }
        public void MakeAbsolutePathCorrectlyHandlesRelativeFilePaths(
            string folderPath,
            string filePath,
            string expectedAbsolutePath)
        {
            var generatedPath = _sut.MakeAbsolutePath(folderPath, filePath);

            if (OperatingSystem.IsWindows())
            {
                var expectedWindowsPath = expectedAbsolutePath.Replace('/', '\\');
                Assert.Equal(expectedWindowsPath, generatedPath.Split(':')[1]);
            }
            else
            {
                Assert.Equal(expectedAbsolutePath, generatedPath);
            }
        }