gogogo
Syndetics cover image
Image from Syndetics

Test-driven development in Microsoft .NET / James W. Newkirk, Alexei A. Vorontsov.

By: Contributor(s): Material type: TextTextPublication details: Redmond, Wash. : Microsoft Press, 2004.Description: xxi, 273 p. : ill. ; 23 cmISBN:
  • 0735619484
  • 9780735619487
Subject(s): DDC classification:
  • 005.1 NEW
Holdings
Item type Current library Call number Copy number Status Date due Barcode
Standard Loan Moylish Library Main Collection 005.1 NEW (Browse shelf(Opens below)) 1 Available 39002100470831

Enhanced descriptions from Syndetics:

With the clarity and precision intrinsic to the Test-Driven Development (TDD) process itself, experts James Newkirk and Alexei Vorontsov demonstrate how to implement TDD principles and practices to drive lean, efficient coding--and better design. The best way to understand TDD is to see it in action, and Newkirk and Vorontsov walk step by step through TDD and refactoring in an n-tier, .NET-connected solution. And, as members of the development team for NUnit, a leading unit-testing framework for Microsoft .NET, the authors can offer matchless insights on testing in this environment--ultimately making their expertise your own.

Test first--and drive ambiguity out of the development process:

Document your code with tests, rather than paper Use test lists to generate explicit requirements and completion criteria Refactor--and improve the design of existing code Alternate programmer tests with customer tests Change how you build UI code--a thin layer on top of rigorously tested code Use tests to make small, incremental changes--and minimize the debugging process Deliver software that's verifiable, reliable, and robust

"Microsoft professional"--Cover.

Includes bibliographical references (p. 259-260) and index.

Table of contents provided by Syndetics

  • Foreword (p. xiii)
  • Acknowledgments (p. xv)
  • Introduction (p. xvii)
  • Part I Test-Driven Development Primer
  • 1 Test-Driven Development Practices (p. 3)
  • What Is Test-Driven Development? (p. 3)
  • Test Types (p. 4)
  • Simple Design (p. 5)
  • Refactoring (p. 6)
  • Process (p. 6)
  • Test List (p. 6)
  • Red/Green/Refactor (p. 7)
  • Summary (p. 8)
  • 2 Test-Driven Development in .NET--By Example (p. 9)
  • The Task (p. 9)
  • Test List (p. 10)
  • Choosing the First Test (p. 11)
  • Red/Green/Refactor (p. 12)
  • Test 1 Create a Stack and verify that IsEmpty is true (p. 12)
  • Test 2 Push a single object on the Stack and verify that IsEmpty is false (p. 14)
  • Test 3 Push a single object, Pop the object, and verify that IsEmpty is true (p. 16)
  • Test 4 Push a single object, remembering what it is; Pop the object, and verify that the two objects are equal (p. 17)
  • Test 5 Push three objects, remembering what they are; Pop each one, and verify that they are correct (p. 20)
  • Test 6 Pop a Stack that has no elements (p. 22)
  • Test 7 Push a single object and then call Top. Verify that IsEmpty returns false (p. 24)
  • Test 8 Push a single object, remembering what it is; and then call Top. Verify that the object that is returned is equal to the one that was pushed (p. 24)
  • Test 9 Push multiple objects, remembering what they are; call Top, and verify that the last item pushed is equal to the one returned by Top (p. 25)
  • Test 10 Push one object and call Top repeatedly, comparing what is returned to what was pushed (p. 26)
  • Test 11 Call Top on a Stack that has no elements (p. 26)
  • Test 12 Push null onto the Stack and verify that IsEmpty is false (p. 27)
  • Test 13 Push null onto the Stack, Pop the Stack, and verify that the value returned is null (p. 28)
  • Test 14 Push null onto the Stack, call Top, and verify that the value returned is null (p. 28)
  • Summary (p. 29)
  • 3 Refactoring--By Example (p. 35)
  • The Sieve (p. 36)
  • Before Refactoring the Code: Make Sure It All Works (p. 41)
  • Refactoring 0 Remove Unneeded Code (p. 41)
  • Refactoring 1 Rename Method (p. 42)
  • Refactoring 2 Add a Test (p. 43)
  • Refactoring 3 Hide Method (p. 44)
  • Refactoring 4 Replace Nested Conditional with Guard Clauses (p. 45)
  • Refactoring 5 Inline Method (p. 46)
  • Refactoring 6 Rename Variable (p. 47)
  • Refactoring 7 Collapse Loops (p. 49)
  • Refactoring 8 Remove Dead Code (p. 49)
  • Refactoring 9 Collapse Loops (Again) (p. 50)
  • Refactoring 10 Reduce Local Variable Scope (p. 52)
  • Refactoring 11 Replace Temp with Query (p. 52)
  • Refactoring 12 Remove Dead Code (p. 53)
  • Refactoring 13 Extract Method (p. 53)
  • Refactoring 14 Extract Method (Again) (p. 54)
  • Refactoring 15 Reduce Local Variable Scope (p. 56)
  • Refactoring 16 Convert Procedural Design to Objects (p. 56)
  • Refactoring 17 Keep the Data Close to Where It Is Used (p. 58)
  • Summary (p. 59)
  • Part II Test-Driven Development Example
  • 4 The Media Library Example (p. 63)
  • The Skinny (p. 63)
  • Existing Database (p. 64)
  • The First Feature (p. 66)
  • Additional Features (p. 67)
  • 5 Programmer Tests: Using TDD with ADO.NET (p. 69)
  • Testing the Database Access Layer (p. 69)
  • The Task (p. 71)
  • Connecting to the Database (p. 72)
  • Individual Entities in Isolation (p. 75)
  • Testing Relationships Between Entities (p. 92)
  • Track-Recording Relationship (p. 94)
  • Retrieve a Recording (p. 97)
  • Test Organization (p. 101)
  • Summary (p. 102)
  • 6 Programmer Tests: Using TDD with ASP.NET Web Services (p. 105)
  • The Task (p. 105)
  • Test List (p. 106)
  • Data Transformation (p. 107)
  • Data Transfer Object (p. 108)
  • Database Catalog Service (p. 117)
  • Web Service Tests (p. 120)
  • Web Service Producer and Consumer Infrastructure (p. 121)
  • Almost Done (p. 124)
  • Summary (p. 126)
  • Emerging Architecture (p. 126)
  • 7 Customer Tests: Completing the First Feature (p. 127)
  • Are We Done? (p. 127)
  • Customer Tests (p. 128)
  • Customer Tests for Recording Retrieval (p. 129)
  • Script 1. Retrieve an existing recording and verify its content (p. 129)
  • Script 2. Retrieve a nonexistent recording (p. 130)
  • Automating Customer Tests (p. 131)
  • FIT Overview (p. 131)
  • Connecting FIT to the Implementation (p. 132)
  • Automation with FIT (p. 133)
  • Reconciling Viewpoints (p. 143)
  • Track Duration (p. 144)
  • Recording Duration (p. 145)
  • Summary (p. 146)
  • 8 Driving Development with Customer Tests (p. 147)
  • The FIT Script (p. 147)
  • Add a review to an existing recording (p. 148)
  • Implementing Add/Delete Review (p. 151)
  • Summary (p. 162)
  • 9 Driving Development with Customer Tests: Exposing a Failure Condition (p. 163)
  • Programmer Tests (p. 164)
  • Implementing a SOAP Fault (p. 168)
  • Summary (p. 179)
  • 10 Programmer Tests: Using Transactions (p. 181)
  • Programmer Tests (p. 182)
  • Transaction Manager (p. 183)
  • Programmer Tests: Catalog Class (p. 193)
  • Summary (p. 203)
  • 11 Service Layer Refactoring (p. 205)
  • The Problem (p. 205)
  • What's Wrong? (p. 207)
  • The Solution (p. 208)
  • Summary (p. 211)
  • 12 Implementing a Web Client (p. 213)
  • Testing User Interfaces (p. 213)
  • The Task (p. 214)
  • Implementing Search (p. 215)
  • Implementing the Search Service (p. 215)
  • Implementing the Search Page (p. 216)
  • Binding the Results to a Repeater Web Control (p. 218)
  • Enough of This Stub (p. 226)
  • Summary (p. 230)
  • Part III Appendixes
  • A NUnit Primer (p. 233)
  • NUnit Quick Start (p. 233)
  • Step 1. Create Visual Studio Project for your test code (p. 233)
  • Step 2. Add a reference to the NUnit Framework (p. 234)
  • Step 3. Add a class to the project (p. 235)
  • Step 4. Set up your Visual Studio Project to use the NUnit-Gui test runner (p. 236)
  • Step 5. Compile and run your test (p. 237)
  • Step 6. Become familiar with the NUnit-Gui layout (p. 237)
  • NUnit Core Concepts (p. 240)
  • Test Case (p. 240)
  • Other NUnit Capabilities (p. 244)
  • Using SetUp/TearDown Attributes (p. 244)
  • Using ExpectedException (p. 246)
  • Using the Ignore Attribute (p. 246)
  • Using TestFixtureSetUp/TestFixture TearDown (p. 247)
  • Test Life-Cycle Contract (p. 248)
  • Using the Visual Studio .NET Debugger with NUnit-Gui (p. 250)
  • B Transactions in ADO.NET (p. 253)
  • Transaction Management (p. 253)
  • Manual Transaction Management (p. 254)
  • Automatic Transaction Management (p. 255)
  • Transaction Participation (p. 256)
  • C Bibliography (p. 259)
  • Index (p. 261)

Author notes provided by Syndetics

James W. Newkirk, coauthor of Enterprise Solution Patterns in .NET and Extreme Programming in Practice, led the development of NUnit 2.0. He's currently the development lead for the Microsoft Platform Architecture Guidance team, which provides guidance and reusable assets to enterprise customers through the Patterns & Practices reference series.
Alexei A. Vorontsov has been developing software in a variety of environments -- from scientific and mathematical applications to enterprise systems -- for more than eight years. He specializes in developing, testing, and managing large distributed software solutions -- applying agile development methods for more pragmatic, cost-efficient results.

Powered by Koha