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 to test the webpart that is in a class library

Posted on 2011-09-25
1
379 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

789 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