WebSite or WebApplication in C# for TDD Approach ? Unit Testing Us

M

MS Techie

When Following a TDD Approach, where in we write a test for the web
application , which option is better. Is it better to use a

1. Create a new WebApplication Project
2. Create a new WebSite option

Because if I use a WebApplication, then only 1 dll gets created for all the
webpages. When I create a test project (right click and select the option
"Create Tests") and create a new unit test, When I run the application, I get
the message, web.config has changed. How do I tackle this situation. Do I
need to set some attributes in web.config for this ?

If I create a new WebSite ,then for every page it creates a dll . When I
right click and select the option to "Create Test" , I dont get a new Test
Project created automatically.

I am using "Visual Studio 2005 Team Edition for Software Developers". Please
suggest me the best option for this version of Visual Studio and dont suggest
me VS 2008 since my company has already brought VS 2005 edition licenses.

Also if there any links to sample applications developed in C# on TDD
Approach, it would be great…

Thanks in Advance
 
A

Anthony Jones

MS Techie said:
When Following a TDD Approach, where in we write a test for the web
application , which option is better. Is it better to use a

1. Create a new WebApplication Project
2. Create a new WebSite option

Because if I use a WebApplication, then only 1 dll gets created for all
the
webpages. When I create a test project (right click and select the option
"Create Tests") and create a new unit test, When I run the application, I
get
the message, web.config has changed. How do I tackle this situation. Do I
need to set some attributes in web.config for this ?

If I create a new WebSite ,then for every page it creates a dll . When I
right click and select the option to "Create Test" , I dont get a new Test
Project created automatically.

I am using "Visual Studio 2005 Team Edition for Software Developers".
Please
suggest me the best option for this version of Visual Studio and dont
suggest
me VS 2008 since my company has already brought VS 2005 edition licenses.

Also if there any links to sample applications developed in C# on TDD
Approach, it would be great…

You really need to be using a Web application if you intend to Unit Test.

Also as Peter has already stated ASP.NET MVC is far more suited to Unit
testing than a traditional ASP.NET development.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top