Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Controls / January 2008

Tip: Looking for answers? Try searching our database.

unit testing my control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kkarre - 21 Jan 2008 10:58 GMT
Hi all,
I'm trying to perform unit testing on a control, but the test fails early:

RangeUserControl target = new RangeUserControl();
Assert.IsNotNull(target);
Assert.IsInstanceOfType(target, System.Type.GetType("RangeUserControl"));

RangeUserControl is the Class name of the control.
It fail on the 3rd row.
Any ideas?
Grateful for any tip!
Best Regards,kk
Morten Wennevik [C# MVP] - 24 Jan 2008 06:24 GMT
Hi kk,

If you do a

Type t1 = Type.GetType("RangeUserControl");

you will most likely find that t1 == null.  You need to specify the fully
qualified type name (ie "RangeNamespace.RangeUserControl").

Signature

Happy Coding!
Morten Wennevik [C# MVP]

> Hi all,
> I'm trying to perform unit testing on a control, but the test fails early:
[quoted text clipped - 8 lines]
> Grateful for any tip!
> Best Regards,kk

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.