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.
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…
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.
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.
more of the thread on Refactoring
Thanks for the info. Now I know which DLL and where to use it
in the NUnit GUI.
|All times are GMT -4. The time now is 09:46 PM.|
Powered by vBulletin®
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.