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

x
?
Solved

How to test the webpart that is in a class library

Posted on 2011-09-25
1
Medium Priority
?
400 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 320 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

These days socially coordinated efforts have turned into a critical requirement for enterprises.
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

721 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