From 2ad2362efd7d1284164e94cda15dbbfa75b3a450 Mon Sep 17 00:00:00 2001 From: Socolin Date: Fri, 1 Dec 2023 10:32:29 -0500 Subject: [PATCH] Fix complex case with generic types. --- .../References/SpecflowStepDeclarationReference.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dotnet/ReSharperPlugin.SpecflowRiderPlugin/References/SpecflowStepDeclarationReference.cs b/src/dotnet/ReSharperPlugin.SpecflowRiderPlugin/References/SpecflowStepDeclarationReference.cs index d49e3e7..691cd1c 100644 --- a/src/dotnet/ReSharperPlugin.SpecflowRiderPlugin/References/SpecflowStepDeclarationReference.cs +++ b/src/dotnet/ReSharperPlugin.SpecflowRiderPlugin/References/SpecflowStepDeclarationReference.cs @@ -14,6 +14,7 @@ using JetBrains.ReSharper.Psi.Modules; using JetBrains.ReSharper.Psi.Resolve; using JetBrains.ReSharper.Psi.Tree; +using JetBrains.ReSharper.TestRunner.Abstractions.Extensions; using ReSharperPlugin.SpecflowRiderPlugin.Caching.StepsDefinitions; using ReSharperPlugin.SpecflowRiderPlugin.Caching.StepsDefinitions.AssemblyStepDefinitions; using ReSharperPlugin.SpecflowRiderPlugin.Psi; @@ -88,7 +89,7 @@ public override ResolveResultWithInfo ResolveWithoutCache() { if (methodParameter.Type is IDeclaredType declarationType && !declarationType.GetClrName().FullName.EndsWith(expectedTypeName) - && !declarationType.GetLongPresentableName(CSharpLanguage.Instance).EndsWith(expectedTypeName)) + && !declarationType.GetLongPresentableName(CSharpLanguage.Instance).SubstringBefore("<").EndsWith(expectedTypeName.SubstringBefore("<"))) { allParameterTypesMatch = false; break;