From c12f080005765939b529cba2f934ee869dbe0fb5 Mon Sep 17 00:00:00 2001 From: "harald.martini@student.tugraz.at" <harald.martini@student.tugraz.at> Date: Wed, 14 Jul 2021 15:54:47 +0200 Subject: [PATCH] Fixed illegal path issue that occured because of some Testnames --- Vecto3GUI2020Test/ViewModelTests/ViewModelTestBase.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Vecto3GUI2020Test/ViewModelTests/ViewModelTestBase.cs b/Vecto3GUI2020Test/ViewModelTests/ViewModelTestBase.cs index 28a84db080..b809717d78 100644 --- a/Vecto3GUI2020Test/ViewModelTests/ViewModelTestBase.cs +++ b/Vecto3GUI2020Test/ViewModelTests/ViewModelTestBase.cs @@ -81,6 +81,11 @@ namespace Vecto3GUI2020Test var className = TestContext.CurrentContext.Test.ClassName.Replace("Vecto3GUI2020Test.", ""); var testName = TestContext.CurrentContext.Test.Name; + var invalidPathChars = Path.GetInvalidPathChars(); + foreach (var invalidPathChar in invalidPathChars) { + testName = testName.Replace(invalidPathChar, '_'); + } + var testOutputDirPath = Path.Combine(SourceDirectoryRoot + @"\Testdata\output\" + className + "\\" + testName); //Create output directory -- GitLab