Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How do I use Visual Studio's Unit Testing on a Web Site

Posted on 2011-03-01
1
315 Views
Last Modified: 2012-06-22
Hello,

I have a growing web site (not a web application project) that I'm developing in VS2010. I have tried to right click on a class and create unit test and it seems to create a seperate project for testing as it should. However when I try to build the testing poject I get errors like...

The "BuildShadoTask" task failed unexpectedly.
System.WEb.HttpCompileException (0x80004005): C:\[my path]\PurchasedBonds.ascx(12): error CS1502: The best overloaded method match for 'controls_PurchasedBonds.getNameOnBond(Application)' has some invalid arguments.

If I comment out this method I get other similar errors.

What seems funny to me is that I can build and run the actual web site just fine with no errors and no unexpected bugs.

Thanks,
gtar
0
Comment
Question by:gtar
1 Comment
 
LVL 9

Accepted Solution

by:
gdupadhyay earned 500 total points
ID: 35029290
If you need to create Unit Test for class library: First You need to create a new test project.

- Add reference of all class or class library.
- Create object of the class in test project.
- Call the methods by assign parameter values.
- Verify the result return by the method

Let me know for question.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question