Skip to content

Commit

Permalink
Add property to SDK for Fakes feature (#4121)
Browse files Browse the repository at this point in the history
  • Loading branch information
Evangelink authored Nov 22, 2024
1 parent f00079e commit 8ce1906
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<!-- Test Platform, .NET Test SDK and Object Model -->
<MicrosoftNETTestSdkVersion>17.12.0</MicrosoftNETTestSdkVersion>
<MicrosoftPlaywrightVersion>1.47.0</MicrosoftPlaywrightVersion>
<MicrosoftTestingExtensionsFakesVersion>17.12.0-beta.24429.1</MicrosoftTestingExtensionsFakesVersion>
<!-- CVE-2017-0247 -->
<SystemNetWebSocketsClientVersion>4.3.1</SystemNetWebSocketsClientVersion>
<SystemTextRegularExpressionsVersion>4.3.1</SystemTextRegularExpressionsVersion>
Expand Down
2 changes: 1 addition & 1 deletion src/Package/MSTest.Sdk/MSTest.Sdk.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</ItemGroup>
<Target Name="GenerateTemplates" AfterTargets="PrepareForBuild">
<PropertyGroup>
<_TemplateProperties>MSTestEngineVersion=$(MSTestEngineVersion);MSTestVersion=$(Version);MicrosoftTestingPlatformVersion=$(Version.Replace('$(VersionPrefix)', '$(TestingPlatformVersionPrefix)'));MicrosoftTestingEntrepriseExtensionsVersion=$(MicrosoftTestingInternalFrameworkVersion);MicrosoftNETTestSdkVersion=$(MicrosoftNETTestSdkVersion);MicrosoftTestingExtensionsCodeCoverageVersion=$(MicrosoftTestingExtensionsCodeCoverageVersion);MicrosoftPlaywrightVersion=$(MicrosoftPlaywrightVersion);AspireHostingTestingVersion=$(AspireHostingTestingVersion)</_TemplateProperties>
<_TemplateProperties>MSTestEngineVersion=$(MSTestEngineVersion);MSTestVersion=$(Version);MicrosoftTestingPlatformVersion=$(Version.Replace('$(VersionPrefix)', '$(TestingPlatformVersionPrefix)'));MicrosoftTestingEntrepriseExtensionsVersion=$(MicrosoftTestingInternalFrameworkVersion);MicrosoftNETTestSdkVersion=$(MicrosoftNETTestSdkVersion);MicrosoftTestingExtensionsCodeCoverageVersion=$(MicrosoftTestingExtensionsCodeCoverageVersion);MicrosoftPlaywrightVersion=$(MicrosoftPlaywrightVersion);AspireHostingTestingVersion=$(AspireHostingTestingVersion);MicrosoftTestingExtensionsFakesVersion=$(MicrosoftTestingExtensionsFakesVersion)</_TemplateProperties>
</PropertyGroup>

<!--
Expand Down
19 changes: 13 additions & 6 deletions src/Package/MSTest.Sdk/Sdk/Runner/ClassicEngine.targets
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
<!-- Hang dump -->
<EnableMicrosoftTestingExtensionsHangDump Condition=" '$(EnableMicrosoftTestingExtensionsHangDump)' != 'false' and '$(TestingExtensionsProfile)' == 'AllMicrosoft' " >true</EnableMicrosoftTestingExtensionsHangDump>
<MicrosoftTestingExtensionsHangDumpVersion Condition=" '$(MicrosoftTestingExtensionsHangDumpVersion)' == '' " >$(MicrosoftTestingExtensionsCommonVersion)</MicrosoftTestingExtensionsHangDumpVersion>

<!-- Fakes -->
<EnableMicrosoftTestingExtensionsFakes Condition=" '$(EnableMicrosoftTestingExtensionsFakes)' != 'false' and '$(TestingExtensionsProfile)' == 'AllMicrosoft' " >true</EnableMicrosoftTestingExtensionsFakes>
<MicrosoftTestingExtensionsFakesVersion Condition=" '$(MicrosoftTestingExtensionsFakesVersion)' == '' " >$(MicrosoftTestingExtensionsFakesVersion)</MicrosoftTestingExtensionsFakesVersion>
</PropertyGroup>

<!-- Core -->
Expand Down Expand Up @@ -54,24 +58,27 @@

<!-- Extensions (for test applications - not for test libraries) -->
<ItemGroup Condition=" '$(IsTestApplication)' == 'true' ">
<PackageReference Include="Microsoft.Testing.Extensions.TrxReport" Sdk="MSTest"
Version="$(MicrosoftTestingExtensionsTrxReportVersion)" VersionOverride="$(MicrosoftTestingExtensionsTrxReportVersion)"
Condition=" '$(EnableMicrosoftTestingExtensionsTrxReport)' == 'true' " />
<PackageReference Include="Microsoft.Testing.Extensions.CrashDump" Sdk="MSTest"
Version="$(MicrosoftTestingExtensionsCrashDumpVersion)" VersionOverride="$(MicrosoftTestingExtensionsCrashDumpVersion)"
Condition=" '$(EnableMicrosoftTestingExtensionsCrashDump)' == 'true' " />
<PackageReference Include="Microsoft.Testing.Extensions.HangDump" Sdk="MSTest"
Version="$(MicrosoftTestingExtensionsHangDumpVersion)" VersionOverride="$(MicrosoftTestingExtensionsHangDumpVersion)"
Condition=" '$(EnableMicrosoftTestingExtensionsHangDump)' == 'true' " />
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" Sdk="MSTest"
Version="$(MicrosoftTestingExtensionsCodeCoverageVersion)" VersionOverride="$(MicrosoftTestingExtensionsCodeCoverageVersion)"
Condition=" '$(EnableMicrosoftTestingExtensionsCodeCoverage)' == 'true' " />
<PackageReference Include="Microsoft.Testing.Extensions.HangDump" Sdk="MSTest"
Version="$(MicrosoftTestingExtensionsHangDumpVersion)" VersionOverride="$(MicrosoftTestingExtensionsHangDumpVersion)"
Condition=" '$(EnableMicrosoftTestingExtensionsHangDump)' == 'true' " />
<PackageReference Include="Microsoft.Testing.Extensions.Fakes" Sdk="MSTest"
Version="$(MicrosoftTestingExtensionsFakesVersion)" VersionOverride="$(MicrosoftTestingExtensionsFakesVersion)"
Condition=" '$(EnableMicrosoftTestingExtensionsFakes)' == 'true' " />
<PackageReference Include="Microsoft.Testing.Extensions.HotReload" Sdk="MSTest"
Version="$(MicrosoftTestingExtensionsHotReloadVersion)" VersionOverride="$(MicrosoftTestingExtensionsHotReloadVersion)"
Condition=" '$(EnableMicrosoftTestingExtensionsHotReload)' == 'true' " />
<PackageReference Include="Microsoft.Testing.Extensions.Retry" Sdk="MSTest"
Version="$(MicrosoftTestingExtensionsRetryVersion)" VersionOverride="$(MicrosoftTestingExtensionsRetryVersion)"
Condition=" '$(EnableMicrosoftTestingExtensionsRetry)' == 'true' " />
<PackageReference Include="Microsoft.Testing.Extensions.TrxReport" Sdk="MSTest"
Version="$(MicrosoftTestingExtensionsTrxReportVersion)" VersionOverride="$(MicrosoftTestingExtensionsTrxReportVersion)"
Condition=" '$(EnableMicrosoftTestingExtensionsTrxReport)' == 'true' " />
</ItemGroup>

<Import Project="$(MSBuildThisFileDirectory)../Features/Aspire.targets" Condition=" '$(EnableAspireTesting)' == 'true' " />
Expand Down
7 changes: 4 additions & 3 deletions src/Package/MSTest.Sdk/Sdk/Sdk.props.template
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
<UseVSTest Condition=" '$(UseVSTest)' == '' " >false</UseVSTest>

<AspireHostingTestingVersion Condition=" '$(AspireHostingTestingVersion)' == '' ">${AspireHostingTestingVersion}</AspireHostingTestingVersion>
<MSTestVersion Condition=" '$(MSTestVersion)' == '' ">${MSTestVersion}</MSTestVersion>
<MSTestEngineVersion Condition=" '$(MSTestEngineVersion)' == '' ">${MSTestEngineVersion}</MSTestEngineVersion>
<MicrosoftNETTestSdkVersion Condition=" '$(MicrosoftNETTestSdkVersion)' == '' ">${MicrosoftNETTestSdkVersion}</MicrosoftNETTestSdkVersion>
<MicrosoftPlaywrightVersion Condition=" '$(MicrosoftPlaywrightVersion)' == '' ">${MicrosoftPlaywrightVersion}</MicrosoftPlaywrightVersion>
<MicrosoftTestingEntrepriseExtensionsVersion Condition=" '$(MicrosoftTestingEntrepriseExtensionsVersion)' == '' ">${MicrosoftTestingEntrepriseExtensionsVersion}</MicrosoftTestingEntrepriseExtensionsVersion>
<MicrosoftTestingExtensionsCodeCoverageVersion Condition=" '$(MicrosoftTestingExtensionsCodeCoverageVersion)' == '' " >${MicrosoftTestingExtensionsCodeCoverageVersion}</MicrosoftTestingExtensionsCodeCoverageVersion>
<MicrosoftTestingExtensionsFakesVersion Condition=" '$(MicrosoftTestingExtensionsFakesVersion)' == '' " >${MicrosoftTestingExtensionsFakesVersion}</MicrosoftTestingExtensionsFakesVersion>
<MicrosoftTestingPlatformVersion Condition=" '$(MicrosoftTestingPlatformVersion)' == '' " >${MicrosoftTestingPlatformVersion}</MicrosoftTestingPlatformVersion>
<MicrosoftTestingEntrepriseExtensionsVersion Condition=" '$(MicrosoftTestingEntrepriseExtensionsVersion)' == '' ">${MicrosoftTestingEntrepriseExtensionsVersion}</MicrosoftTestingEntrepriseExtensionsVersion>
<MSTestEngineVersion Condition=" '$(MSTestEngineVersion)' == '' ">${MSTestEngineVersion}</MSTestEngineVersion>
<MSTestVersion Condition=" '$(MSTestVersion)' == '' ">${MSTestVersion}</MSTestVersion>
</PropertyGroup>

</Project>

0 comments on commit 8ce1906

Please sign in to comment.