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 Refactoring in Visual Basic ISBN: 978-0-470-17979-6
This is the forum to discuss the Wrox book Professional Refactoring in Visual Basic by Danijel Arsenovski; ISBN: 9780470179796
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Refactoring in Visual Basic ISBN: 978-0-470-17979-6 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
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old January 27th, 2010, 07:33 PM
Registered User
 
Join Date: Jun 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Output Type Class cannot be started

I'm on pages 76 through 79 in the Refactoring in VB book. The two NTests in VS2008 and
with ReSharper verson 4.5 installed failed. When I tried to debug these tests in VS 2008
it gave me the following error from VS 2008:

A project with an Output Type of Class Library cannot be started directly.
In order to debug this project, add an executable project to this solution which
reference the library project. Set the executable project as the startup project.
How do I do that?

Most of my work during the last four years has been in Web development. So the
DLL's and associated classes are Not fresh in my memory.

-- Kenneth S.
Reply With Quote
  #2 (permalink)  
Old January 30th, 2010, 09:38 AM
Wrox Author
Points: 63, Level: 1
Points: 63, Level: 1 Points: 63, Level: 1 Points: 63, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2008
Location: , , .
Posts: 13
Thanks: 1
Thanked 1 Time in 1 Post
Default Use NUnit GUI to run your tests

You should use NUnit GUI to execute your tests. See figure 3-10. You will have to download and install NUnit framework available at http://www.nunit.org. After that, you can navigate to NUnit in Start->Programs to run NUnit GUI. Follow the steps described on page 72 in Installing NUnit section.

Visual Studio 2008 does not support running NUnit tests, but VS 2010 should. (NUnit is a third party open source framework after all). I haven’t used ReSharper lately, but to my understanding, it is also capable of running NUnit tests. Also, note that BodyFatContent test will fail on purpose. I left it unimplemented so you could do it as an exercise. You need to implement BodyFatContent in FemalePatient class in order to have this test execute with success. Hope this helps…
__________________
http://blog.refactoringin.net
"Empowering your team for agile transition"
Reply With Quote
  #3 (permalink)  
Old January 30th, 2010, 06:15 PM
Registered User
 
Join Date: Jun 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default reply to NUnit not working

Thanks for the info. I tried it in the NUnit GUI and got this error:
There is no source Code available for the current location.

Then I tried again and got the reply that the test still failed. It seems to get the old DLL or
some other old code.


---- Kenneth
Reply With Quote
  #4 (permalink)  
Old January 31st, 2010, 10:08 AM
Wrox Author
Points: 63, Level: 1
Points: 63, Level: 1 Points: 63, Level: 1 Points: 63, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2008
Location: , , .
Posts: 13
Thanks: 1
Thanked 1 Time in 1 Post
Default Open TestCaloriesCalculator.dll in NUnit GUI

The way to run NUnit GUI is to open the TestCaloriesCalculator.dll in File-> Open Project dialog in NUnit GUI. The TestCaloriesCalculator.dll is found inside the Debug directory of TestCaloriesCalculator project and it is reconstructed each time you rebuild the project. The exact route(relative to extracted source code location) is:

\179796 Ch03\179796 Ch03_AR Source\TestCaloriesCalculator\TestCaloriesCalculat or\bin\Debug\ TestCaloriesCalculator.dll

I have attached a screenshot of NUnit GUI after executing the tests.
Attached Images
File Type: jpg NUnitGUI.JPG (63.9 KB, 1 views)
__________________
http://blog.refactoringin.net
"Empowering your team for agile transition"
Reply With Quote
  #5 (permalink)  
Old February 2nd, 2010, 05:43 PM
Registered User
 
Join Date: Jun 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default more of the thread on Refactoring

Thanks for the info. Now I know which DLL and where to use it
in the NUnit GUI.
Reply With Quote
Reply


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
Error using public class in App_Code: BC30002: Type 'xxx' is not defined nqsousa ASP.NET 2.0 Basics 4 December 13th, 2009 02:34 AM
Question about value class type saadli BOOK: Ivor Horton's Beginning Visual C++ 2008 ISBN: 978-0-470-22590-5 4 December 3rd, 2008 10:15 PM
how to build class structure for collection output jimusa Visual Basic 2005 Basics 3 August 7th, 2008 05:49 PM
Ch12,p391: project with Output Type ... Error mk goody BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 1 August 8th, 2007 08:55 PM
Class Cannot be Pulic in This Type of Prj BrianWren Pro VB 6 3 May 1st, 2007 05:07 PM



All times are GMT -4. The time now is 10:59 PM.


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