简体   繁体   中英

Adding xUnit.NET ASP.NET MVC unit tests to an existing project/solution

I downloaded xUnit.NET today, along with TestDriven.NET, and installed the ASP.NET MVC unit test templates. I have an existing ASP.NET MVC solution that I want to add an xUnit unit test project to, but it seems that the only way to create such a project is with the "Create Unit Tests?" dialog that appears when you first create an ASP.NET MVC project.

Is it possible to add xUnit tests to an existing ASP.NET MVC project/solution?

Yes.

Why cant you just add a new test project manually? All dialog does is set up some initial tests that are pretty meaningless once you actually start coding.

看起来xunit很快就会删除模板 - 当我尝试创建一个新的web +测试项目时,它们肯定不起作用。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM