Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4454,16 +4454,13 @@ private static void GenerateConcreteTestMetadata(

// Build the concrete class name if it's a generic class
string concreteClassName;
string openGenericTypeName;
if (testMethod.IsGenericType)
{
openGenericTypeName = GetOpenGenericTypeName(testMethod.TypeSymbol);
var baseClassName = className.Contains("<") ? className.Substring(0, className.IndexOf('<')) : className;
concreteClassName = $"{baseClassName}<{string.Join(", ", classTypeArgs.Select(t => t.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat)))}>";
}
else
{
openGenericTypeName = className;
concreteClassName = className;
}

Expand Down Expand Up @@ -4509,7 +4506,6 @@ private static void GenerateConcreteTestMetadata(

// Check if the class has a constructor that requires arguments
var hasParameterizedConstructor = false;
var constructorParamCount = 0;

if (testMethod.IsGenericType)
{
Expand All @@ -4522,7 +4518,6 @@ private static void GenerateConcreteTestMetadata(
if (constructor is { Parameters.Length: > 0 })
{
hasParameterizedConstructor = true;
constructorParamCount = constructor.Parameters.Length;
}
}

Expand Down
Loading