Solved

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

Posted on 2011-03-01
1
314 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

ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Web site error 3 41
C#, asp.net MVC, sql server, LINQ 3 32
C# Desktop Application 3 36
Client Validating 2 date fields, required & comparison 1 29
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
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.

831 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