Test-Driven Development in Microsoft® .NET
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...
Autor principal: | |
---|---|
Otros Autores: | , |
Formato: | Libro electrónico |
Idioma: | Inglés |
Publicado: |
Sebastopol :
Microsoft Press
2009.
|
Edición: | 1st edition |
Materias: | |
Ver en Biblioteca Universitat Ramon Llull: | https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009627182206719 |
Tabla de Contenidos:
- Test-Driven Development in Microsoft® .NET; Acknowledgments; Introduction; Organization; How to Use This Book; If You Are a Manager or Business Analyst; Small Steps-A Personal Story; Companion Web Site; I. Test-Driven Development Primer; Customer Tests; Simple Design; Refactoring; Process; Red/Green/Refactor; Summary; 2. Test-Driven Development in .NET-By Example; Test List; Red/Green/Refactor; Test 2: Push a single object on the Stack and verify that IsEmpty is false.; Test 3: Push a single object, Pop the object, and verify that IsEmpty is true.
- Test 4: Push a single object, remembering what it is Pop the object, and verify that the two objects are equal.; Test 5: Push three objects, remembering what they are; Pop each one, and verify that they are correct.; Test 6: Pop a Stack that has no elements.; Test 7: Push a single object and then call Top. Verify that IsEmpty returns false.; 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.; 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.Test 10: Push one object and call Top repeatedly, comparing what is returned to what was pushed.; Test 11: Call Top on a Stack that has no elements.; Test 12: Push null onto the Stack and verify that IsEmpty is false.; Test 13: Push null onto the Stack, Pop the Stack, and verify that the value returned is null.; Test 14: Push null onto the Stack, call Top, and verify that the value returned is null.; Summary; 3. Refactoring-By Example; Refactoring 0: Remove Unneeded Code; Refactoring 1: Rename Method
- Refactoring 2: Add a TestRefactoring 3: Hide Method; Refactoring 4: Replace Nested Conditional with Guard Clauses; Refactoring 5: Inline Method; Refactoring 6: Rename Variable; Refactoring 7: Collapse Loops; Refactoring 8: Remove Dead Code; Refactoring 9: Collapse Loops (Again); Refactoring 10: Reduce Local Variable Scope; Refactoring 11: Replace Temp with Query; Refactoring 12: Remove Dead Code; Refactoring 13: Extract Method; Refactoring 14: Extract Method (Again); Refactoring 15: Reduce Local Variable Scope; Refactoring 16: Convert Procedural Design to Objects
- Refactoring 17: Keep the Data Close to Where It Is UsedSummary; II. Test-Driven Development Example; Entity Relationships; The First Feature; Additional Features; 5. Programmer Tests: Using TDD with ADO.NET; The Task; We're Not Finished Yet; Individual Entities in Isolation; Artist Gateway; ArtistFixture.cs; Genre Gateway; IdGeneratorFixture.cs; Finishing Up; Testing Relationships Between Entities; Retrieve a Recording; Test Organization; Summary; 6. Programmer Tests: Using TDD with ASP.NET Web Services; Data Transformation; Checking the ""Title"" Field; Building an Assembler
- Mapping the Relationships in the Assembler