Wrox Programmer Forums
|
BOOK: Professional ASP.NET MVC 5
This is the forum to discuss the Wrox book Professional ASP.NET MVC 5 by Jon Galloway, Brad Wilson, K. Scott Allen, David Matson; ISBN: 978-1-118-79475-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET MVC 5 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 May 11th, 2015, 09:22 PM
Registered User
 
Join Date: May 2015
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Unit Test Question

Hi, After years of general front-end development I'm learning MVC, unit testing and test-driven development and am looking to adopt it, and I've enjoyed working through your book.

Here's my question: In the example on pp 414-415, the second test is

Assert.IsNull(result.ViewName);

which fails for me, even with a brand new MVC project following the example in the book. However, I noticed that the following passes:

Assert.AreEqual(result.ViewName, "");

Is this what was intended, or else does Assert have an .IsNullOrWhiteSpace we should be using? Or is it an error with my setup that the original test is failing?

Thanks for your clarification!

John Akin





Similar Threads
Thread Thread Starter Forum Replies Last Post
Unit test applejax77 Visual Basic 2010 General Discussion 0 June 6th, 2013 09:53 AM
Chapter 7 Unit Testing with the Unit Test Framework - examples blaurence46 BOOK: Professional Application Lifecycle Management with Visual Studio 2010 1 September 24th, 2011 10:07 AM
about unit test samvan BOOK: Professional ASP.NET Design Patterns 1 November 13th, 2010 06:32 AM
Unit test for Controller question. RegisterRR BOOK: Testing ASP.NET Web Applications 0 March 22nd, 2010 06:29 PM
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





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