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
4 changes: 3 additions & 1 deletion src/tests/Common/XUnitWrapperGenerator/ITestInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,11 @@ public MemberDataTest(ISymbol referencedMember,
string externAlias,
string argumentLoopVarIdentifier)
{
TestNameExpression = innerTest.TestNameExpression;
Method = innerTest.Method;
ContainingType = innerTest.ContainingType;
// Use a static expression that doesn't reference the loop variable since it may be used
// outside the foreach loop scope (e.g., in a ConditionalTest's else branch).
TestNameExpression = $"\"{externAlias}::{ContainingType}.{Method}(...)\"";
DisplayNameForFiltering = $"{ContainingType}.{Method}(...)";

_innerTest = innerTest;
Expand Down
Loading