Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional Software Testing with Visual Studio 2005 Team System ISBN: 978-0-470-14978-2
This is the forum to discuss the Wrox book Professional Software Testing with Visual Studio 2005 Team System: Tools for Software Developers and Test Engineers by Tom Arnold, Dominic Hopton, Andy Leonard, Mike Frost; ISBN: 9780470149782
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Software Testing with Visual Studio 2005 Team System ISBN: 978-0-470-14978-2 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old May 19th, 2010, 04:56 AM
Registered User
Join Date: May 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Berlioz
Default Private accessor

Trying to "test" a simple button_click event. I right click, Create Private Accessor, VS08 say it created it successfully. Then right click again say Re-Create the unit test for the button1_click method, but when I go to the test project and look at the generated test method with all of the attributes stacked on top of it, including the deployment item, the PrivateClassAccessor will not show up in Intellisense. Also the VSCodeGenAccessor file is nowhere to be seen in Solution Explorer. The book covers this in the pages 53-54. Can someone help me ??? If I try to run the tes as is, the test fails and says
Failed Button1_ClickTest TestProject1 Test method TestProject1._DefaultTest.Button1_ClickTest threw exception: System.NullReferenceException: Object reference not set to an instance of an object..
 /// <summary>
        ///A test for Button1_Click 
        // TODO: Ensure that the UrlToTest attribute specifies a URL to an ASP.NET page (for example,
        // http://.../Default.aspx). This is necessary for the unit test to be executed on the web server,
        // whether you are testing a page, web service, or a WCF service.
        [AspNetDevelopmentServerHost("C:\\Users\\Danny\\Scratch\\TDD\\TDD", "/")]
        public void Button1_ClickTest()
            _Default_Accessor target = new _Default_Accessor(); // TODO: Initialize to an appropriate value
            object sender = null; // TODO: Initialize to an appropriate value
            EventArgs e = null; // TODO: Initialize to an appropriate value
            target.Button1_Click(sender, e);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");

Last edited by Berlioz; May 19th, 2010 at 05:04 AM.
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help!!!!!Private Sub Worksheet_Change VicM Excel VBA 1 March 6th, 2008 09:35 PM
Private Key with Associated Certificate bdblhk3 BOOK: Beginning Cryptography with Java 1 October 22nd, 2007 04:32 PM
Private Messages ViagraFalls BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 10 October 22nd, 2007 03:48 PM
private constructor in C# n.nsivakumar C# 1 August 16th, 2006 07:08 AM
Using Private Sub cutovoi Excel VBA 0 February 5th, 2004 11:55 AM

All times are GMT -4. The time now is 12:22 AM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.