Wrox Programmer Forums
|
BOOK: Professional Visual Studio 2010
This is the forum to discuss the Wrox book Professional Visual Studio 2010 by Nick Randolph, David Gardner, Chris Anderson, Michael Minutillo; ISBN: 9780470548653
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Visual Studio 2010 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 24th, 2010, 12:54 PM
Registered User
 
Join Date: Aug 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default The other 3 unit test cases on page 198

I don't know how to proceed on page 198. The tutorial fleshes out one of the four test cases. How are the other three implemented? In additional Subs or in additional Asserts within the CurrentStatusTest?
 
Old September 20th, 2010, 03:40 AM
Registered User
 
Join Date: Apr 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to michael.minutillo
Default

My preference is to create additional Subs and limit the number of asserts per test (to one if possible).

If you only have a single Assert in each test Sub then when it fails it will be more obvious what the state is that causes the problem. If you have multiple Asserts in a single test Sub then determining which one caused the problem can be difficult.

You can use messages (the last parameter) to distinguish each of the Assert statements which will make things easier if you want to have multiple Asserts in a single Sub. You should be aware that if you do this the first one that fails will end the test and any subsequent asserts will not be evaluated.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Unit test for Controller question. RegisterRR BOOK: Testing ASP.NET Web Applications 0 March 22nd, 2010 06:29 PM
How to unit test IDataErrorInfo? chobo2 ASP.NET 3.5 Basics 0 August 21st, 2009 12:31 AM
Unit Test josericardo_jr BOOK: Professional XNA Game Programming: For Xbox 360 and Windows ISBN: 978-0-470-12677-6 0 August 9th, 2007 08:19 AM
test cases for data submission simplyAns MySQL 2 November 2nd, 2005 10:21 AM
unable to use junit test cases for web project in deb_net J2EE 0 October 24th, 2005 12:54 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.