private static string ResolveLogFilePath()
        {
            string path = LocalConfiguration.General.LogFilePath;

            if (ConfigurationUtils.IsFullyQualifiedPath(path))
            {
                return(path);
            }

            string resolvedPath = ConfigurationUtils.AppendToProcessPath(path);

            return(resolvedPath);
        }
Exemplo n.º 2
0
            public void ShouldReturnAbsolutePathRelativeToProcessDirectory()
            {
                string relativePath     = "a.txt";
                string expectedFullPath = Path.GetFullPath(relativePath);

                // Not using IoC so simulate a scenario
                string originalCurrentDirectory = Environment.CurrentDirectory;

                Environment.CurrentDirectory = Path.GetTempPath();

                try
                {
                    Assert.AreEqual(expectedFullPath, ConfigurationUtils.AppendToProcessPath(relativePath));
                }
                finally
                {
                    Environment.CurrentDirectory = originalCurrentDirectory;
                }
            }