gpt4 book ai didi

c# - 如何在 VS 2012 Professional RC 中添加假程序集?

转载 作者:IT王子 更新时间:2023-10-29 04:08:12 25 4
gpt4 key购买 nike

根据下面两篇关于 VS 2012 和 Microsoft Fakes Test Framework 的文章,我应该能够在我的测试项目的引用中右键单击一个程序集并选择“添加 Fakes 程序集”以在 Visual 中创建一个新的 Microsoft Fakes Framework 程序集Studio 11/2012。但是我没有在 VS 2012 RC Professional 中找到上下文菜单项。我可能需要引用 Microsoft.QualityTools.Testing.Fakes 程序集,但我也无法在添加引用搜索中找到它。自测试版以来所需的菜单是否发生了变化?我需要安装扩展程序吗?

如何在 VS 2012 Professional RC 中添加假程序集?

引用的文章:

最佳答案

更新:VS2012 Update 2 将在 Premium 中包含 Fakes 支持。

参见 http://blogs.msdn.com/b/bharry/archive/2013/01/30/announcing-visual-studio-2012-update-2-vs2012-2.aspx

我在 Microsoft Connect 门户中问过这个问题...答案令人失望:

The RC documentation was incorrect. Fakes are available only in VS Ultimate. I have passed your concerns on the Fakes team. At the moment, we don't have any information about PEX for VS 2012.

我的详细问题是:

MSDN documentation states that the Fakes framework, the successor of Moles framework for isolatiion of code for unit tests is available in the Premium and Ultimate editions.

http://msdn.microsoft.com/en-us/library/dd264975(v=vs.110)

Also, elsewhere in MSDN blogs, Peter Provost confirmed the same some months ago for the VS2011 release:

http://blogs.msdn.com/b/visualstudioalm/archive/2012/03/09/10279666.aspx

But when I tried out the Premium RC today, I couldn't see the "Add Fakes Assembly" context menu option in my test project for my sample DLL containing code to test. It was only after I installed the Ultimate RC that I got the Fakes menu support.

This prompts me to ask of you to clarify the following:

1) Is my observation correct, that Fakes is indeed only available with Ultimate? Is that because of its dependency on IntelliTrace, which is an Ultimate-only feature?

2) If yes, then why is there conflicting information indicating the availability of Fakes with Premium?

3) Why should the Fakes framework be now dependent on IntelliTrace when it worked well without this dependency in VS 2010? This is essentially cutting off existing users of Moles with Professional or even Premium editions of VS 2010 and putting their upgrade to VS 2012 in question because of their existing reliance on Moles for their unit tests.

4) We are already using Moles with our VS 2010 Professional edition. So this observation indeed has me worried about the present decision to use Moles among our C# developers. At best, we can think of an upgrade to Premium for our large developer base (given that we also have code coverage support)... but an upgrade straight to Ultimate just to get UT support will never be on the cards.

I wish to have these points clarified at the earliest so that we can start looking for alternatives to Moles, in case your decision is indeed to keep Fakes exclusive to VS 2012 Ultimate.

关于c# - 如何在 VS 2012 Professional RC 中添加假程序集?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11009332/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com