mirror of
https://github.com/logos-storage/logos-storage-nim-cs-dist-tests.git
synced 2026-01-07 07:53:05 +00:00
fixes naming for parameterised fixtures
This commit is contained in:
parent
6c99c7a7cf
commit
c98cf1ffc4
@ -22,7 +22,9 @@
|
||||
.Replace("\\", "-")
|
||||
.Replace("[", "-")
|
||||
.Replace("]", "-")
|
||||
.Replace(",", "-");
|
||||
.Replace(",", "-")
|
||||
.Replace("(", "-")
|
||||
.Replace(")", "-");
|
||||
|
||||
if (result.Length > maxLength) result = result.Substring(0, maxLength);
|
||||
result = result.Trim('-');
|
||||
|
||||
@ -28,10 +28,11 @@ namespace DistTestCore
|
||||
public static string GetRawFixtureName()
|
||||
{
|
||||
var test = TestContext.CurrentContext.Test;
|
||||
if (test.ClassName!.Contains("AdhocContext")) return "none";
|
||||
var className = test.ClassName!.Substring(test.ClassName.LastIndexOf('.') + 1);
|
||||
className += FormatArguments(test);
|
||||
return className.Replace('.', '-');
|
||||
var fullName = test.FullName;
|
||||
if (fullName.Contains("AdhocContext")) return "none";
|
||||
var name = fullName.Substring(0, fullName.LastIndexOf('.'));
|
||||
name += FormatArguments(test);
|
||||
return name.Replace('.', '-').Replace(',', '-');
|
||||
}
|
||||
|
||||
public static string GetCategoryName()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user