public void GetFormattedLogFilePathShouldReplaceFrameworkToken() { var runConfig = new TestRunConfiguration { TargetFramework = ".NETCoreApp,Version=v5.0" }; var config = new Dictionary <string, string> { { LoggerConfiguration.LogFilePathKey, "/tmp/results/{framework}.json" }, }; var loggerConfiguration = new LoggerConfiguration(config); var logFilePath = loggerConfiguration.GetFormattedLogFilePath(runConfig); Assert.AreEqual("/tmp/results/NETCoreApp50.json", logFilePath); }
public void GetFormattedLogFilePathShouldReplaceAssemblyToken() { var runConfig = new TestRunConfiguration { AssemblyPath = "/tmp/foo.dll" }; var config = new Dictionary <string, string> { { LoggerConfiguration.LogFilePathKey, "/tmp/results/{assembly}.json" }, }; var loggerConfiguration = new LoggerConfiguration(config); var logFilePath = loggerConfiguration.GetFormattedLogFilePath(runConfig); Assert.AreEqual("/tmp/results/foo.json", logFilePath); }