Solved

How to test the webpart that is in a class library

Posted on 2011-09-25
1
393 Views
Last Modified: 2012-05-12
I have the class library where I have the web part logic and I want to test the webpart but don't have any excutable to run. Visual Studio 2008 says I have to have an executable to test it. Not sure the best way to test. I have my own sharepoint site and site collection and MOSS 2007 installed on windows server 2008 R2.

Please give an example of how I can test the webpart. This is a project developed by someone else but want to test this.
0
Comment
Question by:vmandem
[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 18

Accepted Solution

by:
Gary Davis earned 80 total points
ID: 36595706
I often use LinqPad to test things like this - even if it has nothing to do with Linq. You load the dll reference to your class library and then type a few lines of C# code to call the class library function and display the returned response using the LinqPad Dump() statement.

It works similar to a C# interpreter.

See http://www.linqpad.com. I found it worth it to spend the extra $$ to get the Intellisense option but the free version is otherwise full-featured.

Gary Davis
0

Featured Post

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
When using a search centre, I'm going to show you how to configure Sharepoint's search to only return results from the current site collection. Very useful when using Office 365 with multiple site collections.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses

628 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