same for fixture name

This commit is contained in:
benbierens 2023-08-10 11:56:29 +02:00
parent 4995665fe5
commit 9c1b469f0d
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA

View File

@ -22,6 +22,7 @@ namespace Logging
public static string GetRawFixtureName() public static string GetRawFixtureName()
{ {
var test = TestContext.CurrentContext.Test; var test = TestContext.CurrentContext.Test;
if (test.ClassName!.Contains("AdhocContext")) return "-";
var className = test.ClassName!.Substring(test.ClassName.LastIndexOf('.') + 1); var className = test.ClassName!.Substring(test.ClassName.LastIndexOf('.') + 1);
return className.Replace('.', '-'); return className.Replace('.', '-');
} }