与ASP.Net MVC 1.0 NUnit的安装 [英] Installing nUnit with ASP.Net MVC 1.0

查看:107
本文介绍了与ASP.Net MVC 1.0 NUnit的安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有人对如何与ASP.Net MVC安装NUnit的任何意见/信息?我看到这关系到preVIEW发布和参与不必创建模板文件,运行命令提示符,甚至与注册表混乱的残忍梦魇previous职位。

Does anyone have any advice/information on how to install nUnit with ASP.Net MVC? I have seen previous posts which related to the preview releases and involved a ghoulish nightmare of having to create template files, run command prompt and even mess with the registry.

显然,这是很不理想,并给予微软打算让任何测试框架,我希望它是在充分释放大大改善的过程。谷歌搜索似乎返回时从MVC是在preVIEW阶段,虽然结果!这是为Visual Studio 2008专业版。

Obviously this is far from ideal and given Microsoft's intention to allow any testing framework I was hoping that it was a much improved process in the full release. Googling seems to return results from when MVC was in the preview stage though! This is for Visual Studio 2008 Pro.

干杯:)

编辑:看来也许不是: 的http:/ /msdn.microsoft.com/en-us/library/dd381614.aspx

编辑2::好吧发现这一点:<一href=\"http://blogs.msdn.com/webdevtools/archive/2008/05/30/asp-net-mvc-$p$pview-3-tooling-updates.aspx\" rel=\"nofollow\">http://blogs.msdn.com/webdevtools/archive/2008/05/30/asp-net-mvc-$p$pview-3-tooling-updates.aspx - 他们提供一些模板和安装批处理文件后,会出现添加新的MVC应用程序时,在下拉列表中显示。然而,它是专为MVC的preVIEW释放,它的效果并不理想。同样,谁拥有更好的建议,请张贴:)

Edit 2:: Ok found this: http://blogs.msdn.com/webdevtools/archive/2008/05/30/asp-net-mvc-preview-3-tooling-updates.aspx - They offer some templates and after installing the batch file it appears to show up in the drop down list when adding a new MVC application. However it was designed for the preview release of MVC so it's not ideal. Again, anyone who has better advice please post :)

推荐答案

下载在这里并按照步骤Read Me文件进行安装。

Download it here and follow the steps in the read me file to install it.

下面就是我是如何做到的概述。​​

Here's the overview of how I did it.


  1. 解压随Visual Studio中的MVC测试项目模板,MvcWebApplicationTestProjectTemplatev1.cs.zip。

  2. 变更HomeController.cs和AccountController.cs文件到NUnit的语法,例如,[识别TestClass]至[可是TestFixture]等...

  3. 更新了MvcApplicationTest.csproj引用为NUnit.Framework。

  4. 调整了MvcWebApplicationTestProjectTemplate.cs.vstemplate文件中更改NamePackage,描述,图标包,Defaut名称。

一旦你得到它压缩备份,你需要打开Visual Studio命令提示符,然后输入devenv的/设置注册与Visual Studio的模板。

Once you get it zipped back up you will need to open up the Visual Studio Command Prompt and type devenv /setup to register the template with visual studio.

您需要创建一个注册表项,使视觉工作室知道新模板住在哪里。

You will need to create a registry entry so visual studio knows where the new template lives.

如果我得到一个博客,我会很乐意更新我一个详细的答案后。这是一个有点棘手把它放在这儿...... Goolish不字。)

If I ever get a blog I will be happy to update my answer with a detailed post. It's a little involved to put it here...Goolish ain't the word :).

这篇关于与ASP.Net MVC 1.0 NUnit的安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆