使用nuint与asp.net Web表单

时间:2021-10-26 03:15:35

I have an existing asp.net webforms application with all its business logic and DAL in the app_code folder.

我有一个现有的asp.net webforms应用程序,其所有业务逻辑和DAL都在app_code文件夹中。

What is the best way to structure tests with nunit ? Add a separate test project to the solution or do I have to put the tests in the app_Code folder ?

使用nunit构建测试的最佳方法是什么?在解决方案中添加单独的测试项目,还是必须将测试放在app_Code文件夹中?

1 个解决方案

#1


I like Ayende's suggestion in the blog post below. I would create a separate project for tests but I would try to never add another project after that point simply folders.

我喜欢Ayende在下面的博文中提出的建议。我会为测试创建一个单独的项目,但我会尝试永远不会在该点之后添加另一个项目只是文件夹。

http://ayende.com/Blog/archive/2008/02/22/The-two-project-solution.aspx

  • MyApp o /Model o /Web o /Services o /Infrastructure
    • MyApp.Tests
  • MyApp o / Model o / Web o / Services o / Infrastructure MyApp.Tests

You should not have to put your tests in the app_code folder.

您不必将测试放在app_code文件夹中。

#1


I like Ayende's suggestion in the blog post below. I would create a separate project for tests but I would try to never add another project after that point simply folders.

我喜欢Ayende在下面的博文中提出的建议。我会为测试创建一个单独的项目,但我会尝试永远不会在该点之后添加另一个项目只是文件夹。

http://ayende.com/Blog/archive/2008/02/22/The-two-project-solution.aspx

  • MyApp o /Model o /Web o /Services o /Infrastructure
    • MyApp.Tests
  • MyApp o / Model o / Web o / Services o / Infrastructure MyApp.Tests

You should not have to put your tests in the app_code folder.

您不必将测试放在app_code文件夹中。