Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2011-03-01
1
Medium Priority
?
318 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
[X]
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
1 Comment
 
LVL 9

Accepted Solution

by:
gdupadhyay earned 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

730 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