forked from dotnet/docs
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds a document about the fakes extension in MSTest Runner (dotnet#41517
) * Adds a document about the fakes extension in MSTest Runner * Add a trailing newline * Fix the fakes extension md Fix typo Create a subheading * Remove the absolute URL portion from Fakes link * Apply suggestions from code review --------- Co-authored-by: David Pine <[email protected]>
- Loading branch information
1 parent
073c21f
commit 255711d
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
docs/core/testing/unit-testing-platform-extensions-fakes.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
title: Microsoft.Testing.Platform Fakes extension | ||
description: Learn about the various Microsoft.Testing.Platform Fakes extension capabilities and how to use it. | ||
author: drognanar | ||
ms.author: arturs | ||
ms.date: 06/21/2024 | ||
--- | ||
|
||
# Fakes extension | ||
|
||
The `Microsoft.Testing.Extensions.Fakes` extension provides support to execute a test project that makes use of `Microsoft Fakes`. | ||
|
||
[Microsoft Fakes](/visualstudio/test/isolating-code-under-test-with-microsoft-fakes) allows you to better test your code by either generating `Stub`s (for instance creating a testable implementation of `INotifyPropertyChanged`) or by `Shim`ing methods and static methods (replacing the implementation of `File.Open` with a one you can control in your tests). | ||
|
||
> [!NOTE] | ||
> This extension requires a Visual Studio Enterprise installation with the minimum version of 17.11 preview 1 in order to work correctly. | ||
## Upgrade your project to the new extension | ||
|
||
To use the new extension with an existing project, update the existing `Microsoft.QualityTools.Testing.Fakes` reference with `Microsoft.Testing.Extensions.Fakes`. | ||
|
||
```diff | ||
- <Reference Include="Microsoft.QualityTools.Testing.Fakes, Version=12.0.0.0, Culture=Neutral"> | ||
- <SpecificVersion>False</SpecificVersion> | ||
- </Reference> | ||
+ <PackageReference Include="Microsoft.Testing.Extensions.Fakes" Version="17.11.0-beta.24319.3" /> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters