Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Community Edition and Fakes Framework?

I can't see the "Add Fakes Assembly" item in my test project's references' shortcut menu. Is Microsoft Fakes Framework available in Visual Studio Community 2013 edition?

like image 498
tomppa Avatar asked Nov 13 '14 10:11

tomppa


People also ask

What is ms Fakes?

Microsoft Fakes helps you isolate the code you're testing by replacing other parts of the application with stubs or shims. The stubs and shims are small pieces of code that are under the control of your tests.

What does add fakes Assembly do?

When you click on “Add Fakes Assembly” it will create the same assembly again with the Fakes keyword added that we will use for our testing purposes. The Fakes framework uses delegate-based methods for writing code.

How to use fakes framework in Visual Studio?

The MS fakes framework uses generated code, much like Accessors in prior versions of Visual Studio instead of generic types. When you want to use the fakes framework for a dependency, you add the assembly that contains the dependency to the references of the test project and then right-click on it to generate the test doubles (stubs or shims).

What version of Visual Studio do I need to run Microsoft fakes?

Distributed testing with the vstest task .NET Core and .NET 5.0 projects using Microsoft Fakes requires Visual Studio 2019 Update 9 Preview 20201020-06 and higher. You will need minimal changes in your .NET Framework set up for Microsoft Fakes to transition to .NET Core or .NET 5.0.

What version of Visual Studio 2019 do I need for distributed testing?

Distributed testing with the vstest task .NET Core and .NET 5.0 projects using Microsoft Fakes requires Visual Studio 2019 Update 9 Preview 20201020-06 and higher. You will need minimal changes in your .NET Framework set up for Microsoft Fakes to transition to .NET Core or .NET 5.0. The cases that you would have to consider are:

Which Microsoft fakes mock framework is best for testing?

For developers using Microsoft Visual Studio, the most basic choice is whether to use VS' built-in Microsoft Fakes framework, or a third-party/open source framework such as Moq or NSubstitute. In this post, we'll take a look at what makes MS Fakes stand out from other mock frameworks, and when Fakes may or may not be your best choice for testing.


1 Answers

Microsoft Fakes is not available in Professional Edition. Therefore, it won't appear in Community Edition either (but you can let your voice be heard).

Reference

like image 171
Lex Li Avatar answered Oct 05 '22 08:10

Lex Li