diff --git a/src/Verify.MSTest.SourceGenerator.Tests/GeneratorDriverResults.cs b/src/Verify.MSTest.SourceGenerator.Tests/GeneratorDriverResults.cs index 12565c4921..427dd1c505 100644 --- a/src/Verify.MSTest.SourceGenerator.Tests/GeneratorDriverResults.cs +++ b/src/Verify.MSTest.SourceGenerator.Tests/GeneratorDriverResults.cs @@ -1,5 +1,3 @@ -namespace VerifyMSTest.SourceGenerator.Tests; - readonly record struct GeneratorDriverResults(GeneratorDriverResult FirstRun, GeneratorDriverResult CachedRun); readonly record struct GeneratorDriverResult(GeneratorDriverRunResult RunResult, GeneratorDriverTimingInfo TimingInfo); \ No newline at end of file diff --git a/src/Verify.MSTest.SourceGenerator.Tests/GeneratorDriverRunResultExtensions.cs b/src/Verify.MSTest.SourceGenerator.Tests/GeneratorDriverRunResultExtensions.cs index f4302534b0..b895e1a42a 100644 --- a/src/Verify.MSTest.SourceGenerator.Tests/GeneratorDriverRunResultExtensions.cs +++ b/src/Verify.MSTest.SourceGenerator.Tests/GeneratorDriverRunResultExtensions.cs @@ -1,18 +1,16 @@ -namespace VerifyMSTest.SourceGenerator.Tests; - static class GeneratorDriverRunResultExtensions { - public static (string HintName, string SourceText)? SelectGeneratedSources(this GeneratorDriverRunResult gdrr) => - gdrr + public static (string HintName, string SourceText)? SelectGeneratedSources(this GeneratorDriverRunResult runResult) => + runResult .Results - .SelectMany(grr => grr.GeneratedSources) - .Select(gs => (gs.HintName, gs.SourceText.ToString())) + .SelectMany(_ => _.GeneratedSources) + .Select(_ => (_.HintName, _.SourceText.ToString())) .SingleOrDefault(); public static Dictionary> GetTrackedSteps(this GeneratorDriverRunResult runResult, IReadOnlyCollection trackingNames) => runResult .Results - .SelectMany(result => result.TrackedSteps) - .Where(step => trackingNames.Contains(step.Key)) - .ToDictionary(x => x.Key, x => x.Value); + .SelectMany(_ => _.TrackedSteps) + .Where(_ => trackingNames.Contains(_.Key)) + .ToDictionary(_ => _.Key, _ => _.Value); } \ No newline at end of file diff --git a/src/Verify.MSTest.SourceGenerator.Tests/Tests.cs b/src/Verify.MSTest.SourceGenerator.Tests/Tests.cs index ea66d7c899..41daf88e3a 100644 --- a/src/Verify.MSTest.SourceGenerator.Tests/Tests.cs +++ b/src/Verify.MSTest.SourceGenerator.Tests/Tests.cs @@ -1,7 +1,8 @@ -namespace VerifyMSTest.SourceGenerator.Tests; - // These tests don't use Verify.SourceGenerator to avoid creating a circular dependency between the repos. +using VerifyMSTest.SourceGenerator; +using VerifyMSTest.SourceGenerator.Tests; + public class Tests(ITestOutputHelper output) { readonly UsesVerifyTestDriver testDriver = new();