From ddd4210d532582b98a99f40f05269cdf7cf8a07b Mon Sep 17 00:00:00 2001 From: Youssef1313 Date: Thu, 19 Mar 2026 22:10:04 +0100 Subject: [PATCH 1/3] Update GetAssetsToGenerate to be always single asset --- .../AbortionTests.cs | 11 ++-------- .../AppDomainTests.cs | 4 ++-- .../AspireSdkTests.cs | 4 ++-- .../AssemblyCleanupTests.cs | 2 +- .../AssemblyResolverTests.cs | 4 ++-- .../CancellationTests.cs | 4 ++-- .../ConfigurationMSTestSettingsTests.cs | 6 +++--- .../ConfigurationMSTestV2SettingsTests.cs | 6 +++--- .../ConfigurationSettingsTests.cs | 2 +- .../CustomAttributesTests.cs | 6 +++--- .../DeadlockTests.cs | 4 ++-- .../DeploymentItemTests.cs | 4 ++-- .../DuplicateTestClassAttributeTests.cs | 6 +++--- .../DynamicDataMethodTests.cs | 2 +- .../FrameworkOnlyTests.cs | 4 ++-- .../GenericTestMethodTests.cs | 4 ++-- .../HelpInfoTests.cs | 4 ++-- .../IgnoreTests.cs | 2 +- .../InconclusiveTests.cs | 2 +- .../LeakTests.cs | 4 ++-- .../LifecycleAttributesTaskThreadingTests.cs | 6 +++--- ...ecycleAttributesValueTaskThreadingTests.cs | 4 ++-- .../LifecycleAttributesVoidThreadingTests.cs | 6 +++--- .../LifecycleTests.cs | 4 ++-- ...ithParallelAttributesTaskThreadingTests.cs | 6 +++--- .../MaxFailedTestsExtensionTests.cs | 4 ++-- .../OutputTests.cs | 4 ++-- .../ParameterizedDataRowTests.cs | 2 +- .../ParameterizedDataSourceTests.cs | 4 ++-- .../ParameterizedTestTests.cs | 4 ++-- .../PlaywrightSdkTests.cs | 4 ++-- .../RetryTests.cs | 4 ++-- .../RunsettingsTests.cs | 2 +- .../STATestClassCooperativeTimeoutTests.cs | 2 +- .../STATestClassTests.cs | 2 +- .../STATestClassTimeoutTests.cs | 4 ++-- .../STATestMethodCooperativeTimeoutTests.cs | 4 ++-- .../STATestMethodTests.cs | 4 ++-- .../STATestMethodTimeoutTests.cs | 4 ++-- .../STAThreadingTests.cs | 6 +++--- .../ServerModeTests.cs | 4 ++-- .../SynchronizationContextTests.cs | 4 ++-- .../TestContextTests.cs | 4 ++-- .../TestDiscoveryTests.cs | 4 ++-- .../TestDiscoveryWarningsTests.cs | 8 ++----- .../TestFilterTests.cs | 4 ++-- .../TestRunParametersTests.cs | 4 ++-- ...readContextCultureFlowsInheritanceTests.cs | 4 ++-- .../ThreadContextCultureFlowsTests.cs | 4 ++-- .../ThreadContextTests.cs | 4 ++-- .../ThreadingTests.cs | 4 ++-- .../TimeoutTests.cs | 4 ++-- .../TrxReportTests.cs | 2 +- .../TupleDynamicDataTests.cs | 4 ++-- .../ValueTaskTests.cs | 4 ++-- .../WinUITests.cs | 2 +- .../AbortionTests.cs | 13 ++---------- .../ConsoleTests.cs | 4 ++-- .../CrashDumpTests.cs | 4 ++-- .../CrashPlusHangDumpTests.cs | 4 ++-- .../CustomBannerTests.cs | 4 ++-- .../DataConsumerThroughputTests.cs | 6 +++--- .../DiagnosticTests.cs | 4 ++-- ...mentVariablesConfigurationProviderTests.cs | 4 ++-- .../ExecutionRequestCompleteTests.cs | 6 +++--- .../ExecutionTests.cs | 4 ++-- .../ExitOnProcessExitTests.cs | 4 ++-- .../ForwardCompatibilityTests.cs | 4 ++-- .../HangDumpOutputTests.cs | 4 ++-- .../HangDumpProcessTreeTests.cs | 2 +- .../HangDumpTests.cs | 4 ++-- .../HelpInfoAllExtensionsTests.cs | 2 +- .../HelpInfoTests.cs | 4 ++-- .../LocalizationFailingTests.cs | 2 +- .../LocalizationTests.cs | 4 ++-- .../MaxFailedTestsExtensionTests.cs | 4 ++-- .../NoBannerTests.cs | 4 ++-- .../RetryFailedTestsTests.cs | 4 ++-- .../ServerLoggingTests.cs | 4 ++-- .../TelemetryDisabledTests.cs | 6 +++--- .../TelemetryTests.cs | 4 ++-- .../TestHostProcessLifetimeHandlerTests.cs | 2 +- .../TimeoutTests.cs | 4 ++-- .../TrxDataRowTests.cs | 4 ++-- .../TrxFailingTestTests.cs | 4 ++-- .../TrxSkippedTestTests.cs | 4 ++-- .../TrxTests.cs | 4 ++-- .../UnhandledExceptionPolicyTests.cs | 4 ++-- .../TestAssetFixtureBase.cs | 21 +++++++++---------- 89 files changed, 182 insertions(+), 203 deletions(-) diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AbortionTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AbortionTests.cs index b172729f04..01b2b5a6e9 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AbortionTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AbortionTests.cs @@ -141,16 +141,9 @@ public async Task TestA() public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - // We expect the same semantic for Linux, the test setup is not cross and we're using specific - // Windows API because this gesture is not easy xplat. - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - yield break; - } - - yield return (AssetName, AssetName, + return (AssetName, AssetName, Sources .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion) diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AppDomainTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AppDomainTests.cs index 6d28370da9..976c41efc3 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AppDomainTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AppDomainTests.cs @@ -174,9 +174,9 @@ public static IEnumerable GetData() public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, SingleTestSourceCode .PatchCodeWithReplace("$TargetFramework$", TargetFrameworks.NetFramework[0]) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AspireSdkTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AspireSdkTests.cs index 6c42defb8f..9e840a10b8 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AspireSdkTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AspireSdkTests.cs @@ -85,9 +85,9 @@ public void GetWebResourceRootReturnsOkStatusCode() public string AspireProjectPath => GetAssetPath(AspireProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AspireProjectName, AspireProjectName, + return (AspireProjectName, AspireProjectName, AspireSourceCode .PatchTargetFrameworks(TargetFrameworks.NetCurrent) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AssemblyCleanupTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AssemblyCleanupTests.cs index f82fd72139..9dded637eb 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AssemblyCleanupTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AssemblyCleanupTests.cs @@ -32,7 +32,7 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string ProjectPath => GetAssetPath(ProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { yield return (ProjectName, ProjectName, SourceCode diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AssemblyResolverTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AssemblyResolverTests.cs index 71aa97d623..38aa8d4963 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AssemblyResolverTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AssemblyResolverTests.cs @@ -28,9 +28,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. { public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, SourceCode .PatchTargetFrameworks(TargetFrameworks.NetFramework) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/CancellationTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/CancellationTests.cs index 2ec5f2f69e..78aaa5807d 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/CancellationTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/CancellationTests.cs @@ -134,9 +134,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string ProjectPath => GetAssetPath(ProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (ProjectName, ProjectName, + return (ProjectName, ProjectName, SourceCode .PatchTargetFrameworks(TargetFrameworks.NetCurrent) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ConfigurationMSTestSettingsTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ConfigurationMSTestSettingsTests.cs index de3fb70906..f4e2378dd4 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ConfigurationMSTestSettingsTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ConfigurationMSTestSettingsTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.Testing.Platform.Acceptance.IntegrationTests; @@ -30,9 +30,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string ProjectPathWithMSTestRunSettings => GetAssetPath(ProjectNameWithMSTestRunSettings); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (ProjectNameWithMSTestRunSettings, ProjectNameWithMSTestRunSettings, + return (ProjectNameWithMSTestRunSettings, ProjectNameWithMSTestRunSettings, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$ProjectName$", ProjectNameWithMSTestRunSettings) diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ConfigurationMSTestV2SettingsTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ConfigurationMSTestV2SettingsTests.cs index d190325882..f23df8e9a2 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ConfigurationMSTestV2SettingsTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ConfigurationMSTestV2SettingsTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.Testing.Platform.Acceptance.IntegrationTests; @@ -30,9 +30,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string ProjectPathWithMSTestV2RunSettings => GetAssetPath(ProjectNameWithMSTestV2RunSettings); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (ProjectNameWithMSTestV2RunSettings, ProjectNameWithMSTestV2RunSettings, + return (ProjectNameWithMSTestV2RunSettings, ProjectNameWithMSTestV2RunSettings, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$ProjectName$", ProjectNameWithMSTestV2RunSettings) diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ConfigurationSettingsTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ConfigurationSettingsTests.cs index b60fa50777..dedab65012 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ConfigurationSettingsTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ConfigurationSettingsTests.cs @@ -86,7 +86,7 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string ProjectPath => GetAssetPath(ProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { yield return (ProjectName, ProjectName, SourceCode diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/CustomAttributesTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/CustomAttributesTests.cs index 0e6b1113ec..eb7fd49bcf 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/CustomAttributesTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/CustomAttributesTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.Testing.Platform.Acceptance.IntegrationTests; @@ -29,9 +29,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string DuplicateTestMethodProjectPath => GetAssetPath(DuplicateTestMethodProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (DuplicateTestMethodProjectName, DuplicateTestMethodProjectName, + return (DuplicateTestMethodProjectName, DuplicateTestMethodProjectName, DuplicateTestMethodSourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DeadlockTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DeadlockTests.cs index 5e05614e74..26331d3e55 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DeadlockTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DeadlockTests.cs @@ -48,9 +48,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string ProjectPath => GetAssetPath(ProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (ProjectName, ProjectName, + return (ProjectName, ProjectName, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DeploymentItemTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DeploymentItemTests.cs index 08a2abdf66..3976088d94 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DeploymentItemTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DeploymentItemTests.cs @@ -103,9 +103,9 @@ public void TestMethod1() public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, Sources .PatchTargetFrameworks(TargetFrameworks.NetFramework[0]) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DuplicateTestClassAttributeTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DuplicateTestClassAttributeTests.cs index ad6c1a0ef9..4cc95dda49 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DuplicateTestClassAttributeTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DuplicateTestClassAttributeTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.Testing.Platform.Acceptance.IntegrationTests; @@ -29,9 +29,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string DuplicateTestClassProjectPath => GetAssetPath(DuplicateTestClassProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (DuplicateTestClassProjectName, DuplicateTestClassProjectName, + return (DuplicateTestClassProjectName, DuplicateTestClassProjectName, DuplicateTestClassSourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DynamicDataMethodTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DynamicDataMethodTests.cs index b2d4f991ba..e9630cae18 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DynamicDataMethodTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DynamicDataMethodTests.cs @@ -57,7 +57,7 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string ProjectPath => GetAssetPath(ProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { yield return (ProjectName, ProjectName, SourceCode diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/FrameworkOnlyTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/FrameworkOnlyTests.cs index f191ad5c46..5e5c17492e 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/FrameworkOnlyTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/FrameworkOnlyTests.cs @@ -85,9 +85,9 @@ public void TestMethod1() public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, Sources .PatchTargetFrameworks(TargetFrameworks.NetCurrent) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/GenericTestMethodTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/GenericTestMethodTests.cs index eee0e3471a..181eefb049 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/GenericTestMethodTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/GenericTestMethodTests.cs @@ -80,9 +80,9 @@ Cannot create an instance of T\[] because Type\.ContainsGenericParameters is tru public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture.NuGetGlobalPackagesFolder) { - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return ("GenericTestMethodTests", "GenericTestMethodTests", + return ("GenericTestMethodTests", "GenericTestMethodTests", SourceGenericTestMethod .PatchTargetFrameworks(TargetFrameworks.NetCurrent) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/HelpInfoTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/HelpInfoTests.cs index e87af996ef..14ffad883f 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/HelpInfoTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/HelpInfoTests.cs @@ -128,9 +128,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. { public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/IgnoreTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/IgnoreTests.cs index b7ebe3793b..94bd8c0a80 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/IgnoreTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/IgnoreTests.cs @@ -112,7 +112,7 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string ProjectPath => GetAssetPath(ProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { yield return (ProjectName, ProjectName, SourceCode diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/InconclusiveTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/InconclusiveTests.cs index 4ebaf5e17e..fd7919f067 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/InconclusiveTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/InconclusiveTests.cs @@ -118,7 +118,7 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string ProjectPath => GetAssetPath(ProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { yield return (ProjectName, ProjectName, SourceCode diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LeakTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LeakTests.cs index ddfe696468..c417158ce5 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LeakTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LeakTests.cs @@ -26,9 +26,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string ProjectPath => GetAssetPath(ProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (ProjectName, ProjectName, + return (ProjectName, ProjectName, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleAttributesTaskThreadingTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleAttributesTaskThreadingTests.cs index 782a4bd2e6..f886939dbe 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleAttributesTaskThreadingTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleAttributesTaskThreadingTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.Testing.Platform.Acceptance.IntegrationTests; @@ -32,9 +32,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string TargetAssetPath => GetAssetPath(ProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (ProjectName, ProjectName, + return (ProjectName, ProjectName, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$ParallelAttribute$", string.Empty) diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleAttributesValueTaskThreadingTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleAttributesValueTaskThreadingTests.cs index b4fae8407c..61e1f25d04 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleAttributesValueTaskThreadingTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleAttributesValueTaskThreadingTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.Testing.Platform.Acceptance.IntegrationTests; @@ -32,7 +32,7 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string TargetAssetPath => GetAssetPath(ProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { yield return (ProjectName, ProjectName, SourceCode diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleAttributesVoidThreadingTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleAttributesVoidThreadingTests.cs index 7b197fea34..f410349ce4 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleAttributesVoidThreadingTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleAttributesVoidThreadingTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.Testing.Platform.Acceptance.IntegrationTests; @@ -32,9 +32,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string TargetAssetPath => GetAssetPath(ProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (ProjectName, ProjectName, + return (ProjectName, ProjectName, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleTests.cs index 3e233f13e3..c5d6512ae5 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleTests.cs @@ -82,9 +82,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string ProjectPath => GetAssetPath(ProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (ProjectName, ProjectName, + return (ProjectName, ProjectName, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleWithParallelAttributesTaskThreadingTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleWithParallelAttributesTaskThreadingTests.cs index 98d27425eb..d6bc1a3042 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleWithParallelAttributesTaskThreadingTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleWithParallelAttributesTaskThreadingTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.Testing.Platform.Acceptance.IntegrationTests; @@ -33,9 +33,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string TargetAssetPath => GetAssetPath(ProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (ProjectName, AssemblyName, + return (ProjectName, AssemblyName, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$ParallelAttribute$", "[assembly: Parallelize(Workers = 0, Scope = ExecutionScope.MethodLevel)]") diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/MaxFailedTestsExtensionTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/MaxFailedTestsExtensionTests.cs index 49ddd4443c..257f3e478d 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/MaxFailedTestsExtensionTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/MaxFailedTestsExtensionTests.cs @@ -135,9 +135,9 @@ public async Task Test12() public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, Sources .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion) diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/OutputTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/OutputTests.cs index 0a2f3d678e..5427971563 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/OutputTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/OutputTests.cs @@ -33,9 +33,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string ProjectPath => GetAssetPath(ProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (ProjectName, ProjectName, + return (ProjectName, ProjectName, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ParameterizedDataRowTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ParameterizedDataRowTests.cs index 855cea695c..7866be5e55 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ParameterizedDataRowTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ParameterizedDataRowTests.cs @@ -34,7 +34,7 @@ private static async Task UsingDataRowThatDoesNotRoundTripUsingDataContractJsonS public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture.NuGetGlobalPackagesFolder) { - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { yield return (DataRowAssetName, DataRowAssetName, SourceCodeDataRow diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ParameterizedDataSourceTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ParameterizedDataSourceTests.cs index 65f5892f0f..4794a000ca 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ParameterizedDataSourceTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ParameterizedDataSourceTests.cs @@ -65,9 +65,9 @@ private static async Task RunTestsAsync(string currentTfm, string assetName, boo public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture.NuGetGlobalPackagesFolder) { - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (DataSourceAssetName, DataSourceAssetName, + return (DataSourceAssetName, DataSourceAssetName, SourceCodeDataSource .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ParameterizedTestTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ParameterizedTestTests.cs index 41eab2f411..9955ebb756 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ParameterizedTestTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ParameterizedTestTests.cs @@ -137,9 +137,9 @@ private static async Task RunTestsAsync(string currentTfm, string assetName, boo public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture.NuGetGlobalPackagesFolder) { - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (DynamicDataAssetName, DynamicDataAssetName, + return (DynamicDataAssetName, DynamicDataAssetName, SourceCodeDynamicData .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/PlaywrightSdkTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/PlaywrightSdkTests.cs index 770a7ba022..1733ecee75 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/PlaywrightSdkTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/PlaywrightSdkTests.cs @@ -136,9 +136,9 @@ public async Task HomepageHasPlaywrightInTitleAndGetStartedLinkLinkingToTheIntro public string PlaywrightProjectPath => GetAssetPath(PlaywrightProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (PlaywrightProjectName, PlaywrightProjectName, + return (PlaywrightProjectName, PlaywrightProjectName, PlaywrightSourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/RetryTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/RetryTests.cs index 54405e8e69..4146200ed8 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/RetryTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/RetryTests.cs @@ -36,9 +36,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string ProjectPath => GetAssetPath(ProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (ProjectName, ProjectName, + return (ProjectName, ProjectName, SourceCode .PatchTargetFrameworks(TargetFrameworks.NetCurrent) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/RunsettingsTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/RunsettingsTests.cs index 2d484914f0..ded0fcd78a 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/RunsettingsTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/RunsettingsTests.cs @@ -96,7 +96,7 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string ProjectPath => GetAssetPath(ProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { yield return (ProjectName, ProjectName, SourceCode diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassCooperativeTimeoutTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassCooperativeTimeoutTests.cs index f61b27a7f3..e911a13d57 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassCooperativeTimeoutTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassCooperativeTimeoutTests.cs @@ -59,7 +59,7 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. { public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { yield return (AssetName, AssetName, SourceCode diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassTests.cs index f20122eb58..12352caa9c 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassTests.cs @@ -59,7 +59,7 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. { public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { yield return (AssetName, AssetName, SourceCode diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassTimeoutTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassTimeoutTests.cs index 0b2ca0319c..0fed085d47 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassTimeoutTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassTimeoutTests.cs @@ -59,9 +59,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. { public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$ProjectName$", AssetName) diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestMethodCooperativeTimeoutTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestMethodCooperativeTimeoutTests.cs index 1874e424d8..a4339de296 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestMethodCooperativeTimeoutTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestMethodCooperativeTimeoutTests.cs @@ -62,9 +62,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. { public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$ProjectName$", AssetName) diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestMethodTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestMethodTests.cs index 4fab99426c..51611fae47 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestMethodTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestMethodTests.cs @@ -62,9 +62,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. { public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$ProjectName$", AssetName) diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestMethodTimeoutTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestMethodTimeoutTests.cs index 0669e76339..899d22a445 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestMethodTimeoutTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestMethodTimeoutTests.cs @@ -62,9 +62,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. { public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$ProjectName$", AssetName) diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STAThreadingTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STAThreadingTests.cs index 90ef622cf8..fa865a4c2c 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STAThreadingTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STAThreadingTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.Testing.Platform.Acceptance.IntegrationTests; @@ -68,9 +68,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string TargetAssetPath => GetAssetPath(ProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (ProjectName, ProjectName, + return (ProjectName, ProjectName, (SourceCode + ProgramFileSourceCode) .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$ProjectName$", ProjectName) diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ServerModeTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ServerModeTests.cs index 08387d111c..77a65acb10 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ServerModeTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ServerModeTests.cs @@ -75,9 +75,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string ProjectPath => GetAssetPath(ProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (ProjectName, ProjectName, + return (ProjectName, ProjectName, CurrentMSTestSourceCode .PatchCodeWithReplace("$TargetFramework$", $"{TargetFrameworks.All.ToMSBuildTargetFrameworks()}") .PatchCodeWithReplace("$MicrosoftNETTestSdkVersion$", MicrosoftNETTestSdkVersion) diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/SynchronizationContextTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/SynchronizationContextTests.cs index 754b314da9..9f9298f2be 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/SynchronizationContextTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/SynchronizationContextTests.cs @@ -45,9 +45,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string ProjectPath => GetAssetPath(ProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (ProjectName, ProjectName, + return (ProjectName, ProjectName, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestContextTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestContextTests.cs index b38d74836a..b4724ecb62 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestContextTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestContextTests.cs @@ -85,9 +85,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string ProjectPath => GetAssetPath(ProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (ProjectName, ProjectName, + return (ProjectName, ProjectName, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestDiscoveryTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestDiscoveryTests.cs index b335ac7385..f5e6355d9f 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestDiscoveryTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestDiscoveryTests.cs @@ -44,9 +44,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. { public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestDiscoveryWarningsTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestDiscoveryWarningsTests.cs index a6aca74dc1..2d1d6f4b8b 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestDiscoveryWarningsTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestDiscoveryWarningsTests.cs @@ -51,13 +51,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. { public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - // NOTE: The BaseClass asset is embedded as a subdirectory within the main asset to avoid - // parallel build conflicts. If they were separate assets, TestAssetFixtureBase would build - // them in parallel, but TestDiscoveryWarnings has a ProjectReference to TestDiscoveryWarningsBaseClass, - // causing both builds to write to the same files simultaneously (file locking errors). - yield return (AssetName, AssetName, + return (AssetName, AssetName, SourceCode.PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); } diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestFilterTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestFilterTests.cs index 67682d5ce4..06ca4f97fb 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestFilterTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestFilterTests.cs @@ -87,9 +87,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. { public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestRunParametersTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestRunParametersTests.cs index b2662026a5..3d8a5ed752 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestRunParametersTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TestRunParametersTests.cs @@ -39,9 +39,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string ProjectPath => GetAssetPath(ProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (ProjectName, ProjectName, + return (ProjectName, ProjectName, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextCultureFlowsInheritanceTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextCultureFlowsInheritanceTests.cs index 209743e275..85398dc716 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextCultureFlowsInheritanceTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextCultureFlowsInheritanceTests.cs @@ -58,9 +58,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string TargetAssetPath => GetAssetPath(ProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (ProjectName, ProjectName, + return (ProjectName, ProjectName, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextCultureFlowsTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextCultureFlowsTests.cs index 3b77629534..0acfe2a874 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextCultureFlowsTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextCultureFlowsTests.cs @@ -58,9 +58,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string TargetAssetPath => GetAssetPath(ProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (ProjectName, ProjectName, + return (ProjectName, ProjectName, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextTests.cs index 17ba633939..3fcac1323f 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadContextTests.cs @@ -125,9 +125,9 @@ public void TestMethod2() public string InitToTestProjectPath => GetAssetPath(InitToTestProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (InitToTestProjectName, InitToTestProjectName, + return (InitToTestProjectName, InitToTestProjectName, InitToTestSourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadingTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadingTests.cs index a007045375..2d83cfb6aa 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadingTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ThreadingTests.cs @@ -78,9 +78,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string ProjectPath => GetAssetPath(ProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (ProjectName, ProjectName, + return (ProjectName, ProjectName, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$ProjectName$", ProjectName) diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TimeoutTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TimeoutTests.cs index d64c9c15c4..6aaf19aceb 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TimeoutTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TimeoutTests.cs @@ -1017,9 +1017,9 @@ public async Task TestMethod() public string CooperativeTestMethodTimeoutAssetPath => GetAssetPath(CooperativeTestMethodTimeout); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, TestCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TrxReportTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TrxReportTests.cs index 2943f72d25..339e77e8a0 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TrxReportTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TrxReportTests.cs @@ -46,7 +46,7 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string TargetAssetPath => GetAssetPath(ProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { yield return (ProjectName, ProjectName, SourceCode diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TupleDynamicDataTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TupleDynamicDataTests.cs index fd87953f65..a80f724ec6 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TupleDynamicDataTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TupleDynamicDataTests.cs @@ -58,9 +58,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string ProjectPath => GetAssetPath(ProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (ProjectName, ProjectName, + return (ProjectName, ProjectName, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ValueTaskTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ValueTaskTests.cs index 54ecbb6a4e..0d62762432 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ValueTaskTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ValueTaskTests.cs @@ -27,9 +27,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string ProjectPath => GetAssetPath(ProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (ProjectName, ProjectName, + return (ProjectName, ProjectName, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/WinUITests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/WinUITests.cs index b3a9d2f615..a6233f22d8 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/WinUITests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/WinUITests.cs @@ -30,7 +30,7 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string ProjectPath => GetAssetPath(ProjectName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/AbortionTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/AbortionTests.cs index 68713b2182..41fbe30ea9 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/AbortionTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/AbortionTests.cs @@ -140,20 +140,11 @@ internal class Capabilities : ITestFrameworkCapabilities public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() - { - // We expect the same semantic for Linux, the test setup is not cross and we're using specific - // Windows API because this gesture is not easy xplat. - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - yield break; - } - - yield return (AssetName, AssetName, + public override (string ID, string Name, string Code) GetAssetsToGenerate() + => (AssetName, AssetName, Sources .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion)); - } } public TestContext TestContext { get; set; } diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ConsoleTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ConsoleTests.cs index b2aa908dfd..67fddd91bd 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ConsoleTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ConsoleTests.cs @@ -560,9 +560,9 @@ internal class Capabilities : ITestFrameworkCapabilities public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, Sources .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion)); diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/CrashDumpTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/CrashDumpTests.cs index 259b52d09b..6a768c6bdb 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/CrashDumpTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/CrashDumpTests.cs @@ -58,9 +58,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. { private const string AssetName = "CrashDumpFixture"; - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, Sources .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion)); diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/CrashPlusHangDumpTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/CrashPlusHangDumpTests.cs index e62a5a263d..75967699a2 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/CrashPlusHangDumpTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/CrashPlusHangDumpTests.cs @@ -60,9 +60,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, Sources .PatchTargetFrameworks(TargetFrameworks.NetCurrent) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion)); diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/CustomBannerTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/CustomBannerTests.cs index 52d363b1e9..7c8ff8c98f 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/CustomBannerTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/CustomBannerTests.cs @@ -156,9 +156,9 @@ public Task ExecuteRequestAsync(ExecuteRequestContext context) public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, CustomBannerTestCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion)); diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/DataConsumerThroughputTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/DataConsumerThroughputTests.cs index 1a427bc1d2..d746bcc2e8 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/DataConsumerThroughputTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/DataConsumerThroughputTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace Microsoft.Testing.Platform.Acceptance.IntegrationTests; @@ -127,9 +127,9 @@ public Task IsEnabledAsync() public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, TestCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion)); diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/DiagnosticTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/DiagnosticTests.cs index a66c565539..89fa5a7839 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/DiagnosticTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/DiagnosticTests.cs @@ -292,9 +292,9 @@ public Task ExecuteRequestAsync(ExecuteRequestContext context) public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, TestCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion)); diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/EnvironmentVariablesConfigurationProviderTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/EnvironmentVariablesConfigurationProviderTests.cs index 00349cccf4..e91c196823 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/EnvironmentVariablesConfigurationProviderTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/EnvironmentVariablesConfigurationProviderTests.cs @@ -187,9 +187,9 @@ public async Task ExecuteRequestAsync(ExecuteRequestContext context) public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, Sources .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion)); diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ExecutionRequestCompleteTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ExecutionRequestCompleteTests.cs index dd67f22e1f..27afd53b75 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ExecutionRequestCompleteTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ExecutionRequestCompleteTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace Microsoft.Testing.Platform.Acceptance.IntegrationTests; @@ -97,9 +97,9 @@ internal class Capabilities : ITestFrameworkCapabilities public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, TestCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion)); diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ExecutionTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ExecutionTests.cs index 4f4e26133f..c9c21a908c 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ExecutionTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ExecutionTests.cs @@ -285,9 +285,9 @@ public async Task ExecuteRequestAsync(ExecuteRequestContext context) public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, TestCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion)); diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ExitOnProcessExitTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ExitOnProcessExitTests.cs index b14ea8c35f..7a1bb5430b 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ExitOnProcessExitTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ExitOnProcessExitTests.cs @@ -161,9 +161,9 @@ public async Task ExecuteRequestAsync(ExecuteRequestContext context) public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, TestCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion)); diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ForwardCompatibilityTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ForwardCompatibilityTests.cs index 47acfea2cf..6f297a1b1c 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ForwardCompatibilityTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ForwardCompatibilityTests.cs @@ -123,9 +123,9 @@ public async Task ExecuteRequestAsync(ExecuteRequestContext context) public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, ForwardCompatibilityTestCode .PatchTargetFrameworks(TargetFrameworks.NetCurrent) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion) diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HangDumpOutputTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HangDumpOutputTests.cs index 1daa8ffc9e..ce73796031 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HangDumpOutputTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HangDumpOutputTests.cs @@ -35,9 +35,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, Sources .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion)); diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HangDumpProcessTreeTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HangDumpProcessTreeTests.cs index 8449b3c0fa..94a7b4fbbe 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HangDumpProcessTreeTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HangDumpProcessTreeTests.cs @@ -31,7 +31,7 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { yield return (AssetName, AssetName, Sources diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HangDumpTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HangDumpTests.cs index adb139ced3..38bf9e6bd0 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HangDumpTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HangDumpTests.cs @@ -182,9 +182,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, Sources .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion)); diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoAllExtensionsTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoAllExtensionsTests.cs index 1861bfa08f..a42c7bd804 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoAllExtensionsTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoAllExtensionsTests.cs @@ -460,7 +460,7 @@ public Task ExecuteRequestAsync(ExecuteRequestContext context) public string AllExtensionsTargetAssetPath => GetAssetPath(AllExtensionsAssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { yield return (AllExtensionsAssetName, AllExtensionsAssetName, AllExtensionsTestCode diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoTests.cs index dddd21066c..3cd3d261af 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoTests.cs @@ -400,9 +400,9 @@ public Task ExecuteRequestAsync(ExecuteRequestContext context) public string NoExtensionTargetAssetPath => GetAssetPath(NoExtensionAssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (NoExtensionAssetName, NoExtensionAssetName, + return (NoExtensionAssetName, NoExtensionAssetName, NoExtensionTestCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion)); diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/LocalizationFailingTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/LocalizationFailingTests.cs index ed7498e330..75831d08a1 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/LocalizationFailingTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/LocalizationFailingTests.cs @@ -117,7 +117,7 @@ public async Task ExecuteRequestAsync(ExecuteRequestContext context) public string FailingAssetPath => GetAssetPath(FailingAssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { yield return (FailingAssetName, FailingAssetName, FailingTestCode diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/LocalizationTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/LocalizationTests.cs index ff5ae25748..d4bc14d36b 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/LocalizationTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/LocalizationTests.cs @@ -178,9 +178,9 @@ public async Task ExecuteRequestAsync(ExecuteRequestContext context) public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, TestCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion)); diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/MaxFailedTestsExtensionTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/MaxFailedTestsExtensionTests.cs index 528de217d2..643458e870 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/MaxFailedTestsExtensionTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/MaxFailedTestsExtensionTests.cs @@ -176,9 +176,9 @@ public Task StopTestExecutionAsync(CancellationToken cancellationToken) public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, Sources .PatchTargetFrameworks(TargetFrameworks.NetCurrent) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion)); diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/NoBannerTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/NoBannerTests.cs index f3776e8d31..0771834bf0 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/NoBannerTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/NoBannerTests.cs @@ -126,9 +126,9 @@ public Task ExecuteRequestAsync(ExecuteRequestContext context) public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, NoBannerTestCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion)); diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/RetryFailedTestsTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/RetryFailedTestsTests.cs index a74623bbf7..2a25e7ad60 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/RetryFailedTestsTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/RetryFailedTestsTests.cs @@ -209,9 +209,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. { public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, TestCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion)); diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ServerLoggingTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ServerLoggingTests.cs index c3f6254533..654527065e 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ServerLoggingTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/ServerLoggingTests.cs @@ -84,9 +84,9 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, Sources .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion)); diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TelemetryDisabledTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TelemetryDisabledTests.cs index 77ff118e29..2fcdad7c1d 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TelemetryDisabledTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TelemetryDisabledTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. +// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.Testing.Platform.Configurations; @@ -116,9 +116,9 @@ public Task ExecuteRequestAsync(ExecuteRequestContext context) public string TargetAssetPath => GetAssetPath(WithoutTelemetry); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (WithoutTelemetry, AssetName, + return (WithoutTelemetry, AssetName, TestCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion) diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TelemetryTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TelemetryTests.cs index 301db49a0e..0312a57698 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TelemetryTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TelemetryTests.cs @@ -172,9 +172,9 @@ public Task ExecuteRequestAsync(ExecuteRequestContext context) public string TargetAssetPath => GetAssetPath(WithTelemetry); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (WithTelemetry, AssetName, + return (WithTelemetry, AssetName, TestCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion) diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TestHostProcessLifetimeHandlerTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TestHostProcessLifetimeHandlerTests.cs index b09d1975a2..5c8ecb03d4 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TestHostProcessLifetimeHandlerTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TestHostProcessLifetimeHandlerTests.cs @@ -133,7 +133,7 @@ public async Task ExecuteRequestAsync(ExecuteRequestContext context) public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { yield return (AssetName, AssetName, Sources diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TimeoutTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TimeoutTests.cs index c85a264d61..ab7f8950f9 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TimeoutTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TimeoutTests.cs @@ -149,9 +149,9 @@ public Task ExecuteRequestAsync(ExecuteRequestContext context) public string NoExtensionTargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, TestCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion)); diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TrxDataRowTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TrxDataRowTests.cs index b24ba7fd15..aa4f3dff32 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TrxDataRowTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TrxDataRowTests.cs @@ -110,9 +110,9 @@ public void TestMethod1(string s) public string TargetAssetPath => GetAssetPath(WithDataRow); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (WithDataRow, AssetNameUsingMSTest, + return (WithDataRow, AssetNameUsingMSTest, MSTestCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion) diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TrxFailingTestTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TrxFailingTestTests.cs index 067990f55b..ac6b6f3966 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TrxFailingTestTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TrxFailingTestTests.cs @@ -130,9 +130,9 @@ public async Task ExecuteRequestAsync(ExecuteRequestContext context) public string TargetAssetPath => GetAssetPath(WithFailingTest); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (WithFailingTest, AssetName, + return (WithFailingTest, AssetName, FailingTestCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion)); diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TrxSkippedTestTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TrxSkippedTestTests.cs index 0d2a6a76f7..573cced286 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TrxSkippedTestTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TrxSkippedTestTests.cs @@ -116,9 +116,9 @@ public void TestMethod1(string s) public string TargetAssetPath => GetAssetPath(WithSkippedTest); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (WithSkippedTest, AssetNameUsingMSTest, + return (WithSkippedTest, AssetNameUsingMSTest, MSTestCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion) diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TrxTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TrxTests.cs index 7f867b9c21..e4ac4c7a57 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TrxTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TrxTests.cs @@ -262,9 +262,9 @@ public async Task ExecuteRequestAsync(ExecuteRequestContext context) public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, TestCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion)); diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/UnhandledExceptionPolicyTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/UnhandledExceptionPolicyTests.cs index b1675e268f..f9babb66d0 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/UnhandledExceptionPolicyTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/UnhandledExceptionPolicyTests.cs @@ -284,9 +284,9 @@ public async Task ExecuteRequestAsync(ExecuteRequestContext context) public string TargetAssetPath => GetAssetPath(AssetName); - public override IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate() + public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, Sources .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion)); diff --git a/test/Utilities/Microsoft.Testing.TestInfrastructure/TestAssetFixtureBase.cs b/test/Utilities/Microsoft.Testing.TestInfrastructure/TestAssetFixtureBase.cs index 7529bba1c6..7def0ecbd6 100644 --- a/test/Utilities/Microsoft.Testing.TestInfrastructure/TestAssetFixtureBase.cs +++ b/test/Utilities/Microsoft.Testing.TestInfrastructure/TestAssetFixtureBase.cs @@ -32,25 +32,24 @@ public string GetAssetPath(string assetID) ? throw new ArgumentNullException(nameof(assetID), $"Cannot find target path for test asset '{assetID}'") : testAsset.TargetAssetPath; - public async Task InitializeAsync(CancellationToken cancellationToken) => - // Generate all projects into the same temporary base folder, but separate subdirectories, so we can reference one from other. - await Parallel.ForEachAsync(GetAssetsToGenerate(), async (asset, _) => - { - TestAsset testAsset = await TestAsset.GenerateAssetAsync(asset.ID, asset.Code, _tempDirectory); - DotnetMuxerResult result = await DotnetCli.RunAsync($"build {testAsset.TargetAssetPath} -c Release", _nugetGlobalPackagesDirectory.Path, callerMemberName: asset.Name, cancellationToken: cancellationToken); - testAsset.DotnetResult = result; - _testAssets.TryAdd(asset.ID, testAsset); - }); + public async Task InitializeAsync(CancellationToken cancellationToken) + { + var (assetId, assetName, assetCode) = GetAssetsToGenerate(); + TestAsset testAsset = await TestAsset.GenerateAssetAsync(assetId, assetCode, _tempDirectory); + DotnetMuxerResult result = await DotnetCli.RunAsync($"build {testAsset.TargetAssetPath} -c Release", _nugetGlobalPackagesDirectory.Path, callerMemberName: assetName, cancellationToken: cancellationToken); + testAsset.DotnetResult = result; + _testAssets.TryAdd(asset.ID, testAsset); + } /// - /// Returns a list test assets to generate. A test asset has an id, name and code. A test asset is typically a project and all its files. Like MyTests.csproj, Program.cs, runsettings.runsettings etc. + /// Returns a test asset to generate. A test asset has an id, name and code. A test asset is typically a project and all its files. Like MyTests.csproj, Program.cs, runsettings.runsettings etc. /// The asset id determines the name of the sub-folder into which all those files will be placed, this id has to be unique within the collection returned by this method. /// The asset name, identifies the file that will be built within that folder, this name does not have to be unique, so you can re-use similar sources in multiple assets, e.g. when one option needs to change /// but rest of the project remains the same. /// Code is the code that is split into separate files on the #file comments in the code. /// /// - public abstract IEnumerable<(string ID, string Name, string Code)> GetAssetsToGenerate(); + public abstract (string ID, string Name, string Code) GetAssetsToGenerate(); protected virtual void Dispose(bool disposing) { From e3e927459da06d414e5e93d75d407b49907a7bec Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Fri, 20 Mar 2026 10:48:05 +0100 Subject: [PATCH 2/3] Update TestAssetFixtureBase.cs --- .../TestAssetFixtureBase.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Utilities/Microsoft.Testing.TestInfrastructure/TestAssetFixtureBase.cs b/test/Utilities/Microsoft.Testing.TestInfrastructure/TestAssetFixtureBase.cs index 7def0ecbd6..e84ba86d42 100644 --- a/test/Utilities/Microsoft.Testing.TestInfrastructure/TestAssetFixtureBase.cs +++ b/test/Utilities/Microsoft.Testing.TestInfrastructure/TestAssetFixtureBase.cs @@ -34,11 +34,11 @@ public string GetAssetPath(string assetID) public async Task InitializeAsync(CancellationToken cancellationToken) { - var (assetId, assetName, assetCode) = GetAssetsToGenerate(); + (string assetId, string assetName, string assetCode) = GetAssetsToGenerate(); TestAsset testAsset = await TestAsset.GenerateAssetAsync(assetId, assetCode, _tempDirectory); DotnetMuxerResult result = await DotnetCli.RunAsync($"build {testAsset.TargetAssetPath} -c Release", _nugetGlobalPackagesDirectory.Path, callerMemberName: assetName, cancellationToken: cancellationToken); testAsset.DotnetResult = result; - _testAssets.TryAdd(asset.ID, testAsset); + _testAssets.TryAdd(assetId, testAsset); } /// From 86357da780f3ca166d11497ba23b6017877f6479 Mon Sep 17 00:00:00 2001 From: Youssef1313 Date: Fri, 20 Mar 2026 11:48:43 +0100 Subject: [PATCH 3/3] Few fixes --- .../AssemblyCleanupTests.cs | 2 +- .../ConfigurationSettingsTests.cs | 2 +- .../DynamicDataMethodTests.cs | 2 +- .../MSTest.Acceptance.IntegrationTests/IgnoreTests.cs | 2 +- .../InconclusiveTests.cs | 2 +- .../LifecycleAttributesValueTaskThreadingTests.cs | 2 +- .../ParameterizedDataRowTests.cs | 2 +- .../RunsettingsTests.cs | 2 +- .../STATestClassCooperativeTimeoutTests.cs | 2 +- .../STATestClassTests.cs | 2 +- .../MSTest.Acceptance.IntegrationTests/TrxReportTests.cs | 2 +- .../MSTest.Acceptance.IntegrationTests/WinUITests.cs | 8 +------- .../HangDumpProcessTreeTests.cs | 2 +- .../HelpInfoAllExtensionsTests.cs | 2 +- .../LocalizationFailingTests.cs | 2 +- .../TestHostProcessLifetimeHandlerTests.cs | 2 +- .../TestAssetFixtureBase.cs | 2 +- 17 files changed, 17 insertions(+), 23 deletions(-) diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AssemblyCleanupTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AssemblyCleanupTests.cs index 9dded637eb..e9a39b627c 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AssemblyCleanupTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/AssemblyCleanupTests.cs @@ -34,7 +34,7 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (ProjectName, ProjectName, + return (ProjectName, ProjectName, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ConfigurationSettingsTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ConfigurationSettingsTests.cs index dedab65012..94750b8373 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ConfigurationSettingsTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ConfigurationSettingsTests.cs @@ -88,7 +88,7 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (ProjectName, ProjectName, + return (ProjectName, ProjectName, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$ProjectName$", ProjectName) diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DynamicDataMethodTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DynamicDataMethodTests.cs index e9630cae18..d74cc8ffb1 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DynamicDataMethodTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DynamicDataMethodTests.cs @@ -59,7 +59,7 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (ProjectName, ProjectName, + return (ProjectName, ProjectName, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/IgnoreTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/IgnoreTests.cs index 94bd8c0a80..a45b97c8ed 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/IgnoreTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/IgnoreTests.cs @@ -114,7 +114,7 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (ProjectName, ProjectName, + return (ProjectName, ProjectName, SourceCode .PatchTargetFrameworks(TargetFrameworks.NetCurrent) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/InconclusiveTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/InconclusiveTests.cs index fd7919f067..2a9ca3940d 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/InconclusiveTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/InconclusiveTests.cs @@ -120,7 +120,7 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (ProjectName, ProjectName, + return (ProjectName, ProjectName, SourceCode .PatchTargetFrameworks(TargetFrameworks.NetCurrent) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleAttributesValueTaskThreadingTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleAttributesValueTaskThreadingTests.cs index 61e1f25d04..28e04174d9 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleAttributesValueTaskThreadingTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/LifecycleAttributesValueTaskThreadingTests.cs @@ -34,7 +34,7 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (ProjectName, ProjectName, + return (ProjectName, ProjectName, SourceCode .PatchTargetFrameworks(TargetFrameworks.Net) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ParameterizedDataRowTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ParameterizedDataRowTests.cs index 7866be5e55..f4308a7171 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ParameterizedDataRowTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/ParameterizedDataRowTests.cs @@ -36,7 +36,7 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. { public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (DataRowAssetName, DataRowAssetName, + return (DataRowAssetName, DataRowAssetName, SourceCodeDataRow .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/RunsettingsTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/RunsettingsTests.cs index ded0fcd78a..a59bdb18a9 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/RunsettingsTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/RunsettingsTests.cs @@ -98,7 +98,7 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (ProjectName, ProjectName, + return (ProjectName, ProjectName, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassCooperativeTimeoutTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassCooperativeTimeoutTests.cs index e911a13d57..3a720e8551 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassCooperativeTimeoutTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassCooperativeTimeoutTests.cs @@ -61,7 +61,7 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$ProjectName$", AssetName) diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassTests.cs index 12352caa9c..ab8181b15a 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/STATestClassTests.cs @@ -61,7 +61,7 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$ProjectName$", AssetName) diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TrxReportTests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TrxReportTests.cs index 339e77e8a0..bf061c6778 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TrxReportTests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/TrxReportTests.cs @@ -48,7 +48,7 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (ProjectName, ProjectName, + return (ProjectName, ProjectName, SourceCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion) diff --git a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/WinUITests.cs b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/WinUITests.cs index a6233f22d8..c8ff244101 100644 --- a/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/WinUITests.cs +++ b/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/WinUITests.cs @@ -32,13 +32,7 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public override (string ID, string Name, string Code) GetAssetsToGenerate() { - if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - // WinUI is Windows-only :) - yield break; - } - - yield return (ProjectName, ProjectName, + return (ProjectName, ProjectName, SourceCode .PatchCodeWithReplace("$TargetFramework$", WinUITargetFramework) .PatchCodeWithReplace("$MSTestVersion$", MSTestVersion)); diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HangDumpProcessTreeTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HangDumpProcessTreeTests.cs index 94a7b4fbbe..7e5e26f494 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HangDumpProcessTreeTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HangDumpProcessTreeTests.cs @@ -33,7 +33,7 @@ public sealed class TestAssetFixture() : TestAssetFixtureBase(AcceptanceFixture. public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, Sources .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion)); diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoAllExtensionsTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoAllExtensionsTests.cs index a42c7bd804..56d5265ea5 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoAllExtensionsTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoAllExtensionsTests.cs @@ -462,7 +462,7 @@ public Task ExecuteRequestAsync(ExecuteRequestContext context) public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AllExtensionsAssetName, AllExtensionsAssetName, + return (AllExtensionsAssetName, AllExtensionsAssetName, AllExtensionsTestCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion)); diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/LocalizationFailingTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/LocalizationFailingTests.cs index 75831d08a1..a82a264c34 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/LocalizationFailingTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/LocalizationFailingTests.cs @@ -119,7 +119,7 @@ public async Task ExecuteRequestAsync(ExecuteRequestContext context) public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (FailingAssetName, FailingAssetName, + return (FailingAssetName, FailingAssetName, FailingTestCode .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion)); diff --git a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TestHostProcessLifetimeHandlerTests.cs b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TestHostProcessLifetimeHandlerTests.cs index 5c8ecb03d4..d28d587520 100644 --- a/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TestHostProcessLifetimeHandlerTests.cs +++ b/test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/TestHostProcessLifetimeHandlerTests.cs @@ -135,7 +135,7 @@ public async Task ExecuteRequestAsync(ExecuteRequestContext context) public override (string ID, string Name, string Code) GetAssetsToGenerate() { - yield return (AssetName, AssetName, + return (AssetName, AssetName, Sources .PatchTargetFrameworks(TargetFrameworks.All) .PatchCodeWithReplace("$MicrosoftTestingPlatformVersion$", MicrosoftTestingPlatformVersion)); diff --git a/test/Utilities/Microsoft.Testing.TestInfrastructure/TestAssetFixtureBase.cs b/test/Utilities/Microsoft.Testing.TestInfrastructure/TestAssetFixtureBase.cs index e84ba86d42..97e80cb3eb 100644 --- a/test/Utilities/Microsoft.Testing.TestInfrastructure/TestAssetFixtureBase.cs +++ b/test/Utilities/Microsoft.Testing.TestInfrastructure/TestAssetFixtureBase.cs @@ -43,7 +43,7 @@ public async Task InitializeAsync(CancellationToken cancellationToken) /// /// Returns a test asset to generate. A test asset has an id, name and code. A test asset is typically a project and all its files. Like MyTests.csproj, Program.cs, runsettings.runsettings etc. - /// The asset id determines the name of the sub-folder into which all those files will be placed, this id has to be unique within the collection returned by this method. + /// The asset id determines the name of the sub-folder into which all those files will be placed. /// The asset name, identifies the file that will be built within that folder, this name does not have to be unique, so you can re-use similar sources in multiple assets, e.g. when one option needs to change /// but rest of the project remains the same. /// Code is the code that is split into separate files on the #file comments in the code.